bdev: change return type of _spdk_bdev_enable_qos to void
This function always return 0, so change the type of function to void Change-Id: I715cf82c74619a2707b8e5a453710a992489f2c8 Signed-off-by: Ziye Yang <optimistyzy@gmail.com> Reviewed-on: https://review.gerrithub.io/419045 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: GangCao <gang.cao@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
46412580ee
commit
1f5c8233da
@ -1266,7 +1266,7 @@ _spdk_bdev_channel_destroy_resource(struct spdk_bdev_channel *ch)
|
||||
}
|
||||
|
||||
/* Caller must hold bdev->internal.mutex. */
|
||||
static int
|
||||
static void
|
||||
_spdk_bdev_enable_qos(struct spdk_bdev *bdev, struct spdk_bdev_channel *ch)
|
||||
{
|
||||
struct spdk_bdev_qos *qos = bdev->internal.qos;
|
||||
@ -1299,8 +1299,6 @@ _spdk_bdev_enable_qos(struct spdk_bdev *bdev, struct spdk_bdev_channel *ch)
|
||||
|
||||
ch->flags |= BDEV_CH_QOS_ENABLED;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
@ -1373,13 +1371,7 @@ spdk_bdev_channel_create(void *io_device, void *ctx_buf)
|
||||
#endif
|
||||
|
||||
pthread_mutex_lock(&bdev->internal.mutex);
|
||||
|
||||
if (_spdk_bdev_enable_qos(bdev, ch)) {
|
||||
_spdk_bdev_channel_destroy_resource(ch);
|
||||
pthread_mutex_unlock(&bdev->internal.mutex);
|
||||
return -1;
|
||||
}
|
||||
|
||||
_spdk_bdev_enable_qos(bdev, ch);
|
||||
pthread_mutex_unlock(&bdev->internal.mutex);
|
||||
|
||||
return 0;
|
||||
@ -3407,12 +3399,11 @@ _spdk_bdev_enable_qos_msg(struct spdk_io_channel_iter *i)
|
||||
struct spdk_bdev *bdev = __bdev_from_io_dev(io_device);
|
||||
struct spdk_io_channel *ch = spdk_io_channel_iter_get_channel(i);
|
||||
struct spdk_bdev_channel *bdev_ch = spdk_io_channel_get_ctx(ch);
|
||||
int rc;
|
||||
|
||||
pthread_mutex_lock(&bdev->internal.mutex);
|
||||
rc = _spdk_bdev_enable_qos(bdev, bdev_ch);
|
||||
_spdk_bdev_enable_qos(bdev, bdev_ch);
|
||||
pthread_mutex_unlock(&bdev->internal.mutex);
|
||||
spdk_for_each_channel_continue(i, rc);
|
||||
spdk_for_each_channel_continue(i, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user