* empty directory from previous subvolume in a snapshot is not sent|received
@ 2023-06-22 13:34 Christoph Anton Mitterer
2023-06-22 15:22 ` Andrei Borzenkov
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Anton Mitterer @ 2023-06-22 13:34 UTC (permalink / raw)
To: linux-btrfs
Hey.
Not sure whether this is a bug or expected.
On my btrfs I have subvolumes like:
data/
2023-06-21/
where e.g. data/ contains the root filesystem and 2023-06-21/ is a ro-
snapshot thereof.
When I created 2023-06-21/ from data/, the latter contained another
(rw-)subvolume data/pictures/, which I've deleted (actually: moved out
the files back to data/ and rmdir-ed the now empty subvol... or maybe I
did btrfs subvolume delete - not sure anymore) again after creating the
snapshot.
Now 2023-06-21/ contains an empty (non-subvolume) 2023-06-21/pictures/,
which is expected.
Today I've send|received 2023-06-21/ to another btrfs (at that point,
the original data/pictures/ subvolume was already gone), and diff -qr -
-no-dereference-ed the two afterwards.
Outcome (apart from "differing" files/sockets/block/char special files)
is that the target doesn't contain the empty pictures/ dir.
Not a big problem for me,... but is this expected or some kind of
strange bug?
Thanks,
Chris.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: empty directory from previous subvolume in a snapshot is not sent|received
2023-06-22 13:34 empty directory from previous subvolume in a snapshot is not sent|received Christoph Anton Mitterer
@ 2023-06-22 15:22 ` Andrei Borzenkov
2023-06-22 16:09 ` Christoph Anton Mitterer
0 siblings, 1 reply; 5+ messages in thread
From: Andrei Borzenkov @ 2023-06-22 15:22 UTC (permalink / raw)
To: Christoph Anton Mitterer, linux-btrfs
On 22.06.2023 16:34, Christoph Anton Mitterer wrote:
> Hey.
>
> Not sure whether this is a bug or expected.
>
> On my btrfs I have subvolumes like:
> data/
> 2023-06-21/
> where e.g. data/ contains the root filesystem and 2023-06-21/ is a ro-
> snapshot thereof.
>
>
> When I created 2023-06-21/ from data/, the latter contained another
> (rw-)subvolume data/pictures/, which I've deleted (actually: moved out
> the files back to data/ and rmdir-ed the now empty subvol... or maybe I
> did btrfs subvolume delete - not sure anymore) again after creating the
> snapshot.
>
>
> Now 2023-06-21/ contains an empty (non-subvolume) 2023-06-21/pictures/,
> which is expected.
>
>
> Today I've send|received 2023-06-21/ to another btrfs (at that point,
> the original data/pictures/ subvolume was already gone), and diff -qr -
> -no-dereference-ed the two afterwards.
>
> Outcome (apart from "differing" files/sockets/block/char special files)
> is that the target doesn't contain the empty pictures/ dir.
>
>
> Not a big problem for me,... but is this expected or some kind of
> strange bug?
>
>
I think it is expected. btrfs does not support either recursive
snapshots or recursive send so "btrfs send" skips directory entry that
points to subvolume root.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: empty directory from previous subvolume in a snapshot is not sent|received
2023-06-22 15:22 ` Andrei Borzenkov
@ 2023-06-22 16:09 ` Christoph Anton Mitterer
2023-06-23 4:55 ` Andrei Borzenkov
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Anton Mitterer @ 2023-06-22 16:09 UTC (permalink / raw)
To: linux-btrfs
On Thu, 2023-06-22 at 18:22 +0300, Andrei Borzenkov wrote:
> I think it is expected. btrfs does not support either recursive
> snapshots or recursive send so "btrfs send" skips directory entry
> that
> points to subvolume root.
Well it's clear that the sub-volume is not contained in the snapshot or
sent.
But in the snapshot (on the original fs) I have the empty directory
from the subvolume that was not recursively snapshotted.
Shouldn't that be just a plain empty directory... and thus be
sent|received (as empty directory) when I send|receive the snapshot?
Cheers,
Chris.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: empty directory from previous subvolume in a snapshot is not sent|received
2023-06-22 16:09 ` Christoph Anton Mitterer
@ 2023-06-23 4:55 ` Andrei Borzenkov
2023-06-23 18:10 ` Christoph Anton Mitterer
0 siblings, 1 reply; 5+ messages in thread
From: Andrei Borzenkov @ 2023-06-23 4:55 UTC (permalink / raw)
To: Christoph Anton Mitterer, linux-btrfs
On 22.06.2023 19:09, Christoph Anton Mitterer wrote:
> On Thu, 2023-06-22 at 18:22 +0300, Andrei Borzenkov wrote:
>> I think it is expected. btrfs does not support either recursive
>> snapshots or recursive send so "btrfs send" skips directory entry
>> that
>> points to subvolume root.
>
> Well it's clear that the sub-volume is not contained in the snapshot or
> sent.
>
> But in the snapshot (on the original fs) I have the empty directory
> from the subvolume that was not recursively snapshotted.
It is not directory. It is "orphan subvolume graft point" for the lack
of better term.
tw:/mnt # btrfs subvolume create ./data/pictures
Create subvolume './data/pictures'
tw:/mnt # btrfs subvolume snapshot data/ snap1
Create a snapshot of 'data/' in './snap1'
tw:/mnt # ll snap1
total 0
drwxr-xr-x 1 root root 0 Jun 23 07:53 pictures
tw:/mnt # touch snap1/pictures/foo
touch: cannot touch 'snap1/pictures/foo': Permission denied
tw:/mnt #
> Shouldn't that be just a plain empty directory... and thus be
> sent|received (as empty directory) when I send|receive the snapshot?
>
>
> Cheers,
> Chris.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: empty directory from previous subvolume in a snapshot is not sent|received
2023-06-23 4:55 ` Andrei Borzenkov
@ 2023-06-23 18:10 ` Christoph Anton Mitterer
0 siblings, 0 replies; 5+ messages in thread
From: Christoph Anton Mitterer @ 2023-06-23 18:10 UTC (permalink / raw)
To: linux-btrfs
Hey.
On Fri, 2023-06-23 at 07:55 +0300, Andrei Borzenkov wrote:
> It is not directory. It is "orphan subvolume graft point" for the
> lack
> of better term.
Ah I see. Thanks.
I think this deserves being added to the btrfs(5) manpage, so I made a
ticket about it at:
https://github.com/kdave/btrfs-progs/issues/644
Thanks,
Chris.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-06-23 18:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-22 13:34 empty directory from previous subvolume in a snapshot is not sent|received Christoph Anton Mitterer
2023-06-22 15:22 ` Andrei Borzenkov
2023-06-22 16:09 ` Christoph Anton Mitterer
2023-06-23 4:55 ` Andrei Borzenkov
2023-06-23 18:10 ` Christoph Anton Mitterer
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.