linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: mail@dieterries.net
To: dave@jikos.cz
Cc: "Dieter Ries" <mail@dieterries.net>,
	chris.mason@fusionio.com, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 3/4] btrfs-progs: btrfsck: Print feedback about fscking to stdout.
Date: Thu, 11 Oct 2012 22:50:51 +0200	[thread overview]
Message-ID: <0a76c1f5c0474ef27b0863f93aeaf41d.squirrel@webmail.psioc.net> (raw)
In-Reply-To: <20121009152153.GU4405@twin.jikos.cz>

Hi,

> I agree that the important messages from fsck process should be printed
> to stdout, and the rest like 'cannot find a valid fs on /dev' belong to
> stderr so the user can simply call
>
>   btrfsck > logfile
>
> and does not miss any messages in the log, while will be informed that
> the process cannot proceed for some urgent reason.

That's what I thought as well. I started small, but IMHO, a lot of the
output of btrfsck should go to stdout instead of stderr

Is there a general agreement on that for a fsck utility, it is normal
output, if the filesystem is damaged, and really only stuff which makes
the checking stop abnormally should go to stderr?

Also, right now there is a very mixed level of verbosity used. I was
thinking about adding a '-v' option, and making some of the output
conditional on that. The normal enduser will not really care about the
number of csum bytes, and as a dev you can still alias the -v.

> I think doing the stdout/stderr split properly would need more than
> fixing btrfsck.c, it uses code from other .c files, looks like an
> overhaul of the logging in the whole codebase.

I haven't looked into many other files there, but maybe you are right. I
started with btrfsck.c because I think it's a nice entry point.

> david

Cheers,

Dieter


  reply	other threads:[~2012-10-11 20:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-08 19:07 [PATCH 0/4] Resend: btrfs-progs: Some cosmetic changes (mainly) to btrfsck Dieter Ries
2012-10-08 19:07 ` [PATCH 1/4] btrfs-progs: Remove redundant "Btrfs" string from version string Dieter Ries
2012-10-08 19:07 ` [PATCH 2/4] btrfs-progs: btrfsck: Print which filesystem to be checked to stdout Dieter Ries
2012-10-09 15:08   ` David Sterba
2012-10-14 15:15     ` [PATCH 3/4] btrfs-progs: btrfsck: Print feedback about fscking " Dieter Ries
2012-10-14 15:18       ` Dieter Ries
2012-10-14 15:17     ` [PATCH 2/4] btrfs-progs: btrfsck: Print which filesystem to be checked " Dieter Ries
2012-10-08 19:07 ` [PATCH 3/4] btrfs-progs: btrfsck: Print feedback about fscking " Dieter Ries
2012-10-09 15:21   ` David Sterba
2012-10-11 20:50     ` mail [this message]
2012-10-08 19:07 ` [PATCH 4/4] btrfs-progs: btrfsck: Remove binary error code output Dieter Ries

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=0a76c1f5c0474ef27b0863f93aeaf41d.squirrel@webmail.psioc.net \
    --to=mail@dieterries.net \
    --cc=chris.mason@fusionio.com \
    --cc=dave@jikos.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).