summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/extents.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-06-10 21:44:27 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:07 -0400
commit297d89343dd9be32878a747c53d3477c986a01b6 (patch)
tree486775a4974a78560e554e8e6fab457a261a9d52 /fs/bcachefs/extents.h
parent68a507a2e8cdc9b90599bb5d220a696abdc54838 (diff)
downloadlinux-297d89343dd9be32878a747c53d3477c986a01b6.tar.gz
linux-297d89343dd9be32878a747c53d3477c986a01b6.tar.bz2
linux-297d89343dd9be32878a747c53d3477c986a01b6.zip
bcachefs: Extensive triggers cleanups
- We no longer mark subsets of extents, they're marked like regular keys now - which means we can drop the offset & sectors arguments to trigger functions - Drop other arguments that are no longer needed anymore in various places - fs_usage - Drop the logic for handling extents in bch2_mark_update() that isn't needed anymore, to match bch2_trans_mark_update() - Better logic for hanlding the BTREE_ITER_CACHED_NOFILL case, where we don't have an old key to mark Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/extents.h')
-rw-r--r--fs/bcachefs/extents.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/bcachefs/extents.h b/fs/bcachefs/extents.h
index 3f6224f75ce8..43cef0a3bdf3 100644
--- a/fs/bcachefs/extents.h
+++ b/fs/bcachefs/extents.h
@@ -426,6 +426,17 @@ void bch2_extent_crc_append(struct bkey_i *,
/* Generic code for keys with pointers: */
+static inline bool bkey_is_btree_ptr(const struct bkey *k)
+{
+ switch (k->type) {
+ case KEY_TYPE_btree_ptr:
+ case KEY_TYPE_btree_ptr_v2:
+ return true;
+ default:
+ return false;
+ }
+}
+
static inline bool bkey_extent_is_direct_data(const struct bkey *k)
{
switch (k->type) {