On Tue, Dec 22, 2020 at 11:05 PM Andrei Borzenkov <[email protected]> wrote: > > 23.12.2020 06:48, Chris Murphy пишет: > > Hi, > > > > kernel is 5.10.2 > > > > cp --reflink hi hi2 > > > > This results in two EXTENT_DATA items with different offsets, > > therefore I think the data is duplicated in the leaf? Correct? Is it > > expected? > > > > I'd say yes. Inline data is contained in EXTEND_DATA item and > EXTENT_DATA item cannot be shared by two different inodes (it is keyed > by inode number). > > Even when cloning regular extent you will have two independent > EXTENT_DATA items pointing to the same physical extent.
Thanks. I saw this commit a long time ago and sorta just figured it meant maybe inline extents would be cloned within a given leaf. 05a5a7621ce6 Btrfs: implement full reflink support for inline extents But I only just now read the commit message, and it reads like cloning now will be handled without error. It's not saying that it results in shared inline data extents. -- Chris Murphy
