linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Noah Massey <noah.massey@gmail.com>
Cc: David Sterba <dsterba@suse.com>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] btrfs-progs: add safety delay before starting full balance
Date: Wed, 4 May 2016 17:31:03 +0200	[thread overview]
Message-ID: <20160504153103.GY29353@twin.jikos.cz> (raw)
In-Reply-To: <CADfjVrjY246makTpiW398C5fM1D7uwrJAmMNt+aZCyEnY_u7jA@mail.gmail.com>

On Mon, May 02, 2016 at 10:09:48AM -0400, Noah Massey wrote:
> > +       if (!(flags & BALANCE_START_FILTERS) && !(flags & BALANCE_START_NOWARN)) {
> > +               int delay = 10;
> > +
> > +               printf("WARNING:\n\n");
> > +               printf("\tFull balance without filters requested. This operation is very\n");
> > +               printf("\tintense and takes potentially very long. It is recommended to\n");
> > +               printf("\tuse the balance filters to narrow down the balanced data.\n");
> > +               printf("\tUse 'btrfs balance start --full-balance' option to skip this\n");
> > +               printf("\twarning. The operation will start in %d seconds.\n", delay);
> > +               printf("\tUse Ctrl-C to stop it.\n");
> > +               while (delay) {
> > +                       sleep(1);
> > +                       printf("%2d", delay--);
> > +                       fflush(stdout);
> > +               }
> 
> Shouldn't the sleep be after the fflush?

Yes it looks better when there's a delay after '1' appears. Care to send
a patch?

      reply	other threads:[~2016-05-04 15:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-02  8:33 [PATCH] btrfs-progs: add safety delay before starting full balance David Sterba
2016-05-02 14:09 ` Noah Massey
2016-05-04 15:31   ` David Sterba [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=20160504153103.GY29353@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=noah.massey@gmail.com \
    /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).