]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #42439 from ifed01/wip-ifed-more-errors-shared-blob-repair
authorIgor Fedotov <ifedotov@suse.com>
Mon, 23 Aug 2021 15:03:41 +0000 (18:03 +0300)
committerGitHub <noreply@github.com>
Mon, 23 Aug 2021 15:03:41 +0000 (18:03 +0300)
os/bluestore: fix additional errors during missed shared blob repair.

Reviewed-by: Adam Kupczyk <akupczyk@redhat.com>
1  2 
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h
src/test/objectstore/store_test.cc

index 926b61ed3b678ed635af791725fe7d522fe3f54c,71b94cc962197e0b70aae332dfddd55bc7127353..a819b80c4a197a7bc9edd094bc58b751e2ea2e4c
@@@ -9083,8 -8959,28 +9106,25 @@@ void BlueStore::inject_broken_shared_bl
    db->submit_transaction_sync(txn);
  };
  
+ void BlueStore::inject_no_shared_blob_key()
+ {
+   KeyValueDB::Transaction txn;
+   txn = db->get_transaction();
+   ceph_assert(blobid_last > 0);
+   // kill the last used sbid, this can be broken due to blobid preallocation
+   // in rare cases, leaving as-is for the sake of simplicity
+   uint64_t sbid = blobid_last;
+   string key;
+   dout(5) << __func__<< " " << sbid << dendl;
+   get_shared_blob_key(sbid, &key);
+   txn->rmkey(PREFIX_SHARED_BLOB, key);
+   db->submit_transaction_sync(txn);
+ };
  void BlueStore::inject_leaked(uint64_t len)
  {
 -  KeyValueDB::Transaction txn;
 -  txn = db->get_transaction();
 -
    PExtentVector exts;
    int64_t alloc_len = shared_alloc.a->allocate(len, min_alloc_size,
                                           min_alloc_size * 256, 0, &exts);
Simple merge
Simple merge