From: Chris Murphy <lists@colorremedies.com>
To: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Cc: Dennis K <dennisk@netspace.net.au>,
Andrei Borzenkov <arvidjaar@gmail.com>
Subject: Re: Incremental receive completes succesfully despite missing files
Date: Mon, 21 Jan 2019 21:54:19 -0700 [thread overview]
Message-ID: <CAJCQCtScPtJ=agTJbunPG9GT4hQg5VQWMOEM_JAyLseNKraqNw@mail.gmail.com> (raw)
In-Reply-To: <CAJCQCtSOBcK=MXLUFVZk6YCrFx60UEH7PgOtPYbcRkfjG0XDyQ@mail.gmail.com>
On Mon, Jan 21, 2019 at 3:23 PM Chris Murphy <lists@colorremedies.com> wrote:
> If <parent> has a UUID of 54321, I expect that <subvol> must have
> Parent UUID of 54321, or the send command should fail.
OK I think the following is a reproducible bug.
# btrfs sub create 1
# btrfs sub create 2
# touch 1/one
# touch 2/two
# btrfs sub snap -r 1 1.ro1
# btrfs sub snap -r 2 2.ro1
# touch 1/oneone
# touch 2/twotwo
# btrfs sub snap -r 1 1.ro2
# btrfs sub snap -r 2 2.ro2
# btrfs send 1.ro1 | ssh chris@fnuc.local "sudo btrfs receive /srv/scratch/"
At subvol 1.ro1
At subvol 1.ro1
# btrfs send 2.ro1 | ssh chris@fnuc.local "sudo btrfs receive /srv/scratch/"
At subvol 2.ro1
At subvol 2.ro1
# btrfs send -p 1.ro1 2.ro2 | ssh chris@fnuc.local "sudo btrfs receive
/srv/scratch/"
At subvol 2.ro2
At snapshot 2.ro2
#
I expect the last command to fail because 1.ro1 is not the parent of
2.ro2. The command completes, and 2.ro2 is on the destination, and at
least in this simple example it contains the expected files. However
'btrfs show' indicates that the "parent UUID" of 2.ro2 is the "UUID"
of 1.ro1, which is definitely wrong. So it's a legit bug, not just a
cosmetic problem due to lack of error checking.
$ ls -l 1.ro1
total 0
-rw-rw-r--. 1 chris chris 0 Jan 21 21:41 one
$ ls -l 2.ro1
total 0
-rw-rw-r--. 1 chris chris 0 Jan 21 21:41 two
$ ls -l 2.ro2
total 0
-rw-rw-r--. 1 chris chris 0 Jan 21 21:41 two
-rw-rw-r--. 1 chris chris 0 Jan 21 21:41 twotwo
$
fnuc.local chris / srv scratch sudo btrfs sub show 1.ro1
scratch/1.ro1
Name: 1.ro1
UUID: eb0bb290-3f7d-d34d-94c3-1ed9da96f2fa
Parent UUID: -
Received UUID: b965a4b6-e77d-714b-af0e-83e15e734fd5
Creation time: 2019-01-21 21:43:04 -0700
Subvolume ID: 3107
Generation: 25788
Gen at creation: 25782
Parent ID: 2039
Top level ID: 2039
Flags: readonly
Snapshot(s):
scratch/2.ro2
fnuc.local chris / srv scratch sudo btrfs sub show 1.ro2
ERROR: cannot find real path for '1.ro2': No such file or directory
fnuc.local chris / srv scratch sudo btrfs sub show 2.ro1
scratch/2.ro1
Name: 2.ro1
UUID: ce0d762a-d4ea-6448-aa71-1573d70fe60e
Parent UUID: -
Received UUID: d382f4f9-23c9-394e-852d-ecbe9a95fa75
Creation time: 2019-01-21 21:43:15 -0700
Subvolume ID: 3108
Generation: 25786
Gen at creation: 25785
Parent ID: 2039
Top level ID: 2039
Flags: readonly
Snapshot(s):
fnuc.local chris / srv scratch sudo btrfs sub show 2.ro2
scratch/2.ro2
Name: 2.ro2
UUID: 165a4a66-0600-3b49-80aa-edae8fd850d9
Parent UUID: eb0bb290-3f7d-d34d-94c3-1ed9da96f2fa
Received UUID: b8343d21-882f-bf47-ac61-b59e53b126a4
Creation time: 2019-01-21 21:43:38 -0700
Subvolume ID: 3109
Generation: 25789
Gen at creation: 25788
Parent ID: 2039
Top level ID: 2039
Flags: readonly
Snapshot(s):
fnuc.local chris / srv scratch
--
Chris Murphy
next prev parent reply other threads:[~2019-01-22 4:54 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 [this message]
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
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='CAJCQCtScPtJ=agTJbunPG9GT4hQg5VQWMOEM_JAyLseNKraqNw@mail.gmail.com' \
--to=lists@colorremedies.com \
--cc=arvidjaar@gmail.com \
--cc=dennisk@netspace.net.au \
--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 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.