lib/blob: add invalid flag for extent table
With recent changes to extent on-disk metadata format,
new format (Extent Pages) is not backwards compatible.
Meanwhile old format (Extent RLE) is backwards
compatible with older SPDK applications.
Summing up:
Blobstore created pre SPDK 20.01 can only use Extent RLE.
Blobstore created starting with SPDK 20.01 can use both,
Extent Pages and Extent RLE specified by use_extent_table opts.
When use_extent_table is set to true, invalid flag for it is set.
SPDK application pre 20.01, will not load such blob.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483220 (master)
(cherry picked from commit dc24539c40
)
Change-Id: If14ebd03f19eb581d71dcb46191e099336655189
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483395
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
a1e730b460
commit
a0f982bb0a
@ -5129,6 +5129,9 @@ _spdk_bs_create_blob(struct spdk_blob_store *bs,
|
||||
}
|
||||
|
||||
blob->use_extent_table = opts->use_extent_table;
|
||||
if (blob->use_extent_table) {
|
||||
blob->invalid_flags |= SPDK_BLOB_EXTENT_TABLE;
|
||||
}
|
||||
|
||||
if (!internal_xattrs) {
|
||||
_spdk_blob_xattrs_init(&internal_xattrs_default);
|
||||
|
@ -331,7 +331,8 @@ struct spdk_blob_md_descriptor_extent_page {
|
||||
|
||||
#define SPDK_BLOB_THIN_PROV (1ULL << 0)
|
||||
#define SPDK_BLOB_INTERNAL_XATTR (1ULL << 1)
|
||||
#define SPDK_BLOB_INVALID_FLAGS_MASK (SPDK_BLOB_THIN_PROV | SPDK_BLOB_INTERNAL_XATTR)
|
||||
#define SPDK_BLOB_EXTENT_TABLE (1ULL << 2)
|
||||
#define SPDK_BLOB_INVALID_FLAGS_MASK (SPDK_BLOB_THIN_PROV | SPDK_BLOB_INTERNAL_XATTR | SPDK_BLOB_EXTENT_TABLE)
|
||||
|
||||
#define SPDK_BLOB_READ_ONLY (1ULL << 0)
|
||||
#define SPDK_BLOB_DATA_RO_FLAGS_MASK SPDK_BLOB_READ_ONLY
|
||||
|
Loading…
Reference in New Issue
Block a user