summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYuri Weinstein <yweinste@redhat.com>2020-04-29 18:24:02 +0200
committerGitHub <noreply@github.com>2020-04-29 18:24:02 +0200
commit84fbf1c5cddc096817472377fab4bed0d9434b6f (patch)
tree71f0b27c558e97014c309cd895e0e30182edfce8 /src
parentMerge pull request #33462 from s0nea/wip-dashboard-telemetry-report (diff)
parentos/bluestore: invoke _prepare_ondisk_format_super as the last op (diff)
downloadceph-84fbf1c5cddc096817472377fab4bed0d9434b6f.tar.xz
ceph-84fbf1c5cddc096817472377fab4bed0d9434b6f.zip
Merge pull request #34616 from ifed01/wip-ifed-fix-upgrade-super
os/bluestore: invoke _prepare_ondisk_format_super as the last op Reviewed-by: Greg Farnum <gfarnum@redhat
Diffstat (limited to 'src')
-rw-r--r--src/os/bluestore/BlueStore.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc
index fe617344530..be14eccb9fe 100644
--- a/src/os/bluestore/BlueStore.cc
+++ b/src/os/bluestore/BlueStore.cc
@@ -11048,6 +11048,7 @@ int BlueStore::_upgrade_super()
ceph_assert(ondisk_format > 0);
ceph_assert(ondisk_format < latest_ondisk_format);
+ KeyValueDB::Transaction t = db->get_transaction();
if (ondisk_format == 1) {
// changes:
// - super: added ondisk_format
@@ -11055,7 +11056,6 @@ int BlueStore::_upgrade_super()
// - super: added min_compat_ondisk_format
// - super: added min_alloc_size
// - super: removed min_min_alloc_size
- KeyValueDB::Transaction t = db->get_transaction();
{
bufferlist bl;
db->get(PREFIX_SUPER, "min_min_alloc_size", &bl);
@@ -11072,9 +11072,6 @@ int BlueStore::_upgrade_super()
t->rmkey(PREFIX_SUPER, "min_min_alloc_size");
}
ondisk_format = 2;
- _prepare_ondisk_format_super(t);
- int r = db->submit_transaction_sync(t);
- ceph_assert(r == 0);
}
if (ondisk_format == 2) {
// changes:
@@ -11084,19 +11081,18 @@ int BlueStore::_upgrade_super()
// - super: added per_pool_omap key, which indicates that *all* objects
// are using the new prefix and key format
ondisk_format = 3;
- KeyValueDB::Transaction t = db->get_transaction();
- _prepare_ondisk_format_super(t);
- int r = db->submit_transaction_sync(t);
- ceph_assert(r == 0);
}
if (ondisk_format == 3) {
// changes:
// - FreelistManager keeps meta within bdev label
int r = _write_out_fm_meta(0);
ceph_assert(r == 0);
-
ondisk_format = 4;
}
+ // This to be the last operation
+ _prepare_ondisk_format_super(t);
+ int r = db->submit_transaction_sync(t);
+ ceph_assert(r == 0);
}
// done
dout(1) << __func__ << " done" << dendl;