summaryrefslogtreecommitdiff
path: root/fs/bcachefs/bkey.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-07-25 13:52:14 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:24 -0400
commit99aaf57000b4091d2471ed30387d96e15f2fc38b (patch)
treefe76da2b20b6e089158c640b8d4e6b15bb0488d7 /fs/bcachefs/bkey.h
parentb1c9358a25eb0ed94c5bfc18ba5f9b00d51d8863 (diff)
bcachefs: Refactor various code to not be extent specific
With reflink, various code now has to handle both KEY_TYPE_extent or KEY_TYPE_reflink_v - so, convert it to be generic across all keys with pointers. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bkey.h')
-rw-r--r--fs/bcachefs/bkey.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/bkey.h b/fs/bcachefs/bkey.h
index ba08d95aae6f..b3a08e52e6b3 100644
--- a/fs/bcachefs/bkey.h
+++ b/fs/bcachefs/bkey.h
@@ -58,7 +58,7 @@ static inline void set_bkey_val_bytes(struct bkey *k, unsigned bytes)
k->u64s = BKEY_U64s + DIV_ROUND_UP(bytes, sizeof(u64));
}
-#define bkey_val_end(_k) vstruct_idx((_k).v, bkey_val_u64s((_k).k))
+#define bkey_val_end(_k) ((void *) (((u64 *) (_k).v) + bkey_val_u64s((_k).k)))
#define bkey_deleted(_k) ((_k)->type == KEY_TYPE_deleted)