On Tue, Jan 12, 2021 at 12:08 PM Graham Cobb [off-list ref] wrote:
On 12/01/2021 11:27, Filipe Manana wrote:
quoted
...
In other words, what I think we should have is a check that forbids
using two roots for an incremental send that are not snapshots of the
same subvolume (have different parent uuids).
Are you suggesting that rule should also apply for clone sources (-c
option)? Or are clone sources handled differently from the parent in the
code?
No, I'm not. The clone sources are different, and are used only to
find extents for cloning and not for computing differences between
snapshots.
The exception is when -p is not passed to 'btrfs send' and one or more
roots are passed to it with -c, in which case btrfs-progs determines
the "best parent" - so it would check as well if the chosen parent is
a snapshot of the same subvolume. My suggestion was making this on the
kernel side, just in case there are other users of the ioctl other
than btrfs-progs.
--
Filipe David Manana,
“Whether you think you can, or you think you can't — you're right.”