summaryrefslogtreecommitdiff
path: root/fs/btrfs/delayed-ref.h
diff options
context:
space:
mode:
authorBoris Burkov <boris@bur.io>2023-06-28 20:45:29 +0300
committerDavid Sterba <dsterba@suse.com>2023-10-12 17:44:11 +0300
commit8d2990914073e167cbf0f66e724b4b617f0f4dff (patch)
treed18e4cabe906396b2a784a8659472cea8d2671c2 /fs/btrfs/delayed-ref.h
parentd9a620f77e33f2b0e9a5f131f3ee3c66d3285c57 (diff)
downloadlinux-8d2990914073e167cbf0f66e724b4b617f0f4dff.tar.xz
btrfs: add helper for inline owner ref lookup
Inline ref parsing is a bit tricky and relies on a decent amount of implicit information, so I think it is beneficial to have a helper function for reading the owner ref, if only to "document" the format, along with the write path. The main subtlety of note which I was missing by open-coding this was that it is important to check whether or not inline refs are present *at all*. i.e., if we are writing out a new extent under squotas, we will always use a big enough item for the inline ref and have it. However, it is possible that some random item predating squotas will not have any inline refs. In that case, trying to read the "type" field of the first inline ref will just be reading garbage in the form of whatever is in the next item. This will be used by the extent free-ing path, which looks up data extent owners as well as a relocation path which needs to grab the owner before relocating an extent. Signed-off-by: Boris Burkov <boris@bur.io> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/delayed-ref.h')
0 files changed, 0 insertions, 0 deletions