diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-03-30 17:40:25 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2022-03-30 17:40:37 -0400 |
commit | e240b4ae86adb022e3266220ce9807dad8b51beb (patch) | |
tree | 535081dc65b75f8f288f10b820eeebbd64f9e0e0 /tools-util.h | |
parent | 59abea577659ce82ff0098633caaf74076a9b4d7 (diff) |
Update bcachefs sources to f638850417 bcachefs: bch2_trans_log_msg()
Diffstat (limited to 'tools-util.h')
-rw-r--r-- | tools-util.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools-util.h b/tools-util.h index 78827b84..a0e20ebf 100644 --- a/tools-util.h +++ b/tools-util.h @@ -18,7 +18,7 @@ #include <linux/string.h> #include <linux/types.h> #include <linux/uuid.h> -#include "ccan/darray/darray.h" +#include "libbcachefs/darray.h" #define noreturn __attribute__((noreturn)) @@ -72,14 +72,14 @@ struct range { u64 end; }; -typedef darray(struct range) ranges; +typedef DARRAY(struct range) ranges; static inline void range_add(ranges *data, u64 offset, u64 size) { - darray_append(*data, (struct range) { + darray_push(*data, ((struct range) { .start = offset, .end = offset + size - }); + })); } void ranges_sort_merge(ranges *); @@ -95,9 +95,9 @@ struct hole_iter { static inline struct range hole_iter_next(struct hole_iter *iter) { struct range r = { - .start = iter->idx ? iter->r.item[iter->idx - 1].end : 0, + .start = iter->idx ? iter->r.data[iter->idx - 1].end : 0, .end = iter->idx < iter->r.size - ? iter->r.item[iter->idx].start : iter->end, + ? iter->r.data[iter->idx].start : iter->end, }; BUG_ON(r.start > r.end); |