Spdk/lib/blob
vagrant fa09c9ac9b lib/blob: Fix deleting a snapshot after decoupling it from its parent
When decoupling a snapshot from its parent, we need to clear its parent.
So we should remove the xattr BLOB_SNAPSHOT. Modifying the xattrs of a blob
only works if its metadata are not in read-only mode.
By default, a snapshot is in read-only mode so this operation fails. When we
later want to delete the snapshot, we will see that it has a parent, so we will
try to remove the snapshot from its parent's clones list. This will cause a
crash.
The fix is to remove the BLOB_SNAPSHOT xattr only after setting the snapshot's
metadata in rw mode.

Signed-off-by: Alex Michon <amichon@kalrayinc.com>
Change-Id: I80efa6dd3dcb38b4c738ce2e97aa2ffc281cefa5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13723
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-08-05 08:30:30 +00:00
..
blob_bs_dev.c Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
blobstore.c lib/blob: Fix deleting a snapshot after decoupling it from its parent 2022-08-05 08:30:30 +00:00
blobstore.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
Makefile blobstore: implement spdk_bs_grow and bdev_lvol_grow_lvstore RPC 2022-06-28 17:55:43 +00:00
request.c Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
request.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
spdk_blob.map blobstore: implement spdk_bs_grow and bdev_lvol_grow_lvstore RPC 2022-06-28 17:55:43 +00:00
zeroes.c Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00