All of lore.kernel.org
 help / color / mirror / Atom feed
From: Graham Cobb <g.btrfs@cobb.uk.net>
To: Nikolay Borisov <nborisov@suse.com>,
	dsterba@suse.cz, Martin Raiber <martin@urbackup.org>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2] btrfs: Remove received information from snapshot on ro->rw switch
Date: Thu, 9 Sep 2021 10:37:01 +0100	[thread overview]
Message-ID: <b15813b9-bd23-e2a5-b8a4-1c2fcbb0e019@cobb.uk.net> (raw)
In-Reply-To: <50fea163-afe6-bb4a-04c5-f3e4ed4c6bd3@suse.com>

On 09/09/2021 07:46, Nikolay Borisov wrote:
> 
> 
> On 9.09.21 г. 0:24, Graham Cobb wrote:
>>
>> On 08/09/2021 19:33, David Sterba wrote:
>>> On Wed, Sep 08, 2021 at 04:34:47PM +0000, Martin Raiber wrote:
>>
>> <snip>
>>
>>>> For example I had the problem of partial subvols after a sudden
>>>> restart during receive. No problem, just receive to a directory that
>>>> gets deleted on startup then move the subvol to the final location
>>>> after completion. To move the subvol it needs to be temporarily set rw
>>>> for some reason. I'm sure there is some better solution but patterns
>>>> like this might be out there.
>>>
>>> Thanks, that's a case we should take into account. And there are
>>> probably more, but I'm not using send/receive much so that's another
>>> reason why I've been hesitant to merge the patch due to lack of
>>> understanding of the use case.
>>>
>>
>> This seems to be an important change to make, but is user-affecting. A
>> few ideas:
>>
>> 1) Can it be made optional? On by default but possible to turn off
>> (mount option, sys file, ...) if you really need to retain the current
>> behaviour.
> 
> But the current behavior is buggy and non-intentional so it should be
> rectified. Basically we've made it easy for users to do something which
> they shouldn't really be doing, they then bear the consequences and come
> to the mailing list for support thinking something is broken.

Yes, I agree completely. I was disappointed the change wasn't made last
time this was discussed on the list. But it wasn't. And I think that was
because of concern over the impact: the change will break some users'
workflows or scripts and could break some important tools, apps or
things like distro installation/upgrade scripts. That was the purpose of
my suggestions: to break down barriers which might delay making this happen.

>> 2) Is there a way to engage with the developers and user community for
>> popular tools which make heavy use of snapshotting and/or send/receive
>> for discussion and testing? For example, btrbk, snapper, distros.

The point of this suggestion was to address David's concern of not
understanding the use case. This could be useful when discussing the
timing of the fix (and whether it can be backported to stable kernels).

>> 3) How about adding an IOCTL to allow the user to set/delete the
>> received_uuid? Only intended for cases which really need to emulate the
>> removed behaviour. This could be a less complex long term solution than
>> keeping option 1 indefinitely.

And this suggestion was to make it "possible" to work round the change
but, in practice, harder than just doing the right thing :-) I agree
this is probably too far.

Graham




  reply	other threads:[~2021-09-09  9:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 13:51 [PATCH v2] btrfs: Remove received information from snapshot on ro->rw switch Nikolay Borisov
2021-09-08 14:08 ` Filipe Manana
2021-09-08 16:34 ` Martin Raiber
2021-09-08 18:33   ` David Sterba
2021-09-08 21:24     ` Graham Cobb
2021-09-09  6:46       ` Nikolay Borisov
2021-09-09  9:37         ` Graham Cobb [this message]
2021-09-09 15:39           ` Martin Raiber
2021-09-09 12:24       ` Andrei Borzenkov
2021-09-09  8:22     ` Filipe Manana
2021-09-10  5:14 ` Qu Wenruo

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=b15813b9-bd23-e2a5-b8a4-1c2fcbb0e019@cobb.uk.net \
    --to=g.btrfs@cobb.uk.net \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=martin@urbackup.org \
    --cc=nborisov@suse.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 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.