linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dennis Katsonis <dennisk@netspace.net.au>
To: Andrei Borzenkov <arvidjaar@gmail.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Incremental receive completes succesfully despite missing files
Date: Thu, 24 Jan 2019 00:52:58 +1100	[thread overview]
Message-ID: <b36e4ef6-6f07-1430-45a0-df9d44d472fe@netspace.net.au> (raw)
In-Reply-To: <CAA91j0VSd=uC7ROT2+JsRszzAXWz+ti-Kf3hyw+aVS03sdn95g@mail.gmail.com>

On 1/23/19 10:25 PM, Andrei Borzenkov wrote:
> On Wed, Jan 23, 2019 at 1:45 PM Dennis Katsonis <dennisk@netspace.net.au> wrote:
>> I think my previous e-mail did not go through.  Basically, if it is
>> assumed that a btrfs-receive operation will result in a subvolume which
>> matches the source file for file, then this assumption or expectation
>> won't be met if one deletes files from the subvolume at the receiving
>> end which is going to be referred to as the parent.
>>
> 
> This is oxymoron. btrfs send/receive apply to read-only subvolumes.
> You are not able to modify them. 


> 
>> This can happen inadvertently,
> 
> It cannot. You do not inadvertently make subvolume read-write. 
It's not the individual steps which happen inadvertently, its that
particular workflow which can happen (i.e.; someone decides to play
around with a replicated snapshot, and flips the ro bit to do so).  Any
subsequent children sent later won't be true replicates on the receiving
end.

They would have to either make a habit of not flipping that ro bit at
all (there is nothing to say don't do it, and there are valid reasons to
do so) or anticipate they may need that subvolume as a parent anytime in
the future and that parents must be the same on both ends (there is
nothing which states that parents have to be identical on both ends for
btrfs-receive to operate).  If they do modify ANY subvolume created by
btrfs-receive, they must remember in the future somehow never to use
them as parents.

BTRFS allows an ad-hoc, unstructured approach to managing snapshots and
replication, but the cost I suppose is there are more corner cases and
more potential for users to use the system in a manner which differs
from the devs.


> 
> That said, better if btrfs did not allow flipping read-only bit in the
> first place.
> 
>> or even through filesystem corruption
>> (which I experienced).
>>
> 
> And if corruption happened after applying changes? End result in the
> same. Of course it would be perfect if btrfs could notice and warn
> you, I just do not see how it can realistically be implemented.
>If the tools can't prevent it, the documentation should, and should also
ideally describe the mode of failure (i.e., if the subvolumes are
different, btrfs-receive won't necessarily fail, but can produce a
subvolume which is not identical to that sent.

At the moment, one must infer that the statement that clones must be
identical at both ends.

  reply	other threads:[~2019-01-23 13:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-20 10:25 Incremental receive completes succesfully despite missing files Dennis K
2019-01-20 14:04 ` Andrei Borzenkov
2019-01-21 22:23 ` Chris Murphy
2019-01-22  4:36   ` Chris Murphy
2019-01-22  4:54   ` Chris Murphy
2019-01-22  6:00     ` Remi Gauvin
2019-01-22  6:28       ` Chris Murphy
2019-01-22 17:57         ` Andrei Borzenkov
2019-01-22 19:37           ` Chris Murphy
2019-01-22 19:45             ` Hugo Mills
2019-01-23 10:44   ` Dennis Katsonis
2019-01-23 11:25     ` Andrei Borzenkov
2019-01-23 13:52       ` Dennis Katsonis [this message]
2019-01-23 18:17         ` Andrei Borzenkov
2019-01-23 15:25       ` Hans van Kranenburg
2019-01-23 15:32         ` Nikolay Borisov
2019-01-23 16:23           ` Hans van Kranenburg
2019-01-24 10:40             ` Dennis K
2019-01-24 17:22               ` Chris Murphy
2019-01-26  2:43                 ` Dennis Katsonis
2019-01-26 23:09                   ` Chris Murphy
2019-01-27  1:58                     ` Dennis Katsonis
2019-01-23 15:40         ` Remi Gauvin
2019-01-23 16:59           ` Hans van Kranenburg

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=b36e4ef6-6f07-1430-45a0-df9d44d472fe@netspace.net.au \
    --to=dennisk@netspace.net.au \
    --cc=arvidjaar@gmail.com \
    --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).