From: Chris Webb <chris@arachsys.com>
To: Kent Overstreet <kent.overstreet@gmail.com>,
linux-bcachefs@vger.kernel.org
Subject: [PATCH] [bcachefs-tools] Cosmetic fixes for device resize-journal
Date: Sun, 24 Oct 2021 13:52:32 +0100 [thread overview]
Message-ID: <20211024125232.GH11670@arachsys.com> (raw)
Correct the operation name from 'journal-resize' to 'resize-journal' in the
bcachefs usage summary, matching the command that is actually implemented.
Fix the size argument so it isn't optional. Defaulting to the entire device
makes sense for 'device resize', to automatically expand the fs to fill the
block device. However, it is never meaningful (or possible) to expand the
journal to the full disk.
Signed-off-by: Chris Webb <chris@arachsys.com>
---
bcachefs.c | 2 +-
cmd_device.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/bcachefs.c b/bcachefs.c
index 1a06c17..2b004a0 100644
--- a/bcachefs.c
+++ b/bcachefs.c
@@ -56,7 +56,7 @@ static void usage(void)
" device evacuate Migrate data off of a specific device\n"
" device set-state Mark a device as failed\n"
" device resize Resize filesystem on a device\n"
- " device journal-resize Resize journal on a device\n"
+ " device resize-journal Resize journal on a device\n"
"\n"
"Commands for managing subvolumes and snapshots:\n"
" subvolume create Create a new subvolume\n"
diff --git a/cmd_device.c b/cmd_device.c
index 3bdb281..87d8507 100644
--- a/cmd_device.c
+++ b/cmd_device.c
@@ -539,7 +539,7 @@ int cmd_device_resize(int argc, char *argv[])
static void device_resize_journal_usage(void)
{
puts("bcachefs device resize-journal \n"
- "Usage: bcachefs device resize-journal device [ size ]\n"
+ "Usage: bcachefs device resize-journal device size\n"
"\n"
"Options:\n"
" -h, --help display this help and exit\n"
@@ -571,7 +571,7 @@ int cmd_device_resize_journal(int argc, char *argv[])
char *size_arg = arg_pop();
if (!size_arg)
- size = get_size(dev, dev_fd);
+ die("Please supply a journal size");
else if (bch2_strtoull_h(size_arg, &size))
die("invalid size");
next reply other threads:[~2021-10-24 12:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-24 12:52 Chris Webb [this message]
2021-10-24 15:40 ` [PATCH] [bcachefs-tools] Cosmetic fixes for device resize-journal Kent Overstreet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211024125232.GH11670@arachsys.com \
--to=chris@arachsys.com \
--cc=kent.overstreet@gmail.com \
--cc=linux-bcachefs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox