linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Graham Cobb <g.btrfs@cobb.uk.net>
To: Chris Murphy <lists@colorremedies.com>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Scrub resume regression
Date: Fri, 17 Jan 2020 19:39:02 +0000	[thread overview]
Message-ID: <5a0ee78c-31a1-d12f-5816-9155adf19ebe@cobb.uk.net> (raw)
In-Reply-To: <CAJCQCtTZMSzNosnognWCyBU+iJ4La=0EG0xBKHEPSDdaAAqt4A@mail.gmail.com>

On 17/01/2020 18:39, Chris Murphy wrote:
> It's no one's fault, it's just confusing. :P
> 
> Cancel word origin means more than stop, implies resetting state, to
> obliterate or invalidate.
> 
> Pause and stop word origin suggests they're interchangeable, but in
> practice with digital audio and video consumer gear, stop has come to
> mean a kind of cancel. (I'm gonna ignore tape.) Where a start from a
> stop will start at the very beginning. Whereas pause saves state and
> unpause means resume.
> 
> Lightweight change, add new command stop, which saves state, and
> cancel is an alias for backward compatibility. No other change.

That seems fairly pointless.

> Moderate change:
> start = alias resume

start and resume do different things today. The distinction is important
as the "saved state" after a cancel stays around until the next scrub
starts (it could be months old).

> stop = alias cancel
> i.e. a stop then start does the same thing as a cancel then resume,
> unless new command 'reset' is used
> reset = stops, and resets state to the beginning

That really isn't useful. It is much more useful to be able to decide
whether to use the saved state at start time than it is to decide
whether to save state at stop time. To build on Zygo's example, I might
have a script which pauses the scrub when the system load goes up and
then decides whether to resume it or restart from scratch depending on
how long it has been paused for. Also, the saved state can be inspected
while the scrub is paused to allow the operator to estimate how long it
might take to complete.

> Heavier change that's linguistically sane, but breaks expectations of
> today's cancel:
> pause and unpause (alias resume), and start and stop (alias cancel).
> The former is stateful, and the latter is stateless.

Changing the meaning of the current start, resume, or cancel commands
isn't an option - these are built into user scripts.


      reply	other threads:[~2020-01-17 19:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15  9:03 Scrub resume regression Graham Cobb
2020-01-15  9:33 ` Filipe Manana
2020-01-15 11:55   ` Graham Cobb
2020-01-15 12:51 ` David Sterba
2020-01-15 13:10   ` Holger Hoffstätte
2020-01-15 21:02     ` Sebastian Döring
2020-01-16 14:02     ` David Sterba
2020-01-17 15:59       ` Zygo Blaxell
2020-01-17 18:39         ` Chris Murphy
2020-01-17 19:39           ` Graham Cobb [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=5a0ee78c-31a1-d12f-5816-9155adf19ebe@cobb.uk.net \
    --to=g.btrfs@cobb.uk.net \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.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).