lvol: remove unused lvol->thin_provision

The thin_provision member of struct spdk_lvol is set but never used.
When needed, an lvol's thin provision state is obtained by looking at
the lvol's blob. This removes the unused thin_provision member.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I5a2048b5334a26772a25a0bd238e42d3aeb63b49
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17173
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
This commit is contained in:
Mike Gerdts 2023-03-14 01:04:50 -05:00 committed by Jim Harris
parent aaebaece6d
commit 0e41ee0b83
2 changed files with 0 additions and 3 deletions

View File

@ -88,7 +88,6 @@ struct spdk_lvol {
char name[SPDK_LVOL_NAME_MAX];
struct spdk_uuid uuid;
char uuid_str[SPDK_UUID_STRING_LEN];
bool thin_provision;
struct spdk_bdev *bdev;
int ref_count;
bool action_in_progress;

View File

@ -184,7 +184,6 @@ load_next_lvol(void *cb_arg, struct spdk_blob *blob, int lvolerrno)
*/
lvol->blob_id = blob_id;
lvol->lvol_store = lvs;
lvol->thin_provision = spdk_blob_is_thin_provisioned(blob);
rc = spdk_blob_get_xattr_value(blob, "uuid", (const void **)&attr, &value_len);
if (rc != 0 || value_len != SPDK_UUID_STRING_LEN || attr[SPDK_UUID_STRING_LEN - 1] != '\0' ||
@ -1040,7 +1039,6 @@ spdk_lvol_create(struct spdk_lvol_store *lvs, const char *name, uint64_t sz,
}
lvol->lvol_store = lvs;
num_clusters = spdk_divide_round_up(sz, spdk_bs_get_cluster_size(bs));
lvol->thin_provision = thin_provision;
lvol->clear_method = (enum blob_clear_method)clear_method;
snprintf(lvol->name, sizeof(lvol->name), "%s", name);
TAILQ_INSERT_TAIL(&lvol->lvol_store->pending_lvols, lvol, link);