diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-11-09 16:43:16 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:32 -0400 |
commit | 4be1a412ea34923370cd6163232d7928ae9a0e4a (patch) | |
tree | 572fcb3d4556c549a97d93c49cdbf14f8a65b83d /fs/bcachefs/extents.h | |
parent | 08c07fea7b437f0a841f85cc9b670b60dacd85cf (diff) | |
download | lwn-4be1a412ea34923370cd6163232d7928ae9a0e4a.tar.gz lwn-4be1a412ea34923370cd6163232d7928ae9a0e4a.zip |
bcachefs: Inline data extents
This implements extents that have their data inline, in the value,
instead of the bkey value being pointers to the data - and the read and
write paths are updated to read from these new extent types and write
them out, when the write size is small enough.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/extents.h')
-rw-r--r-- | fs/bcachefs/extents.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/extents.h b/fs/bcachefs/extents.h index e360e1989812..35a66d4f4ea2 100644 --- a/fs/bcachefs/extents.h +++ b/fs/bcachefs/extents.h @@ -456,6 +456,7 @@ static inline bool bkey_extent_is_direct_data(const struct bkey *k) static inline bool bkey_extent_is_data(const struct bkey *k) { return bkey_extent_is_direct_data(k) || + k->type == KEY_TYPE_inline_data || k->type == KEY_TYPE_reflink_p; } @@ -469,6 +470,7 @@ static inline bool bkey_extent_is_allocation(const struct bkey *k) case KEY_TYPE_reservation: case KEY_TYPE_reflink_p: case KEY_TYPE_reflink_v: + case KEY_TYPE_inline_data: return true; default: return false; |