btrfs: new inline ref storing owning subvol of data extents
authorBoris Burkov <boris@bur.io>
Mon, 30 Jan 2023 22:45:55 +0000 (14:45 -0800)
committerDavid Sterba <dsterba@suse.com>
Thu, 12 Oct 2023 14:44:11 +0000 (16:44 +0200)
commitd9a620f77e33f2b0e9a5f131f3ee3c66d3285c57
tree58c86124cd45a5777de063a8efa5b5cd08454302
parentcf79ac47932b377d0cfe6b61f4472cdc17eac042
btrfs: new inline ref storing owning subvol of data extents

In order to implement simple quota groups, we need to be able to
associate a data extent with the subvolume that created it. Once you
account for reflink, this information cannot be recovered without
explicitly storing it. Options for storing it are:

- a new key/item
- a new extent inline ref item

The former is backwards compatible, but wastes space, the latter is
incompat, but is efficient in space and reuses the existing inline ref
machinery, while only abusing it a tiny amount -- specifically, the new
item is not a ref, per-se.

Signed-off-by: Boris Burkov <boris@bur.io>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/accessors.h
fs/btrfs/backref.c
fs/btrfs/extent-tree.c
fs/btrfs/print-tree.c
fs/btrfs/ref-verify.c
fs/btrfs/tree-checker.c
include/uapi/linux/btrfs_tree.h