]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore_tool: bluefs-bdev-expand: indicate bypassed for main dev 27447/head
authorIgor Fedotov <ifedotov@suse.com>
Mon, 8 Apr 2019 18:54:25 +0000 (21:54 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Wed, 24 Apr 2019 10:35:46 +0000 (13:35 +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>
src/os/bluestore/bluestore_tool.cc

index b8ac75e9292e7abd42474bd488d584fc19a71a51..8f49fe5280c8409daf613065db82c8aa5e0ce8e4 100644 (file)
@@ -495,13 +495,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;
       }
@@ -538,6 +540,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;