Commit 85cc748f authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

bdev: use claim_module to determine leaf status



A bdev that is claimed is not a leaf, even if it has no vbdevs exposed
currently.

Change-Id: I3b790068128890a569f83b15071ea916c54bff9b
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/402935


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 0a37a369
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -246,7 +246,7 @@ static struct spdk_bdev *
_bdev_next_leaf(struct spdk_bdev *bdev)
{
	while (bdev != NULL) {
		if (TAILQ_EMPTY(&bdev->vbdevs)) {
		if (bdev->claim_module == NULL) {
			return bdev;
		} else {
			bdev = TAILQ_NEXT(bdev, link);