lvol: remove unused lvs->destruct

While lvs->destruct is set in a few places, it is never read. Since it
is not used, it is removed.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Iee21e92c9049d143fca13930b4b5f328f9ec38f0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15716
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
This commit is contained in:
Mike Gerdts 2022-10-10 13:21:52 -05:00 committed by Tomasz Zawadzki
parent b7bfa50468
commit 6580f654fc
3 changed files with 0 additions and 4 deletions

View File

@ -72,7 +72,6 @@ struct spdk_lvol_store {
struct spdk_uuid uuid;
int lvol_count;
int lvols_opened;
bool destruct;
TAILQ_HEAD(, spdk_lvol) lvols;
TAILQ_HEAD(, spdk_lvol) pending_lvols;
bool on_list;

View File

@ -607,7 +607,6 @@ spdk_lvs_init(struct spdk_bs_dev *bs_dev, struct spdk_lvs_opts *o,
lvs_req->cb_arg = cb_arg;
lvs_req->lvol_store = lvs;
lvs->bs_dev = bs_dev;
lvs->destruct = false;
snprintf(opts.bstype.bstype, sizeof(opts.bstype.bstype), "LVOLSTORE");

View File

@ -430,7 +430,6 @@ _vbdev_lvs_remove(struct spdk_lvol_store *lvs, spdk_lvs_op_complete cb_fn, void
spdk_lvs_unload(lvs, _vbdev_lvs_remove_cb, lvs_bdev);
}
} else {
lvs->destruct = destroy;
if (destroy) {
_vbdev_lvs_remove_lvol_cb(lvs_bdev, 0);
} else {
@ -1700,7 +1699,6 @@ vbdev_lvs_grow(struct spdk_lvol_store *lvs,
if (_vbdev_lvs_are_lvols_closed(lvs)) {
spdk_lvs_unload(lvs, _vbdev_lvs_grow_unload_cb, req);
} else {
lvs->destruct = false;
TAILQ_FOREACH_SAFE(lvol, &lvs->lvols, link, tmp) {
req->lvol_cnt++;
spdk_bdev_unregister(lvol->bdev, _vbdev_lvs_grow_remove_bdev_unregistered_cb, req);