]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/rados: Unmask '-o' to restore original behaviour 33641/head
authorBrad Hubbard <bhubbard@redhat.com>
Fri, 1 Nov 2019 01:08:36 +0000 (11:08 +1000)
committerKefu Chai <kchai@redhat.com>
Sat, 28 Mar 2020 12:06:12 +0000 (20:06 +0800)
0b369e1aff1 masked the original behaviour of '-o' which was to indicate
'outfile' as documented in the man page. Changing object-size to capital
o will restore the original behaviour.

Fixes: https://tracker.ceph.com/issues/42477
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
(cherry picked from commit d2b806070de5f56474283035a7ffc91fe96afbab)

Conflicts:
PendingReleaseNotes: trivial resolution

PendingReleaseNotes
doc/man/8/rados.rst
qa/tasks/radosbench.py
src/tools/rados/rados.cc

index a48aee634ab4c94bd85adda87a4aeaf1f368367a..46f33bc5da97311a87b40634895bc62f8a6282d3 100644 (file)
@@ -14,4 +14,9 @@
 
     ceph osd pool set <pool-name> pg_autoscale_mode warn
 
+* The behaviour of the ``-o`` argument to the rados tool has been reverted to
+  its orignal behaviour of indicating an output file. This reverts it to a more
+  consistent behaviour when compared to other tools. Specifying object size is now
+  accomplished by using an upper case O ``-O``.
+
 * The format of MDSs in `ceph fs dump` has changed.
index 36b6c0b3e3610bb1d9b582b7f61cdebf79640b7d..710be7354fad268c6503d7765ef6e7b146469532 100644 (file)
@@ -71,6 +71,10 @@ Options
    Available for stat, stat2, get, put, append, truncate, rm, ls
    and all xattr related operation
 
+.. option:: -O object_size
+
+   Set the object size for put/get ops and for write benchmarking
+
 
 Global commands
 ===============
index 0ae705134913ce9606f86c39e28314ffc16f834b..1a8a0ab19bfd188620456c75cf6b04d0f92518a1 100644 (file)
@@ -80,7 +80,7 @@ def task(ctx, config):
         if osize is 0:
             objectsize = []
         else:
-            objectsize = ['-o', str(osize)]
+            objectsize = ['-O', str(osize)]
         size = ['-b', str(config.get('size', 65536))]
         # If doing a reading run then populate data
         if runtype != "write":
index 6ec1df98d5039243cf80b3a12f84613999da4de4..c97671d7c02f3dbf35aa4357ccdee62d388ec85b 100644 (file)
@@ -181,7 +181,7 @@ void usage(ostream& out)
 "   --format=[--format plain|json|json-pretty]\n"
 "   -b op_size\n"
 "        set the block size for put/get ops and for write benchmarking\n"
-"   -o object_size\n"
+"   -O object_size\n"
 "        set the object size for put/get ops and for write benchmarking\n"
 "   --max-objects\n"
 "        set the max number of objects for write benchmarking\n"
@@ -3960,7 +3960,7 @@ int main(int argc, const char **argv)
       opts["max-objects"] = val;
     } else if (ceph_argparse_witharg(args, i, &val, "--offset", (char*)NULL)) {
       opts["offset"] = val;
-    } else if (ceph_argparse_witharg(args, i, &val, "-o", (char*)NULL)) {
+    } else if (ceph_argparse_witharg(args, i, &val, "-O", (char*)NULL)) {
       opts["object-size"] = val;
     } else if (ceph_argparse_witharg(args, i, &val, "-s", "--snap", (char*)NULL)) {
       opts["snap"] = val;