Lines Matching refs:l
39 static bool bch_key_sort_cmp(struct btree_iter_set l, in bch_key_sort_cmp() argument
42 int64_t c = bkey_cmp(l.k, r.k); in bch_key_sort_cmp()
44 return c ? c > 0 : l.k < r.k; in bch_key_sort_cmp()
258 static bool bch_extent_sort_cmp(struct btree_iter_set l, in bch_extent_sort_cmp() argument
261 int64_t c = bkey_cmp(&START_KEY(l.k), &START_KEY(r.k)); in bch_extent_sort_cmp()
263 return c ? c > 0 : l.k < r.k; in bch_extent_sort_cmp()
575 static uint64_t merge_chksums(struct bkey *l, struct bkey *r) in merge_chksums() argument
577 return (l->ptr[KEY_PTRS(l)] + r->ptr[KEY_PTRS(r)]) & in merge_chksums()
582 struct bkey *l, in bch_extent_merge() argument
591 for (i = 0; i < KEY_PTRS(l); i++) in bch_extent_merge()
592 if (l->ptr[i] + MAKE_PTR(0, KEY_SIZE(l), 0) != r->ptr[i] || in bch_extent_merge()
593 PTR_BUCKET_NR(b->c, l, i) != PTR_BUCKET_NR(b->c, r, i)) in bch_extent_merge()
599 if (KEY_SIZE(l) + KEY_SIZE(r) > USHRT_MAX) { in bch_extent_merge()
600 SET_KEY_OFFSET(l, KEY_OFFSET(l) + USHRT_MAX - KEY_SIZE(l)); in bch_extent_merge()
601 SET_KEY_SIZE(l, USHRT_MAX); in bch_extent_merge()
603 bch_cut_front(l, r); in bch_extent_merge()
607 if (KEY_CSUM(l)) { in bch_extent_merge()
609 l->ptr[KEY_PTRS(l)] = merge_chksums(l, r); in bch_extent_merge()
611 SET_KEY_CSUM(l, 0); in bch_extent_merge()
614 SET_KEY_OFFSET(l, KEY_OFFSET(l) + KEY_SIZE(r)); in bch_extent_merge()
615 SET_KEY_SIZE(l, KEY_SIZE(l) + KEY_SIZE(r)); in bch_extent_merge()