]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: introduce debug parameter to bypass bdev verification
authorIgor Fedotov <ifedotov@mirantis.com>
Fri, 26 May 2017 12:55:47 +0000 (05:55 -0700)
committerIgor Fedotov <ifedotov@mirantis.com>
Thu, 8 Jun 2017 11:38:47 +0000 (04:38 -0700)
E.g. this allows to backup WAL/DB volumes after preconditioning and quickly rollback to that state when needed.

Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
src/common/config_opts.h
src/os/bluestore/BlueStore.cc

index 6d8febf0dc5560cb3b8bc95ae2f101b8a7cc809a..c5dceea0649ee4e75f8bb43dc0ad9521518736a3 100644 (file)
@@ -1173,6 +1173,7 @@ OPTION(bluestore_debug_inject_read_err, OPT_BOOL, false)
 OPTION(bluestore_debug_randomize_serial_transaction, OPT_INT, 0)
 OPTION(bluestore_debug_omit_block_device_write, OPT_BOOL, false)
 OPTION(bluestore_debug_fsck_abort, OPT_BOOL, false)
+OPTION(bluestore_debug_permit_any_bdev_label, OPT_BOOL, false)
 OPTION(bluestore_shard_finishers, OPT_BOOL, false)
 
 OPTION(kstore_max_ops, OPT_U64, 512)
index 26bd3dac20e1401cdfe1a6da5d048bc32e656b99..3904737aa0b4c303512af793d0999dcffa468c8e 100644 (file)
@@ -3823,7 +3823,11 @@ int BlueStore::_check_or_set_bdev_label(
     int r = _read_bdev_label(cct, path, &label);
     if (r < 0)
       return r;
-    if (label.osd_uuid != fsid) {
+    if (cct->_conf->bluestore_debug_permit_any_bdev_label) {
+      dout(20) << __func__ << " bdev " << path << " fsid " << label.osd_uuid
+          << " and fsid " << fsid << " check bypassed" << dendl;
+    }
+    else if (label.osd_uuid != fsid) {
       derr << __func__ << " bdev " << path << " fsid " << label.osd_uuid
           << " does not match our fsid " << fsid << dendl;
       return -EIO;