Commit f0431c5f authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Combine .trans_trigger, .atomic_trigger

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 4f9ec59f
...@@ -182,24 +182,21 @@ void bch2_alloc_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); ...@@ -182,24 +182,21 @@ void bch2_alloc_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
#define bch2_bkey_ops_alloc ((struct bkey_ops) { \ #define bch2_bkey_ops_alloc ((struct bkey_ops) { \
.key_invalid = bch2_alloc_v1_invalid, \ .key_invalid = bch2_alloc_v1_invalid, \
.val_to_text = bch2_alloc_to_text, \ .val_to_text = bch2_alloc_to_text, \
.trans_trigger = bch2_trigger_alloc, \ .trigger = bch2_trigger_alloc, \
.atomic_trigger = bch2_trigger_alloc, \
.min_val_size = 8, \ .min_val_size = 8, \
}) })
#define bch2_bkey_ops_alloc_v2 ((struct bkey_ops) { \ #define bch2_bkey_ops_alloc_v2 ((struct bkey_ops) { \
.key_invalid = bch2_alloc_v2_invalid, \ .key_invalid = bch2_alloc_v2_invalid, \
.val_to_text = bch2_alloc_to_text, \ .val_to_text = bch2_alloc_to_text, \
.trans_trigger = bch2_trigger_alloc, \ .trigger = bch2_trigger_alloc, \
.atomic_trigger = bch2_trigger_alloc, \
.min_val_size = 8, \ .min_val_size = 8, \
}) })
#define bch2_bkey_ops_alloc_v3 ((struct bkey_ops) { \ #define bch2_bkey_ops_alloc_v3 ((struct bkey_ops) { \
.key_invalid = bch2_alloc_v3_invalid, \ .key_invalid = bch2_alloc_v3_invalid, \
.val_to_text = bch2_alloc_to_text, \ .val_to_text = bch2_alloc_to_text, \
.trans_trigger = bch2_trigger_alloc, \ .trigger = bch2_trigger_alloc, \
.atomic_trigger = bch2_trigger_alloc, \
.min_val_size = 16, \ .min_val_size = 16, \
}) })
...@@ -207,8 +204,7 @@ void bch2_alloc_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); ...@@ -207,8 +204,7 @@ void bch2_alloc_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
.key_invalid = bch2_alloc_v4_invalid, \ .key_invalid = bch2_alloc_v4_invalid, \
.val_to_text = bch2_alloc_to_text, \ .val_to_text = bch2_alloc_to_text, \
.swab = bch2_alloc_v4_swab, \ .swab = bch2_alloc_v4_swab, \
.trans_trigger = bch2_trigger_alloc, \ .trigger = bch2_trigger_alloc, \
.atomic_trigger = bch2_trigger_alloc, \
.min_val_size = 48, \ .min_val_size = 48, \
}) })
......
...@@ -28,10 +28,8 @@ struct bkey_ops { ...@@ -28,10 +28,8 @@ struct bkey_ops {
void (*swab)(struct bkey_s); void (*swab)(struct bkey_s);
bool (*key_normalize)(struct bch_fs *, struct bkey_s); bool (*key_normalize)(struct bch_fs *, struct bkey_s);
bool (*key_merge)(struct bch_fs *, struct bkey_s, struct bkey_s_c); bool (*key_merge)(struct bch_fs *, struct bkey_s, struct bkey_s_c);
int (*trans_trigger)(struct btree_trans *, enum btree_id, unsigned, int (*trigger)(struct btree_trans *, enum btree_id, unsigned,
struct bkey_s_c, struct bkey_s, unsigned); struct bkey_s_c, struct bkey_s, unsigned);
int (*atomic_trigger)(struct btree_trans *, enum btree_id, unsigned,
struct bkey_s_c, struct bkey_s, unsigned);
void (*compat)(enum btree_id id, unsigned version, void (*compat)(enum btree_id id, unsigned version,
unsigned big_endian, int write, unsigned big_endian, int write,
struct bkey_s); struct bkey_s);
...@@ -78,18 +76,6 @@ static inline bool bch2_bkey_maybe_mergable(const struct bkey *l, const struct b ...@@ -78,18 +76,6 @@ static inline bool bch2_bkey_maybe_mergable(const struct bkey *l, const struct b
bool bch2_bkey_merge(struct bch_fs *, struct bkey_s, struct bkey_s_c); bool bch2_bkey_merge(struct bch_fs *, struct bkey_s, struct bkey_s_c);
static inline int bch2_mark_key(struct btree_trans *trans,
enum btree_id btree, unsigned level,
struct bkey_s_c old, struct bkey_s new,
unsigned flags)
{
const struct bkey_ops *ops = bch2_bkey_type_ops(old.k->type ?: new.k->type);
return ops->atomic_trigger
? ops->atomic_trigger(trans, btree, level, old, new, flags)
: 0;
}
enum btree_update_flags { enum btree_update_flags {
__BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE = __BTREE_ITER_FLAGS_END, __BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE = __BTREE_ITER_FLAGS_END,
__BTREE_UPDATE_NOJOURNAL, __BTREE_UPDATE_NOJOURNAL,
...@@ -134,42 +120,42 @@ enum btree_update_flags { ...@@ -134,42 +120,42 @@ enum btree_update_flags {
/* signal from bucket invalidate path to alloc trigger */ /* signal from bucket invalidate path to alloc trigger */
#define BTREE_TRIGGER_BUCKET_INVALIDATE (1U << __BTREE_TRIGGER_BUCKET_INVALIDATE) #define BTREE_TRIGGER_BUCKET_INVALIDATE (1U << __BTREE_TRIGGER_BUCKET_INVALIDATE)
static inline int bch2_trans_mark_key(struct btree_trans *trans, static inline int bch2_key_trigger(struct btree_trans *trans,
enum btree_id btree_id, unsigned level, enum btree_id btree, unsigned level,
struct bkey_s_c old, struct bkey_s new, struct bkey_s_c old, struct bkey_s new,
unsigned flags) unsigned flags)
{ {
const struct bkey_ops *ops = bch2_bkey_type_ops(old.k->type ?: new.k->type); const struct bkey_ops *ops = bch2_bkey_type_ops(old.k->type ?: new.k->type);
return ops->trans_trigger return ops->trigger
? ops->trans_trigger(trans, btree_id, level, old, new, flags|BTREE_TRIGGER_TRANSACTIONAL) ? ops->trigger(trans, btree, level, old, new, flags)
: 0; : 0;
} }
static inline int bch2_trans_mark_old(struct btree_trans *trans, static inline int bch2_key_trigger_old(struct btree_trans *trans,
enum btree_id btree_id, unsigned level, enum btree_id btree_id, unsigned level,
struct bkey_s_c old, unsigned flags) struct bkey_s_c old, unsigned flags)
{ {
struct bkey_i deleted; struct bkey_i deleted;
bkey_init(&deleted.k); bkey_init(&deleted.k);
deleted.k.p = old.k->p; deleted.k.p = old.k->p;
return bch2_trans_mark_key(trans, btree_id, level, old, bkey_i_to_s(&deleted), return bch2_key_trigger(trans, btree_id, level, old, bkey_i_to_s(&deleted),
BTREE_TRIGGER_OVERWRITE|flags); BTREE_TRIGGER_OVERWRITE|flags);
} }
static inline int bch2_trans_mark_new(struct btree_trans *trans, static inline int bch2_key_trigger_new(struct btree_trans *trans,
enum btree_id btree_id, unsigned level, enum btree_id btree_id, unsigned level,
struct bkey_s new, unsigned flags) struct bkey_s new, unsigned flags)
{ {
struct bkey_i deleted; struct bkey_i deleted;
bkey_init(&deleted.k); bkey_init(&deleted.k);
deleted.k.p = new.k->p; deleted.k.p = new.k->p;
return bch2_trans_mark_key(trans, btree_id, level, bkey_i_to_s_c(&deleted), new, return bch2_key_trigger(trans, btree_id, level, bkey_i_to_s_c(&deleted), new,
BTREE_TRIGGER_INSERT|flags); BTREE_TRIGGER_INSERT|flags);
} }
void bch2_bkey_renumber(enum btree_node_type, struct bkey_packed *, int); void bch2_bkey_renumber(enum btree_node_type, struct bkey_packed *, int);
......
...@@ -834,7 +834,7 @@ static int bch2_gc_mark_key(struct btree_trans *trans, enum btree_id btree_id, ...@@ -834,7 +834,7 @@ static int bch2_gc_mark_key(struct btree_trans *trans, enum btree_id btree_id,
} }
ret = commit_do(trans, NULL, NULL, 0, ret = commit_do(trans, NULL, NULL, 0,
bch2_mark_key(trans, btree_id, level, old, unsafe_bkey_s_c_to_s(*k), BTREE_TRIGGER_GC)); bch2_key_trigger(trans, btree_id, level, old, unsafe_bkey_s_c_to_s(*k), BTREE_TRIGGER_GC));
fsck_err: fsck_err:
err: err:
bch_err_fn(c, ret); bch_err_fn(c, ret);
......
...@@ -451,20 +451,15 @@ static int run_one_mem_trigger(struct btree_trans *trans, ...@@ -451,20 +451,15 @@ static int run_one_mem_trigger(struct btree_trans *trans,
if (!btree_node_type_needs_gc(__btree_node_type(i->level, i->btree_id))) if (!btree_node_type_needs_gc(__btree_node_type(i->level, i->btree_id)))
return 0; return 0;
if (old_ops->atomic_trigger == new_ops->atomic_trigger) { if (old_ops->trigger == new_ops->trigger) {
ret = bch2_mark_key(trans, i->btree_id, i->level, ret = bch2_key_trigger(trans, i->btree_id, i->level,
old, bkey_i_to_s(new), old, bkey_i_to_s(new),
BTREE_TRIGGER_INSERT|BTREE_TRIGGER_OVERWRITE|flags); BTREE_TRIGGER_INSERT|BTREE_TRIGGER_OVERWRITE|flags);
} else { } else {
struct bkey _deleted = POS_KEY((trans->paths + i->path)->pos); ret = bch2_key_trigger_new(trans, i->btree_id, i->level,
struct bkey_s deleted = (struct bkey_s) { { { &_deleted, NULL } } }; bkey_i_to_s(new), flags) ?:
bch2_key_trigger_old(trans, i->btree_id, i->level,
ret = bch2_mark_key(trans, i->btree_id, i->level, old, flags);
deleted.s_c, bkey_i_to_s(new),
BTREE_TRIGGER_INSERT|flags) ?:
bch2_mark_key(trans, i->btree_id, i->level,
old, deleted,
BTREE_TRIGGER_OVERWRITE|flags);
} }
return ret; return ret;
...@@ -482,6 +477,7 @@ static int run_one_trans_trigger(struct btree_trans *trans, struct btree_insert_ ...@@ -482,6 +477,7 @@ static int run_one_trans_trigger(struct btree_trans *trans, struct btree_insert_
struct bkey_s_c old = { &old_k, i->old_v }; struct bkey_s_c old = { &old_k, i->old_v };
const struct bkey_ops *old_ops = bch2_bkey_type_ops(old.k->type); const struct bkey_ops *old_ops = bch2_bkey_type_ops(old.k->type);
const struct bkey_ops *new_ops = bch2_bkey_type_ops(i->k->k.type); const struct bkey_ops *new_ops = bch2_bkey_type_ops(i->k->k.type);
unsigned flags = i->flags|BTREE_TRIGGER_TRANSACTIONAL;
verify_update_old_key(trans, i); verify_update_old_key(trans, i);
...@@ -491,19 +487,18 @@ static int run_one_trans_trigger(struct btree_trans *trans, struct btree_insert_ ...@@ -491,19 +487,18 @@ static int run_one_trans_trigger(struct btree_trans *trans, struct btree_insert_
if (!i->insert_trigger_run && if (!i->insert_trigger_run &&
!i->overwrite_trigger_run && !i->overwrite_trigger_run &&
old_ops->trans_trigger == new_ops->trans_trigger) { old_ops->trigger == new_ops->trigger) {
i->overwrite_trigger_run = true; i->overwrite_trigger_run = true;
i->insert_trigger_run = true; i->insert_trigger_run = true;
return bch2_trans_mark_key(trans, i->btree_id, i->level, old, bkey_i_to_s(i->k), return bch2_key_trigger(trans, i->btree_id, i->level, old, bkey_i_to_s(i->k),
BTREE_TRIGGER_INSERT| BTREE_TRIGGER_INSERT|
BTREE_TRIGGER_OVERWRITE| BTREE_TRIGGER_OVERWRITE|flags) ?: 1;
i->flags) ?: 1;
} else if (overwrite && !i->overwrite_trigger_run) { } else if (overwrite && !i->overwrite_trigger_run) {
i->overwrite_trigger_run = true; i->overwrite_trigger_run = true;
return bch2_trans_mark_old(trans, i->btree_id, i->level, old, i->flags) ?: 1; return bch2_key_trigger_old(trans, i->btree_id, i->level, old, flags) ?: 1;
} else if (!overwrite && !i->insert_trigger_run) { } else if (!overwrite && !i->insert_trigger_run) {
i->insert_trigger_run = true; i->insert_trigger_run = true;
return bch2_trans_mark_new(trans, i->btree_id, i->level, bkey_i_to_s(i->k), i->flags) ?: 1; return bch2_key_trigger_new(trans, i->btree_id, i->level, bkey_i_to_s(i->k), flags) ?: 1;
} else { } else {
return 0; return 0;
} }
......
...@@ -568,7 +568,8 @@ static int btree_update_nodes_written_trans(struct btree_trans *trans, ...@@ -568,7 +568,8 @@ static int btree_update_nodes_written_trans(struct btree_trans *trans,
for_each_keylist_key(&as->old_keys, k) { for_each_keylist_key(&as->old_keys, k) {
unsigned level = bkey_i_to_btree_ptr_v2(k)->v.mem_ptr; unsigned level = bkey_i_to_btree_ptr_v2(k)->v.mem_ptr;
ret = bch2_trans_mark_old(trans, as->btree_id, level, bkey_i_to_s_c(k), 0); ret = bch2_key_trigger_old(trans, as->btree_id, level, bkey_i_to_s_c(k),
BTREE_TRIGGER_TRANSACTIONAL);
if (ret) if (ret)
return ret; return ret;
} }
...@@ -576,7 +577,8 @@ static int btree_update_nodes_written_trans(struct btree_trans *trans, ...@@ -576,7 +577,8 @@ static int btree_update_nodes_written_trans(struct btree_trans *trans,
for_each_keylist_key(&as->new_keys, k) { for_each_keylist_key(&as->new_keys, k) {
unsigned level = bkey_i_to_btree_ptr_v2(k)->v.mem_ptr; unsigned level = bkey_i_to_btree_ptr_v2(k)->v.mem_ptr;
ret = bch2_trans_mark_new(trans, as->btree_id, level, bkey_i_to_s(k), 0); ret = bch2_key_trigger_new(trans, as->btree_id, level, bkey_i_to_s(k),
BTREE_TRIGGER_TRANSACTIONAL);
if (ret) if (ret)
return ret; return ret;
} }
...@@ -2156,13 +2158,12 @@ static int __bch2_btree_node_update_key(struct btree_trans *trans, ...@@ -2156,13 +2158,12 @@ static int __bch2_btree_node_update_key(struct btree_trans *trans,
int ret; int ret;
if (!skip_triggers) { if (!skip_triggers) {
ret = bch2_trans_mark_old(trans, b->c.btree_id, b->c.level + 1, ret = bch2_key_trigger_old(trans, b->c.btree_id, b->c.level + 1,
bkey_i_to_s_c(&b->key), 0); bkey_i_to_s_c(&b->key),
if (ret) BTREE_TRIGGER_TRANSACTIONAL) ?:
return ret; bch2_key_trigger_new(trans, b->c.btree_id, b->c.level + 1,
bkey_i_to_s(new_key),
ret = bch2_trans_mark_new(trans, b->c.btree_id, b->c.level + 1, BTREE_TRIGGER_TRANSACTIONAL);
bkey_i_to_s(new_key), 0);
if (ret) if (ret)
return ret; return ret;
} }
......
...@@ -19,8 +19,7 @@ int bch2_trigger_stripe(struct btree_trans *, enum btree_id, unsigned, ...@@ -19,8 +19,7 @@ int bch2_trigger_stripe(struct btree_trans *, enum btree_id, unsigned,
.key_invalid = bch2_stripe_invalid, \ .key_invalid = bch2_stripe_invalid, \
.val_to_text = bch2_stripe_to_text, \ .val_to_text = bch2_stripe_to_text, \
.swab = bch2_ptr_swab, \ .swab = bch2_ptr_swab, \
.trans_trigger = bch2_trigger_stripe, \ .trigger = bch2_trigger_stripe, \
.atomic_trigger = bch2_trigger_stripe, \
.min_val_size = 8, \ .min_val_size = 8, \
}) })
......
...@@ -415,8 +415,7 @@ void bch2_btree_ptr_v2_compat(enum btree_id, unsigned, unsigned, ...@@ -415,8 +415,7 @@ void bch2_btree_ptr_v2_compat(enum btree_id, unsigned, unsigned,
.key_invalid = bch2_btree_ptr_invalid, \ .key_invalid = bch2_btree_ptr_invalid, \
.val_to_text = bch2_btree_ptr_to_text, \ .val_to_text = bch2_btree_ptr_to_text, \
.swab = bch2_ptr_swab, \ .swab = bch2_ptr_swab, \
.trans_trigger = bch2_trigger_extent, \ .trigger = bch2_trigger_extent, \
.atomic_trigger = bch2_trigger_extent, \
}) })
#define bch2_bkey_ops_btree_ptr_v2 ((struct bkey_ops) { \ #define bch2_bkey_ops_btree_ptr_v2 ((struct bkey_ops) { \
...@@ -424,8 +423,7 @@ void bch2_btree_ptr_v2_compat(enum btree_id, unsigned, unsigned, ...@@ -424,8 +423,7 @@ void bch2_btree_ptr_v2_compat(enum btree_id, unsigned, unsigned,
.val_to_text = bch2_btree_ptr_v2_to_text, \ .val_to_text = bch2_btree_ptr_v2_to_text, \
.swab = bch2_ptr_swab, \ .swab = bch2_ptr_swab, \
.compat = bch2_btree_ptr_v2_compat, \ .compat = bch2_btree_ptr_v2_compat, \
.trans_trigger = bch2_trigger_extent, \ .trigger = bch2_trigger_extent, \
.atomic_trigger = bch2_trigger_extent, \
.min_val_size = 40, \ .min_val_size = 40, \
}) })
...@@ -439,8 +437,7 @@ bool bch2_extent_merge(struct bch_fs *, struct bkey_s, struct bkey_s_c); ...@@ -439,8 +437,7 @@ bool bch2_extent_merge(struct bch_fs *, struct bkey_s, struct bkey_s_c);
.swab = bch2_ptr_swab, \ .swab = bch2_ptr_swab, \
.key_normalize = bch2_extent_normalize, \ .key_normalize = bch2_extent_normalize, \
.key_merge = bch2_extent_merge, \ .key_merge = bch2_extent_merge, \
.trans_trigger = bch2_trigger_extent, \ .trigger = bch2_trigger_extent, \
.atomic_trigger = bch2_trigger_extent, \
}) })
/* KEY_TYPE_reservation: */ /* KEY_TYPE_reservation: */
...@@ -454,8 +451,7 @@ bool bch2_reservation_merge(struct bch_fs *, struct bkey_s, struct bkey_s_c); ...@@ -454,8 +451,7 @@ bool bch2_reservation_merge(struct bch_fs *, struct bkey_s, struct bkey_s_c);
.key_invalid = bch2_reservation_invalid, \ .key_invalid = bch2_reservation_invalid, \
.val_to_text = bch2_reservation_to_text, \ .val_to_text = bch2_reservation_to_text, \
.key_merge = bch2_reservation_merge, \ .key_merge = bch2_reservation_merge, \
.trans_trigger = bch2_trigger_reservation, \ .trigger = bch2_trigger_reservation, \
.atomic_trigger = bch2_trigger_reservation, \
.min_val_size = 8, \ .min_val_size = 8, \
}) })
......
...@@ -23,24 +23,21 @@ int bch2_trigger_inode(struct btree_trans *, enum btree_id, unsigned, ...@@ -23,24 +23,21 @@ int bch2_trigger_inode(struct btree_trans *, enum btree_id, unsigned,
#define bch2_bkey_ops_inode ((struct bkey_ops) { \ #define bch2_bkey_ops_inode ((struct bkey_ops) { \
.key_invalid = bch2_inode_invalid, \ .key_invalid = bch2_inode_invalid, \
.val_to_text = bch2_inode_to_text, \ .val_to_text = bch2_inode_to_text, \
.trans_trigger = bch2_trigger_inode, \ .trigger = bch2_trigger_inode, \
.atomic_trigger = bch2_trigger_inode, \
.min_val_size = 16, \ .min_val_size = 16, \
}) })
#define bch2_bkey_ops_inode_v2 ((struct bkey_ops) { \ #define bch2_bkey_ops_inode_v2 ((struct bkey_ops) { \
.key_invalid = bch2_inode_v2_invalid, \ .key_invalid = bch2_inode_v2_invalid, \
.val_to_text = bch2_inode_to_text, \ .val_to_text = bch2_inode_to_text, \
.trans_trigger = bch2_trigger_inode, \ .trigger = bch2_trigger_inode, \
.atomic_trigger = bch2_trigger_inode, \
.min_val_size = 32, \ .min_val_size = 32, \
}) })
#define bch2_bkey_ops_inode_v3 ((struct bkey_ops) { \ #define bch2_bkey_ops_inode_v3 ((struct bkey_ops) { \
.key_invalid = bch2_inode_v3_invalid, \ .key_invalid = bch2_inode_v3_invalid, \
.val_to_text = bch2_inode_to_text, \ .val_to_text = bch2_inode_to_text, \
.trans_trigger = bch2_trigger_inode, \ .trigger = bch2_trigger_inode, \
.atomic_trigger = bch2_trigger_inode, \
.min_val_size = 48, \ .min_val_size = 48, \
}) })
......
...@@ -298,7 +298,9 @@ int bch2_trans_mark_reflink_v(struct btree_trans *trans, ...@@ -298,7 +298,9 @@ int bch2_trans_mark_reflink_v(struct btree_trans *trans,
struct bkey_s_c old, struct bkey_s new, struct bkey_s_c old, struct bkey_s new,
unsigned flags) unsigned flags)
{ {
check_indirect_extent_deleting(new, &flags); if ((flags & BTREE_TRIGGER_TRANSACTIONAL) &&
(flags & BTREE_TRIGGER_INSERT))
check_indirect_extent_deleting(new, &flags);
if (old.k->type == KEY_TYPE_reflink_v && if (old.k->type == KEY_TYPE_reflink_v &&
new.k->type == KEY_TYPE_reflink_v && new.k->type == KEY_TYPE_reflink_v &&
......
...@@ -16,8 +16,7 @@ int bch2_trigger_reflink_p(struct btree_trans *, enum btree_id, unsigned, ...@@ -16,8 +16,7 @@ int bch2_trigger_reflink_p(struct btree_trans *, enum btree_id, unsigned,
.key_invalid = bch2_reflink_p_invalid, \ .key_invalid = bch2_reflink_p_invalid, \
.val_to_text = bch2_reflink_p_to_text, \ .val_to_text = bch2_reflink_p_to_text, \
.key_merge = bch2_reflink_p_merge, \ .key_merge = bch2_reflink_p_merge, \
.trans_trigger = bch2_trigger_reflink_p, \ .trigger = bch2_trigger_reflink_p, \
.atomic_trigger = bch2_trigger_reflink_p, \
.min_val_size = 16, \ .min_val_size = 16, \
}) })
...@@ -32,8 +31,7 @@ int bch2_trans_mark_reflink_v(struct btree_trans *, enum btree_id, unsigned, ...@@ -32,8 +31,7 @@ int bch2_trans_mark_reflink_v(struct btree_trans *, enum btree_id, unsigned,
.key_invalid = bch2_reflink_v_invalid, \ .key_invalid = bch2_reflink_v_invalid, \
.val_to_text = bch2_reflink_v_to_text, \ .val_to_text = bch2_reflink_v_to_text, \
.swab = bch2_ptr_swab, \ .swab = bch2_ptr_swab, \
.trans_trigger = bch2_trans_mark_reflink_v, \ .trigger = bch2_trans_mark_reflink_v, \
.atomic_trigger = bch2_trigger_extent, \
.min_val_size = 8, \ .min_val_size = 8, \
}) })
...@@ -49,7 +47,7 @@ int bch2_trans_mark_indirect_inline_data(struct btree_trans *, ...@@ -49,7 +47,7 @@ int bch2_trans_mark_indirect_inline_data(struct btree_trans *,
#define bch2_bkey_ops_indirect_inline_data ((struct bkey_ops) { \ #define bch2_bkey_ops_indirect_inline_data ((struct bkey_ops) { \
.key_invalid = bch2_indirect_inline_data_invalid, \ .key_invalid = bch2_indirect_inline_data_invalid, \
.val_to_text = bch2_indirect_inline_data_to_text, \ .val_to_text = bch2_indirect_inline_data_to_text, \
.trans_trigger = bch2_trans_mark_indirect_inline_data, \ .trigger = bch2_trans_mark_indirect_inline_data, \
.min_val_size = 8, \ .min_val_size = 8, \
}) })
......
...@@ -27,7 +27,7 @@ int bch2_mark_snapshot(struct btree_trans *, enum btree_id, unsigned, ...@@ -27,7 +27,7 @@ int bch2_mark_snapshot(struct btree_trans *, enum btree_id, unsigned,
#define bch2_bkey_ops_snapshot ((struct bkey_ops) { \ #define bch2_bkey_ops_snapshot ((struct bkey_ops) { \
.key_invalid = bch2_snapshot_invalid, \ .key_invalid = bch2_snapshot_invalid, \
.val_to_text = bch2_snapshot_to_text, \ .val_to_text = bch2_snapshot_to_text, \
.atomic_trigger = bch2_mark_snapshot, \ .trigger = bch2_mark_snapshot, \
.min_val_size = 24, \ .min_val_size = 24, \
}) })
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment