Spdk/lib/blob
Tomasz Zawadzki dfa7f14bc4 blobstore: mark blobstore dirty on extent page write
When blobstore is shutdown unexpectedly the super block should
already be marked as dirty. Only when proper blobstore unload
happens, the super block is marked as clean.

Super block is not marked as dirty on blobstore load,
but on first action that starts to modify the metadata.
At this time it only happens through blob persist,
which is fine for creation/deletion of blobs or
their modification (resize/xattr).

It works for cluster allocation with extent_table disabled,
and when extent page needs to be allocated.

Yet it fails for cases when no new extent page is required.
It will result in not marking blobstore as dirty and
then fail when loading a particular blob due to mismatch
between used_clusters and contents of extent page.

To fix that, the blobstore is now marked dirty on a very first
extent page update since blobstore load.

Fixes #2830

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ied37ecf90d46e1bc51b22c323dce278a0fa88f72
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16179
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-01-20 18:58:34 +00:00
..
blob_bs_dev.c blob: Add translate_lba operation 2022-12-08 12:54:54 +00:00
blobstore.c blobstore: mark blobstore dirty on extent page write 2023-01-20 18:58:34 +00:00
blobstore.h blobstore: convert used_lock to spinlock 2022-12-20 09:19:09 +00:00
Makefile blob: Add translate_lba operation 2022-12-08 12:54:54 +00:00
request.c blob: Use bdev copy command in CoW flow if supported 2022-12-08 12:54:54 +00:00
request.h blob: Use bdev copy command in CoW flow if supported 2022-12-08 12:54:54 +00:00
spdk_blob.map blob: Add functions to find [un]allocated io_unit 2022-09-15 08:23:56 +00:00
zeroes.c blob: Add translate_lba operation 2022-12-08 12:54:54 +00:00