All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: linux-btrfs@vger.kernel.org
Cc: dsterba@suse.cz
Subject: [PATCH 8/8] btrfs-progs: scrub cancel: add quiet option
Date: Mon,  8 Jun 2020 14:38:51 +0800	[thread overview]
Message-ID: <20200608063851.8874-9-anand.jain@oracle.com> (raw)
In-Reply-To: <20200608063851.8874-1-anand.jain@oracle.com>

Enable the quiet option to the btrfs(8) scrub cancel command.
Does the job quietly. For example:
	btrfs -q scrub cancel <mnt>

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 cmds/scrub.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cmds/scrub.c b/cmds/scrub.c
index e3b6427b47ae..3256f20121ae 100644
--- a/cmds/scrub.c
+++ b/cmds/scrub.c
@@ -1624,6 +1624,8 @@ static DEFINE_SIMPLE_COMMAND(scrub_start, "start");
 static const char * const cmd_scrub_cancel_usage[] = {
 	"btrfs scrub cancel <path>|<device>",
 	"Cancel a running scrub",
+	HELPINFO_INSERT_GLOBALS,
+	HELPINFO_INSERT_QUIET,
 	NULL
 };
 
@@ -1660,7 +1662,7 @@ static int cmd_scrub_cancel(const struct cmd_struct *cmd, int argc, char **argv)
 	}
 
 	ret = 0;
-	printf("scrub cancelled\n");
+	pr_verbose(-1, "scrub cancelled\n");
 
 out:
 	close_file_or_dir(fdmnt, dirstream);
-- 
2.25.1


      parent reply	other threads:[~2020-06-08  6:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-08  6:38 [PATCH 0/8 PART2] btrfs-progs: add quiet option Anand Jain
2020-06-08  6:38 ` [PATCH 1/8] btrfs-progs: quota rescan: " Anand Jain
2020-06-10  8:30   ` David Sterba
2020-06-11 13:16     ` Anand Jain
2020-06-11 14:10       ` David Sterba
2020-06-08  6:38 ` [PATCH 2/8] btrfs-progs: subvolume create: " Anand Jain
2020-06-08  6:38 ` [PATCH 3/8] btrfs-progs: subvolume delete: " Anand Jain
2020-06-08  6:38 ` [PATCH 4/8] btrfs-progs: balance start: " Anand Jain
2020-06-08  6:38 ` [PATCH 5/8] btrfs-progs: balance resume: " Anand Jain
2020-06-08  6:38 ` [PATCH 6/8] btrfs-progs: subvolume snapshot: " Anand Jain
2020-06-08  6:38 ` [PATCH 7/8] btrfs-progs: scrub start|resume: use global " Anand Jain
2020-06-08  6:38 ` Anand Jain [this message]

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=20200608063851.8874-9-anand.jain@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.