bdev: improve bdev blockcnt notify
A small improvement in blockcnt change. If size == bdev->blockcnt just return. Change-Id: I507a3e5d5fa0f3f17383afa08c47c0bda48be52c Signed-off-by: Jin Yu <jin.yu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5922 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
ec1494e92b
commit
e6493c81f3
@ -3450,6 +3450,10 @@ spdk_bdev_notify_blockcnt_change(struct spdk_bdev *bdev, uint64_t size)
|
||||
struct spdk_bdev_desc *desc;
|
||||
int ret;
|
||||
|
||||
if (size == bdev->blockcnt) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&bdev->internal.mutex);
|
||||
|
||||
/* bdev has open descriptors */
|
||||
|
Loading…
Reference in New Issue
Block a user