Commit e1b8f5f5 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Plumb btree_id & level to trans_mark

For backpointers, we'll need the full key location - that means btree_id
and btree level. This patch plumbs it through.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent 0095aa94
...@@ -540,6 +540,7 @@ static int bch2_bucket_do_index(struct btree_trans *trans, ...@@ -540,6 +540,7 @@ static int bch2_bucket_do_index(struct btree_trans *trans,
} }
int bch2_trans_mark_alloc(struct btree_trans *trans, int bch2_trans_mark_alloc(struct btree_trans *trans,
enum btree_id btree_id, unsigned level,
struct bkey_s_c old, struct bkey_i *new, struct bkey_s_c old, struct bkey_i *new,
unsigned flags) unsigned flags)
{ {
......
...@@ -125,8 +125,8 @@ static inline bool bkey_is_alloc(const struct bkey *k) ...@@ -125,8 +125,8 @@ static inline bool bkey_is_alloc(const struct bkey *k)
int bch2_alloc_read(struct bch_fs *); int bch2_alloc_read(struct bch_fs *);
int bch2_trans_mark_alloc(struct btree_trans *, struct bkey_s_c, int bch2_trans_mark_alloc(struct btree_trans *, enum btree_id, unsigned,
struct bkey_i *, unsigned); struct bkey_s_c, struct bkey_i *, unsigned);
int bch2_check_alloc_info(struct bch_fs *); int bch2_check_alloc_info(struct bch_fs *);
int bch2_check_alloc_to_lru_refs(struct bch_fs *); int bch2_check_alloc_to_lru_refs(struct bch_fs *);
void bch2_do_discards(struct bch_fs *); void bch2_do_discards(struct bch_fs *);
......
...@@ -27,8 +27,8 @@ struct bkey_ops { ...@@ -27,8 +27,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 *, struct bkey_s_c, int (*trans_trigger)(struct btree_trans *, enum btree_id, unsigned,
struct bkey_i *, unsigned); struct bkey_s_c, struct bkey_i *, unsigned);
int (*atomic_trigger)(struct btree_trans *, struct bkey_s_c, int (*atomic_trigger)(struct btree_trans *, struct bkey_s_c,
struct bkey_s_c, unsigned); struct bkey_s_c, unsigned);
void (*compat)(enum btree_id id, unsigned version, void (*compat)(enum btree_id id, unsigned version,
...@@ -77,16 +77,85 @@ static inline int bch2_mark_key(struct btree_trans *trans, ...@@ -77,16 +77,85 @@ static inline int bch2_mark_key(struct btree_trans *trans,
: 0; : 0;
} }
static inline int bch2_trans_mark_key(struct btree_trans *trans, struct bkey_s_c old, enum btree_update_flags {
struct bkey_i *new, unsigned flags) __BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE,
__BTREE_UPDATE_NOJOURNAL,
__BTREE_UPDATE_KEY_CACHE_RECLAIM,
__BTREE_UPDATE_NO_KEY_CACHE_COHERENCY,
__BTREE_TRIGGER_NORUN, /* Don't run triggers at all */
__BTREE_TRIGGER_INSERT,
__BTREE_TRIGGER_OVERWRITE,
__BTREE_TRIGGER_GC,
__BTREE_TRIGGER_BUCKET_INVALIDATE,
__BTREE_TRIGGER_NOATOMIC,
};
#define BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE (1U << __BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE)
#define BTREE_UPDATE_NOJOURNAL (1U << __BTREE_UPDATE_NOJOURNAL)
#define BTREE_UPDATE_KEY_CACHE_RECLAIM (1U << __BTREE_UPDATE_KEY_CACHE_RECLAIM)
#define BTREE_UPDATE_NO_KEY_CACHE_COHERENCY \
(1U << __BTREE_UPDATE_NO_KEY_CACHE_COHERENCY)
#define BTREE_TRIGGER_NORUN (1U << __BTREE_TRIGGER_NORUN)
#define BTREE_TRIGGER_INSERT (1U << __BTREE_TRIGGER_INSERT)
#define BTREE_TRIGGER_OVERWRITE (1U << __BTREE_TRIGGER_OVERWRITE)
#define BTREE_TRIGGER_GC (1U << __BTREE_TRIGGER_GC)
#define BTREE_TRIGGER_BUCKET_INVALIDATE (1U << __BTREE_TRIGGER_BUCKET_INVALIDATE)
#define BTREE_TRIGGER_NOATOMIC (1U << __BTREE_TRIGGER_NOATOMIC)
#define BTREE_TRIGGER_WANTS_OLD_AND_NEW \
((1U << KEY_TYPE_alloc)| \
(1U << KEY_TYPE_alloc_v2)| \
(1U << KEY_TYPE_alloc_v3)| \
(1U << KEY_TYPE_alloc_v4)| \
(1U << KEY_TYPE_stripe)| \
(1U << KEY_TYPE_inode)| \
(1U << KEY_TYPE_inode_v2)| \
(1U << KEY_TYPE_snapshot))
static inline int bch2_trans_mark_key(struct btree_trans *trans,
enum btree_id btree_id, unsigned level,
struct bkey_s_c old, struct bkey_i *new,
unsigned flags)
{ {
const struct bkey_ops *ops = &bch2_bkey_ops[old.k->type ?: new->k.type]; const struct bkey_ops *ops = &bch2_bkey_ops[old.k->type ?: new->k.type];
return ops->trans_trigger return ops->trans_trigger
? ops->trans_trigger(trans, old, new, flags) ? ops->trans_trigger(trans, btree_id, level, old, new, flags)
: 0; : 0;
} }
static inline int bch2_trans_mark_old(struct btree_trans *trans,
enum btree_id btree_id, unsigned level,
struct bkey_s_c old, unsigned flags)
{
struct bkey_i deleted;
bkey_init(&deleted.k);
deleted.k.p = old.k->p;
return bch2_trans_mark_key(trans, btree_id, level, old, &deleted,
BTREE_TRIGGER_OVERWRITE|flags);
}
static inline int bch2_trans_mark_new(struct btree_trans *trans,
enum btree_id btree_id, unsigned level,
struct bkey_i *new, unsigned flags)
{
struct bkey_i deleted;
bkey_init(&deleted.k);
deleted.k.p = new->k.p;
return bch2_trans_mark_key(trans, btree_id, level, bkey_i_to_s_c(&deleted), new,
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);
void __bch2_bkey_compat(unsigned, enum btree_id, unsigned, unsigned, void __bch2_bkey_compat(unsigned, enum btree_id, unsigned, unsigned,
......
...@@ -638,47 +638,6 @@ static inline bool btree_type_has_snapshots(enum btree_id id) ...@@ -638,47 +638,6 @@ static inline bool btree_type_has_snapshots(enum btree_id id)
return (1 << id) & BTREE_ID_HAS_SNAPSHOTS; return (1 << id) & BTREE_ID_HAS_SNAPSHOTS;
} }
enum btree_update_flags {
__BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE,
__BTREE_UPDATE_NOJOURNAL,
__BTREE_UPDATE_KEY_CACHE_RECLAIM,
__BTREE_UPDATE_NO_KEY_CACHE_COHERENCY,
__BTREE_TRIGGER_NORUN, /* Don't run triggers at all */
__BTREE_TRIGGER_INSERT,
__BTREE_TRIGGER_OVERWRITE,
__BTREE_TRIGGER_GC,
__BTREE_TRIGGER_BUCKET_INVALIDATE,
__BTREE_TRIGGER_NOATOMIC,
};
#define BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE (1U << __BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE)
#define BTREE_UPDATE_NOJOURNAL (1U << __BTREE_UPDATE_NOJOURNAL)
#define BTREE_UPDATE_KEY_CACHE_RECLAIM (1U << __BTREE_UPDATE_KEY_CACHE_RECLAIM)
#define BTREE_UPDATE_NO_KEY_CACHE_COHERENCY \
(1U << __BTREE_UPDATE_NO_KEY_CACHE_COHERENCY)
#define BTREE_TRIGGER_NORUN (1U << __BTREE_TRIGGER_NORUN)
#define BTREE_TRIGGER_INSERT (1U << __BTREE_TRIGGER_INSERT)
#define BTREE_TRIGGER_OVERWRITE (1U << __BTREE_TRIGGER_OVERWRITE)
#define BTREE_TRIGGER_GC (1U << __BTREE_TRIGGER_GC)
#define BTREE_TRIGGER_BUCKET_INVALIDATE (1U << __BTREE_TRIGGER_BUCKET_INVALIDATE)
#define BTREE_TRIGGER_NOATOMIC (1U << __BTREE_TRIGGER_NOATOMIC)
#define BTREE_TRIGGER_WANTS_OLD_AND_NEW \
((1U << KEY_TYPE_alloc)| \
(1U << KEY_TYPE_alloc_v2)| \
(1U << KEY_TYPE_alloc_v3)| \
(1U << KEY_TYPE_alloc_v4)| \
(1U << KEY_TYPE_stripe)| \
(1U << KEY_TYPE_inode)| \
(1U << KEY_TYPE_inode_v2)| \
(1U << KEY_TYPE_snapshot))
static inline bool btree_node_type_needs_gc(enum btree_node_type type) static inline bool btree_node_type_needs_gc(enum btree_node_type type)
{ {
return BTREE_NODE_TYPE_HAS_TRIGGERS & (1U << type); return BTREE_NODE_TYPE_HAS_TRIGGERS & (1U << type);
......
...@@ -495,20 +495,30 @@ static void bch2_btree_update_free(struct btree_update *as) ...@@ -495,20 +495,30 @@ static void bch2_btree_update_free(struct btree_update *as)
mutex_unlock(&c->btree_interior_update_lock); mutex_unlock(&c->btree_interior_update_lock);
} }
static void btree_update_will_delete_key(struct btree_update *as, static void btree_update_add_key(struct btree_update *as,
struct bkey_i *k) struct keylist *keys, struct btree *b)
{ {
BUG_ON(bch2_keylist_u64s(&as->old_keys) + k->k.u64s > struct bkey_i *k = &b->key;
BUG_ON(bch2_keylist_u64s(keys) + k->k.u64s >
ARRAY_SIZE(as->_old_keys)); ARRAY_SIZE(as->_old_keys));
bch2_keylist_add(&as->old_keys, k);
bkey_copy(keys->top, k);
bkey_i_to_btree_ptr_v2(keys->top)->v.mem_ptr = b->c.level + 1;
bch2_keylist_push(keys);
}
static void btree_update_will_delete_key(struct btree_update *as,
struct btree *b)
{
btree_update_add_key(as, &as->old_keys, b);
} }
static void btree_update_will_add_key(struct btree_update *as, static void btree_update_will_add_key(struct btree_update *as,
struct bkey_i *k) struct btree *b)
{ {
BUG_ON(bch2_keylist_u64s(&as->new_keys) + k->k.u64s > btree_update_add_key(as, &as->new_keys, b);
ARRAY_SIZE(as->_new_keys));
bch2_keylist_add(&as->new_keys, k);
} }
/* /*
...@@ -533,13 +543,17 @@ static int btree_update_nodes_written_trans(struct btree_trans *trans, ...@@ -533,13 +543,17 @@ static int btree_update_nodes_written_trans(struct btree_trans *trans,
trans->journal_pin = &as->journal; trans->journal_pin = &as->journal;
for_each_keylist_key(&as->new_keys, k) { for_each_keylist_key(&as->new_keys, k) {
ret = bch2_trans_mark_new(trans, k, 0); unsigned level = bkey_i_to_btree_ptr_v2(k)->v.mem_ptr;
ret = bch2_trans_mark_new(trans, as->btree_id, level, k, 0);
if (ret) if (ret)
return ret; return ret;
} }
for_each_keylist_key(&as->old_keys, k) { for_each_keylist_key(&as->old_keys, k) {
ret = bch2_trans_mark_old(trans, bkey_i_to_s_c(k), 0); 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);
if (ret) if (ret)
return ret; return ret;
} }
...@@ -811,7 +825,7 @@ static void bch2_btree_update_add_new_node(struct btree_update *as, struct btree ...@@ -811,7 +825,7 @@ static void bch2_btree_update_add_new_node(struct btree_update *as, struct btree
mutex_unlock(&c->btree_interior_update_lock); mutex_unlock(&c->btree_interior_update_lock);
btree_update_will_add_key(as, &b->key); btree_update_will_add_key(as, b);
} }
/* /*
...@@ -928,7 +942,7 @@ static void bch2_btree_interior_update_will_free_node(struct btree_update *as, ...@@ -928,7 +942,7 @@ static void bch2_btree_interior_update_will_free_node(struct btree_update *as,
*/ */
btree_update_drop_new_node(c, b); btree_update_drop_new_node(c, b);
btree_update_will_delete_key(as, &b->key); btree_update_will_delete_key(as, b);
as->old_nodes[as->nr_old_nodes] = b; as->old_nodes[as->nr_old_nodes] = b;
as->old_nodes_seq[as->nr_old_nodes] = b->data->keys.seq; as->old_nodes_seq[as->nr_old_nodes] = b->data->keys.seq;
...@@ -1924,11 +1938,13 @@ static int __bch2_btree_node_update_key(struct btree_trans *trans, ...@@ -1924,11 +1938,13 @@ 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_new(trans, new_key, 0); ret = bch2_trans_mark_new(trans, b->c.btree_id, b->c.level + 1,
new_key, 0);
if (ret) if (ret)
return ret; return ret;
ret = bch2_trans_mark_old(trans, bkey_i_to_s_c(&b->key), 0); ret = bch2_trans_mark_old(trans, b->c.btree_id, b->c.level + 1,
bkey_i_to_s_c(&b->key), 0);
if (ret) if (ret)
return ret; return ret;
} }
......
...@@ -484,16 +484,16 @@ static int run_one_trans_trigger(struct btree_trans *trans, struct btree_insert_ ...@@ -484,16 +484,16 @@ static int run_one_trans_trigger(struct btree_trans *trans, struct btree_insert_
((1U << old.k->type) & BTREE_TRIGGER_WANTS_OLD_AND_NEW)) { ((1U << old.k->type) & BTREE_TRIGGER_WANTS_OLD_AND_NEW)) {
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, old, i->k, return bch2_trans_mark_key(trans, i->btree_id, i->level, old, i->k,
BTREE_TRIGGER_INSERT| BTREE_TRIGGER_INSERT|
BTREE_TRIGGER_OVERWRITE| BTREE_TRIGGER_OVERWRITE|
i->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, old, i->flags) ?: 1; return bch2_trans_mark_old(trans, i->btree_id, i->level, old, i->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->k, i->flags) ?: 1; return bch2_trans_mark_new(trans, i->btree_id, i->level, i->k, i->flags) ?: 1;
} else { } else {
return 0; return 0;
} }
......
...@@ -1451,6 +1451,7 @@ static int bch2_trans_mark_stripe_ptr(struct btree_trans *trans, ...@@ -1451,6 +1451,7 @@ static int bch2_trans_mark_stripe_ptr(struct btree_trans *trans,
} }
int bch2_trans_mark_extent(struct btree_trans *trans, int bch2_trans_mark_extent(struct btree_trans *trans,
enum btree_id btree_id, unsigned level,
struct bkey_s_c old, struct bkey_i *new, struct bkey_s_c old, struct bkey_i *new,
unsigned flags) unsigned flags)
{ {
...@@ -1589,6 +1590,7 @@ static int bch2_trans_mark_stripe_bucket(struct btree_trans *trans, ...@@ -1589,6 +1590,7 @@ static int bch2_trans_mark_stripe_bucket(struct btree_trans *trans,
} }
int bch2_trans_mark_stripe(struct btree_trans *trans, int bch2_trans_mark_stripe(struct btree_trans *trans,
enum btree_id btree_id, unsigned level,
struct bkey_s_c old, struct bkey_i *new, struct bkey_s_c old, struct bkey_i *new,
unsigned flags) unsigned flags)
{ {
...@@ -1659,6 +1661,7 @@ int bch2_trans_mark_stripe(struct btree_trans *trans, ...@@ -1659,6 +1661,7 @@ int bch2_trans_mark_stripe(struct btree_trans *trans,
} }
int bch2_trans_mark_inode(struct btree_trans *trans, int bch2_trans_mark_inode(struct btree_trans *trans,
enum btree_id btree_id, unsigned level,
struct bkey_s_c old, struct bkey_s_c old,
struct bkey_i *new, struct bkey_i *new,
unsigned flags) unsigned flags)
...@@ -1675,6 +1678,7 @@ int bch2_trans_mark_inode(struct btree_trans *trans, ...@@ -1675,6 +1678,7 @@ int bch2_trans_mark_inode(struct btree_trans *trans,
} }
int bch2_trans_mark_reservation(struct btree_trans *trans, int bch2_trans_mark_reservation(struct btree_trans *trans,
enum btree_id btree_id, unsigned level,
struct bkey_s_c old, struct bkey_s_c old,
struct bkey_i *new, struct bkey_i *new,
unsigned flags) unsigned flags)
...@@ -1776,6 +1780,7 @@ static int __bch2_trans_mark_reflink_p(struct btree_trans *trans, ...@@ -1776,6 +1780,7 @@ static int __bch2_trans_mark_reflink_p(struct btree_trans *trans,
} }
int bch2_trans_mark_reflink_p(struct btree_trans *trans, int bch2_trans_mark_reflink_p(struct btree_trans *trans,
enum btree_id btree_id, unsigned level,
struct bkey_s_c old, struct bkey_s_c old,
struct bkey_i *new, struct bkey_i *new,
unsigned flags) unsigned flags)
......
...@@ -202,41 +202,14 @@ int bch2_mark_inode(struct btree_trans *, struct bkey_s_c, struct bkey_s_c, unsi ...@@ -202,41 +202,14 @@ int bch2_mark_inode(struct btree_trans *, struct bkey_s_c, struct bkey_s_c, unsi
int bch2_mark_reservation(struct btree_trans *, struct bkey_s_c, struct bkey_s_c, unsigned); int bch2_mark_reservation(struct btree_trans *, struct bkey_s_c, struct bkey_s_c, unsigned);
int bch2_mark_reflink_p(struct btree_trans *, struct bkey_s_c, struct bkey_s_c, unsigned); int bch2_mark_reflink_p(struct btree_trans *, struct bkey_s_c, struct bkey_s_c, unsigned);
int bch2_trans_mark_extent(struct btree_trans *, struct bkey_s_c, struct bkey_i *, unsigned); int bch2_trans_mark_extent(struct btree_trans *, enum btree_id, unsigned, struct bkey_s_c, struct bkey_i *, unsigned);
int bch2_trans_mark_stripe(struct btree_trans *, struct bkey_s_c, struct bkey_i *, unsigned); int bch2_trans_mark_stripe(struct btree_trans *, enum btree_id, unsigned, struct bkey_s_c, struct bkey_i *, unsigned);
int bch2_trans_mark_inode(struct btree_trans *, struct bkey_s_c, struct bkey_i *, unsigned); int bch2_trans_mark_inode(struct btree_trans *, enum btree_id, unsigned, struct bkey_s_c, struct bkey_i *, unsigned);
int bch2_trans_mark_reservation(struct btree_trans *, struct bkey_s_c, struct bkey_i *, unsigned); int bch2_trans_mark_reservation(struct btree_trans *, enum btree_id, unsigned, struct bkey_s_c, struct bkey_i *, unsigned);
int bch2_trans_mark_reflink_p(struct btree_trans *, struct bkey_s_c, struct bkey_i *, unsigned); int bch2_trans_mark_reflink_p(struct btree_trans *, enum btree_id, unsigned, struct bkey_s_c, struct bkey_i *, unsigned);
int bch2_mark_key(struct btree_trans *, struct bkey_s_c, struct bkey_s_c, unsigned); int bch2_mark_key(struct btree_trans *, struct bkey_s_c, struct bkey_s_c, unsigned);
int bch2_trans_mark_key(struct btree_trans *, struct bkey_s_c,
struct bkey_i *, unsigned);
static inline int bch2_trans_mark_old(struct btree_trans *trans,
struct bkey_s_c old, unsigned flags)
{
struct bkey_i deleted;
bkey_init(&deleted.k);
deleted.k.p = old.k->p;
return bch2_trans_mark_key(trans, old, &deleted,
BTREE_TRIGGER_OVERWRITE|flags);
}
static inline int bch2_trans_mark_new(struct btree_trans *trans,
struct bkey_i *new, unsigned flags)
{
struct bkey_i deleted;
bkey_init(&deleted.k);
deleted.k.p = new->k.p;
return bch2_trans_mark_key(trans, bkey_i_to_s_c(&deleted), new,
BTREE_TRIGGER_INSERT|flags);
}
int bch2_trans_fs_usage_apply(struct btree_trans *, struct replicas_delta_list *); int bch2_trans_fs_usage_apply(struct btree_trans *, struct replicas_delta_list *);
int bch2_trans_mark_metadata_bucket(struct btree_trans *, struct bch_dev *, int bch2_trans_mark_metadata_bucket(struct btree_trans *, struct bch_dev *,
......
...@@ -110,6 +110,7 @@ bool bch2_reflink_v_merge(struct bch_fs *c, struct bkey_s _l, struct bkey_s_c _r ...@@ -110,6 +110,7 @@ bool bch2_reflink_v_merge(struct bch_fs *c, struct bkey_s _l, struct bkey_s_c _r
} }
int bch2_trans_mark_reflink_v(struct btree_trans *trans, int bch2_trans_mark_reflink_v(struct btree_trans *trans,
enum btree_id btree_id, unsigned level,
struct bkey_s_c old, struct bkey_i *new, struct bkey_s_c old, struct bkey_i *new,
unsigned flags) unsigned flags)
{ {
...@@ -124,7 +125,7 @@ int bch2_trans_mark_reflink_v(struct btree_trans *trans, ...@@ -124,7 +125,7 @@ int bch2_trans_mark_reflink_v(struct btree_trans *trans,
} }
} }
return bch2_trans_mark_extent(trans, old, new, flags); return bch2_trans_mark_extent(trans, btree_id, level, old, new, flags);
} }
/* indirect inline data */ /* indirect inline data */
...@@ -153,6 +154,7 @@ void bch2_indirect_inline_data_to_text(struct printbuf *out, ...@@ -153,6 +154,7 @@ void bch2_indirect_inline_data_to_text(struct printbuf *out,
} }
int bch2_trans_mark_indirect_inline_data(struct btree_trans *trans, int bch2_trans_mark_indirect_inline_data(struct btree_trans *trans,
enum btree_id btree_id, unsigned level,
struct bkey_s_c old, struct bkey_i *new, struct bkey_s_c old, struct bkey_i *new,
unsigned flags) unsigned flags)
{ {
......
...@@ -20,8 +20,8 @@ int bch2_reflink_v_invalid(const struct bch_fs *, struct bkey_s_c, ...@@ -20,8 +20,8 @@ int bch2_reflink_v_invalid(const struct bch_fs *, struct bkey_s_c,
int, struct printbuf *); int, struct printbuf *);
void bch2_reflink_v_to_text(struct printbuf *, struct bch_fs *, void bch2_reflink_v_to_text(struct printbuf *, struct bch_fs *,
struct bkey_s_c); struct bkey_s_c);
int bch2_trans_mark_reflink_v(struct btree_trans *, struct bkey_s_c, int bch2_trans_mark_reflink_v(struct btree_trans *, enum btree_id, unsigned,
struct bkey_i *, unsigned); struct bkey_s_c, struct bkey_i *, unsigned);
#define bch2_bkey_ops_reflink_v (struct bkey_ops) { \ #define bch2_bkey_ops_reflink_v (struct bkey_ops) { \
.key_invalid = bch2_reflink_v_invalid, \ .key_invalid = bch2_reflink_v_invalid, \
...@@ -36,6 +36,7 @@ int bch2_indirect_inline_data_invalid(const struct bch_fs *, struct bkey_s_c, ...@@ -36,6 +36,7 @@ int bch2_indirect_inline_data_invalid(const struct bch_fs *, struct bkey_s_c,
void bch2_indirect_inline_data_to_text(struct printbuf *, void bch2_indirect_inline_data_to_text(struct printbuf *,
struct bch_fs *, struct bkey_s_c); struct bch_fs *, struct bkey_s_c);
int bch2_trans_mark_indirect_inline_data(struct btree_trans *, int bch2_trans_mark_indirect_inline_data(struct btree_trans *,
enum btree_id, unsigned,
struct bkey_s_c, struct bkey_i *, struct bkey_s_c, struct bkey_i *,
unsigned); unsigned);
......
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