]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/ceph-bluestore-tool: unify output for bluefs-bdev-expand command. 25348/head
authorIgor Fedotov <ifedotov@suse.com>
Fri, 23 Nov 2018 11:57:52 +0000 (14:57 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Mon, 3 Dec 2018 11:10:39 +0000 (14:10 +0300)
This commit is specific for pre-Nautilius releases (mimic & luminous)
as we don't backport main device expansion feature. Which
makes this mimic/luminous commit completely different from nautilus one.

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
src/os/bluestore/bluestore_tool.cc

index a8ad208ab1dc2137efb5c6a567ffa430c6c64f94..c8e834356abf1c40a88a435056d10cd60f9a31e4 100644 (file)
@@ -493,15 +493,15 @@ int main(int argc, char **argv)
   }
   else if (action == "bluefs-bdev-expand") {
     BlueFS *fs = open_bluefs(cct.get(), path, devs);
-    cout << "start:" << std::endl;
     fs->dump_block_extents(cout);
+    cout << "Expanding..." << std::endl;
     for (int devid : { BlueFS::BDEV_WAL, BlueFS::BDEV_DB }) {
       if (!fs->is_device(devid)) {
         continue;
       }
       if (!fs->is_device_expandable(devid)) {
        cout << devid
-            << " : can't be expanded."
+            << " : can't be expanded. Bypassing..."
             << std::endl;
        continue;
       }
@@ -511,12 +511,14 @@ int main(int argc, char **argv)
       uint64_t end = before.range_end();
       uint64_t size = fs->get_block_device_size(devid);
       if (end < size) {
-       cout << "expanding dev " << devid << " from 0x" << std::hex
+       cout << devid
+            <<" : expanding " << " from 0x" << std::hex
             << end << " to 0x" << size << std::dec << std::endl;
        fs->add_block_extent(devid, end, size-end);
        const char* path = find_device_path(devid, cct.get(), devs);
        if (path == nullptr) {
-         cerr << "Can't find device path for dev " << devid << std::endl;
+         cerr << devid
+              <<": can't find device path " << std::endl;
          continue;
        }
        bluestore_bdev_label_t label;
@@ -533,8 +535,9 @@ int main(int argc, char **argv)
                << cpp_strerror(r) << std::endl;
          continue;
        }
-       cout << "dev " << devid << " size label updated to "
-             << size << std::endl;
+       cout << devid
+            <<" : size label updated to " << size
+            << std::endl;
       }
     }
     delete fs;