bcachefs: __bch2_btree_insert() -> bch2_btree_insert_trans()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2023-09-11 19:48:07 -04:00
parent 39791d7de2
commit aef32bf7cc
6 changed files with 18 additions and 18 deletions

View File

@ -577,7 +577,7 @@ int bch2_bucket_gens_init(struct bch_fs *c)
ret = commit_do(&trans, NULL, NULL,
BTREE_INSERT_NOFAIL|
BTREE_INSERT_LAZY_RW,
__bch2_btree_insert(&trans, BTREE_ID_bucket_gens, &g.k_i, 0));
bch2_btree_insert_trans(&trans, BTREE_ID_bucket_gens, &g.k_i, 0));
if (ret)
break;
have_bucket_gens_key = false;
@ -597,7 +597,7 @@ int bch2_bucket_gens_init(struct bch_fs *c)
ret = commit_do(&trans, NULL, NULL,
BTREE_INSERT_NOFAIL|
BTREE_INSERT_LAZY_RW,
__bch2_btree_insert(&trans, BTREE_ID_bucket_gens, &g.k_i, 0));
bch2_btree_insert_trans(&trans, BTREE_ID_bucket_gens, &g.k_i, 0));
bch2_trans_exit(&trans);
@ -1911,7 +1911,7 @@ static int bch2_dev_freespace_init(struct bch_fs *c, struct bch_dev *ca,
freespace->k.p = k.k->p;
freespace->k.size = k.k->size;
ret = __bch2_btree_insert(&trans, BTREE_ID_freespace, freespace, 0) ?:
ret = bch2_btree_insert_trans(&trans, BTREE_ID_freespace, freespace, 0) ?:
bch2_trans_commit(&trans, NULL, NULL,
BTREE_INSERT_LAZY_RW|
BTREE_INSERT_NOFAIL);

View File

@ -648,8 +648,8 @@ int bch2_btree_insert_nonextent(struct btree_trans *trans,
return ret;
}
int __bch2_btree_insert(struct btree_trans *trans, enum btree_id id,
struct bkey_i *k, enum btree_update_flags flags)
int bch2_btree_insert_trans(struct btree_trans *trans, enum btree_id id,
struct bkey_i *k, enum btree_update_flags flags)
{
struct btree_iter iter;
int ret;
@ -676,7 +676,7 @@ int bch2_btree_insert(struct bch_fs *c, enum btree_id id,
u64 *journal_seq, int flags)
{
return bch2_trans_do(c, disk_res, journal_seq, flags,
__bch2_btree_insert(&trans, id, k, 0));
bch2_btree_insert_trans(&trans, id, k, 0));
}
int bch2_btree_delete_extent_at(struct btree_trans *trans, struct btree_iter *iter,

View File

@ -62,7 +62,7 @@ int bch2_btree_delete_at_buffered(struct btree_trans *, enum btree_id, struct bp
int bch2_btree_insert_nonextent(struct btree_trans *, enum btree_id,
struct bkey_i *, enum btree_update_flags);
int __bch2_btree_insert(struct btree_trans *, enum btree_id, struct bkey_i *,
int bch2_btree_insert_trans(struct btree_trans *, enum btree_id, struct bkey_i *,
enum btree_update_flags);
int bch2_btree_insert(struct bch_fs *, enum btree_id, struct bkey_i *,
struct disk_reservation *, u64 *, int flags);

View File

@ -1201,7 +1201,7 @@ static s64 __bch2_mark_reflink_p(struct btree_trans *trans,
new->k.p = bkey_start_pos(p.k);
new->k.p.offset += *idx - start;
bch2_key_resize(&new->k, next_idx - *idx);
ret = __bch2_btree_insert(trans, BTREE_ID_extents, &new->k_i,
ret = bch2_btree_insert_trans(trans, BTREE_ID_extents, &new->k_i,
BTREE_TRIGGER_NORUN);
}

View File

@ -1914,7 +1914,7 @@ static int check_root_trans(struct btree_trans *trans)
ret = commit_do(trans, NULL, NULL,
BTREE_INSERT_NOFAIL|
BTREE_INSERT_LAZY_RW,
__bch2_btree_insert(trans, BTREE_ID_subvolumes,
bch2_btree_insert_trans(trans, BTREE_ID_subvolumes,
&root_subvol.k_i, 0));
if (ret) {
bch_err_msg(c, ret, "writing root subvol");

View File

@ -622,7 +622,7 @@ static int rand_insert(struct bch_fs *c, u64 nr)
k.k.p.snapshot = U32_MAX;
ret = commit_do(&trans, NULL, NULL, 0,
__bch2_btree_insert(&trans, BTREE_ID_xattrs, &k.k_i, 0));
bch2_btree_insert_trans(&trans, BTREE_ID_xattrs, &k.k_i, 0));
if (ret)
break;
}
@ -649,14 +649,14 @@ static int rand_insert_multi(struct bch_fs *c, u64 nr)
}
ret = commit_do(&trans, NULL, NULL, 0,
__bch2_btree_insert(&trans, BTREE_ID_xattrs, &k[0].k_i, 0) ?:
__bch2_btree_insert(&trans, BTREE_ID_xattrs, &k[1].k_i, 0) ?:
__bch2_btree_insert(&trans, BTREE_ID_xattrs, &k[2].k_i, 0) ?:
__bch2_btree_insert(&trans, BTREE_ID_xattrs, &k[3].k_i, 0) ?:
__bch2_btree_insert(&trans, BTREE_ID_xattrs, &k[4].k_i, 0) ?:
__bch2_btree_insert(&trans, BTREE_ID_xattrs, &k[5].k_i, 0) ?:
__bch2_btree_insert(&trans, BTREE_ID_xattrs, &k[6].k_i, 0) ?:
__bch2_btree_insert(&trans, BTREE_ID_xattrs, &k[7].k_i, 0));
bch2_btree_insert_trans(&trans, BTREE_ID_xattrs, &k[0].k_i, 0) ?:
bch2_btree_insert_trans(&trans, BTREE_ID_xattrs, &k[1].k_i, 0) ?:
bch2_btree_insert_trans(&trans, BTREE_ID_xattrs, &k[2].k_i, 0) ?:
bch2_btree_insert_trans(&trans, BTREE_ID_xattrs, &k[3].k_i, 0) ?:
bch2_btree_insert_trans(&trans, BTREE_ID_xattrs, &k[4].k_i, 0) ?:
bch2_btree_insert_trans(&trans, BTREE_ID_xattrs, &k[5].k_i, 0) ?:
bch2_btree_insert_trans(&trans, BTREE_ID_xattrs, &k[6].k_i, 0) ?:
bch2_btree_insert_trans(&trans, BTREE_ID_xattrs, &k[7].k_i, 0));
if (ret)
break;
}