From 2b367774e6348d70a182452471af5338a607dc68 Mon Sep 17 00:00:00 2001 From: Brad Hubbard Date: Fri, 1 Nov 2019 11:08:36 +1000 Subject: [PATCH] tools/rados: Unmask '-o' to restore original behaviour 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 (cherry picked from commit d2b806070de5f56474283035a7ffc91fe96afbab) Conflicts: PendingReleaseNotes: trivial resolution --- PendingReleaseNotes | 5 +++++ doc/man/8/rados.rst | 4 ++++ qa/tasks/radosbench.py | 2 +- src/tools/rados/rados.cc | 4 ++-- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/PendingReleaseNotes b/PendingReleaseNotes index a48aee634ab4..46f33bc5da97 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -14,4 +14,9 @@ ceph osd pool set 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. diff --git a/doc/man/8/rados.rst b/doc/man/8/rados.rst index 36b6c0b3e361..710be7354fad 100644 --- a/doc/man/8/rados.rst +++ b/doc/man/8/rados.rst @@ -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 =============== diff --git a/qa/tasks/radosbench.py b/qa/tasks/radosbench.py index 0ae705134913..1a8a0ab19bfd 100644 --- a/qa/tasks/radosbench.py +++ b/qa/tasks/radosbench.py @@ -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": diff --git a/src/tools/rados/rados.cc b/src/tools/rados/rados.cc index 6ec1df98d503..c97671d7c02f 100644 --- a/src/tools/rados/rados.cc +++ b/src/tools/rados/rados.cc @@ -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; -- 2.47.3