summaryrefslogtreecommitdiff
path: root/fs/bcachefs/util.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-06-12 22:45:45 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:10 +0300
commit0423fb7185e3c0178b3a09f24afc3777c2ef9522 (patch)
tree11f340111387ea1484801ac46268e971e5bc7947 /fs/bcachefs/util.h
parent877da05ffb13c1a998070707e0d15df0167f9364 (diff)
downloadlinux-0423fb7185e3c0178b3a09f24afc3777c2ef9522.tar.xz
bcachefs: Keep a sorted list of btree iterators
This will be used to make other operations on btree iterators within a transaction more efficient, and enable some other improvements to how we manage btree iterators. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/util.h')
-rw-r--r--fs/bcachefs/util.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/bcachefs/util.h b/fs/bcachefs/util.h
index a0cbebf190b4..41dfc5867c9e 100644
--- a/fs/bcachefs/util.h
+++ b/fs/bcachefs/util.h
@@ -593,6 +593,20 @@ static inline void memmove_u64s_down(void *dst, const void *src,
__memmove_u64s_down(dst, src, u64s);
}
+static inline void __memmove_u64s_down_small(void *dst, const void *src,
+ unsigned u64s)
+{
+ memcpy_u64s_small(dst, src, u64s);
+}
+
+static inline void memmove_u64s_down_small(void *dst, const void *src,
+ unsigned u64s)
+{
+ EBUG_ON(dst > src);
+
+ __memmove_u64s_down_small(dst, src, u64s);
+}
+
static inline void __memmove_u64s_up_small(void *_dst, const void *_src,
unsigned u64s)
{