From 177d5e91816d835dca30f5d3fb9d1d1761a5bfd4 Mon Sep 17 00:00:00 2001 From: paul luse Date: Thu, 29 Nov 2018 18:12:07 -0500 Subject: [PATCH] bdev/crypto: break from name search loop on claim match I don't think this is a real problem but in stepping through similar logic in the new compress vbdev I noticed that the call to spdk_vbdev_register() which is now in the name search loop due to a very recent code cleanup, will result in immediate calls to this very same examine function and when unwinding will continue through the loop for no good reason (a match was found). Change-Id: I01583d10106008f1f75d5b3ecc7b64639e93d919 Signed-off-by: paul luse Reviewed-on: https://review.gerrithub.io/435553 Reviewed-by: Jim Harris Reviewed-by: Seth Howell Reviewed-by: Ben Walker Reviewed-by: Shuhei Matsumoto Chandler-Test-Pool: SPDK Automated Test System Tested-by: SPDK CI Jenkins --- lib/bdev/crypto/vbdev_crypto.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/bdev/crypto/vbdev_crypto.c b/lib/bdev/crypto/vbdev_crypto.c index f46d81ac9..bbe850e2d 100644 --- a/lib/bdev/crypto/vbdev_crypto.c +++ b/lib/bdev/crypto/vbdev_crypto.c @@ -1532,6 +1532,7 @@ vbdev_crypto_claim(struct spdk_bdev *bdev) goto error_vbdev_register; } SPDK_NOTICELOG("registered io_device and virtual bdev for: %s\n", name->vbdev_name); + break; } return rc;