]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore_tool: bluefs-bdev-expand: indicate bypassed for main dev 27912/head
authorIgor Fedotov <ifedotov@suse.com>
Mon, 8 Apr 2019 18:54:25 +0000 (21:54 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Wed, 1 May 2019 22:44:17 +0000 (01:44 +0300)
Pre-nautilis releases are unable to expand main device but they do not
 report about that hence user thinks expansion succeeds. Which is confusing.

Fixes: https://tracker.ceph.com/issues/39144
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit 386d51f04f6f3976df7f003dccb2be1b42ad867f)

src/os/bluestore/bluestore_tool.cc

index 746ba8222ba90045fd642638af1771eff2352a09..528a868417888a4c6bee518119af339a62e5e6a7 100644 (file)
@@ -479,13 +479,15 @@ int main(int argc, char **argv)
     BlueFS *fs = open_bluefs(cct.get(), path, devs);
     fs->dump_block_extents(cout);
     cout << "Expanding..." << std::endl;
-    for (int devid : { BlueFS::BDEV_WAL, BlueFS::BDEV_DB }) {
+
+    // enumerate BDEV_SLOW to report it's unexpandable only
+    for (int devid : { BlueFS::BDEV_WAL, BlueFS::BDEV_DB, BlueFS::BDEV_SLOW }) {
       if (!fs->is_device(devid)) {
         continue;
       }
       if (!fs->is_device_expandable(devid)) {
        cout << devid
-            << " : can't be expanded. Bypassing..."
+            << " : unable to expand. Bypassed."
             << std::endl;
        continue;
       }
@@ -522,6 +524,11 @@ int main(int argc, char **argv)
        cout << devid
             <<" : size label updated to " << size
             << std::endl;
+      } else {
+       cout << devid
+            << " : no changes detected. Bypassed."
+            << std::endl;
+       continue;
       }
     }
     delete fs;