mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-08 00:00:12 +03:00
Update bcachefs sources to 433c38cfa796 bcachefs: Drop ptrs before calling bch2_bkey_set_needs_rebalance()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
c98059d35e
commit
e129d33d47
@ -1 +1 @@
|
||||
b31b8a82b13ecb7c36320704d37dc26419ccf5c3
|
||||
433c38cfa796a0f8e97caeaf76a70bf66bc92c2e
|
||||
|
||||
@ -121,6 +121,6 @@ endif
|
||||
# Silence "note: xyz changed in GCC X.X" messages
|
||||
subdir-ccflags-y += $(call cc-disable-warning, psabi)
|
||||
|
||||
ifdef BCACHEFS_DKMS
|
||||
subdir-ccflags-y += -I$(src)
|
||||
endif
|
||||
# kbuild weirdness - sometimes this gets passed automatically, other times we
|
||||
# need to specify it. no idea why:
|
||||
subdir-ccflags-y += -I$(src)
|
||||
|
||||
@ -110,7 +110,7 @@ int bch2_disk_accounting_mod(struct btree_trans *trans,
|
||||
|
||||
if (likely(!gc)) {
|
||||
struct bkey_i_accounting *a;
|
||||
#if 0
|
||||
|
||||
for (a = btree_trans_subbuf_base(trans, &trans->accounting);
|
||||
a != btree_trans_subbuf_top(trans, &trans->accounting);
|
||||
a = (void *) bkey_next(&a->k_i))
|
||||
@ -129,7 +129,7 @@ int bch2_disk_accounting_mod(struct btree_trans *trans,
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
unsigned u64s = sizeof(*a) / sizeof(u64) + nr;
|
||||
a = errptr_try(bch2_trans_subbuf_alloc(trans, &trans->accounting, u64s));
|
||||
|
||||
|
||||
@ -84,9 +84,9 @@ static int bch2_dev_usrdata_drop_key(struct btree_trans *trans,
|
||||
enum set_needs_rebalance_ctx ctx = SET_NEEDS_REBALANCE_opt_change;
|
||||
struct bch_inode_opts opts;
|
||||
|
||||
try(drop_dev_ptrs(c, bkey_i_to_s(n), dev_idx, flags, err, false));
|
||||
try(bch2_extent_get_apply_io_opts_one(trans, &opts, iter, k, ctx));
|
||||
try(bch2_bkey_set_needs_rebalance(c, &opts, n, ctx, 0));
|
||||
try(drop_dev_ptrs(c, bkey_i_to_s(n), dev_idx, flags, err, false));
|
||||
|
||||
/*
|
||||
* Since we're not inserting through an extent iterator
|
||||
|
||||
@ -604,6 +604,8 @@ retry:
|
||||
|
||||
struct btree_iter iter;
|
||||
struct bkey_s_c k;
|
||||
int ret = 0;
|
||||
|
||||
try(lockrestart_do(trans,
|
||||
bkey_err(k = bch2_bkey_get_iter(trans, &iter,
|
||||
u->btree_id, bkey_start_pos(&u->k.k->k),
|
||||
@ -611,15 +613,15 @@ retry:
|
||||
|
||||
if (!bkey_and_val_eq(k, bkey_i_to_s_c(u->k.k))) {
|
||||
/* extent we wanted to read no longer exists: */
|
||||
rbio->ret = bch_err_throw(trans->c, data_read_key_overwritten);
|
||||
ret = bch_err_throw(trans->c, data_read_key_overwritten);
|
||||
goto err;
|
||||
}
|
||||
|
||||
int ret = __bch2_read_extent(trans, rbio, bvec_iter,
|
||||
bkey_start_pos(&u->k.k->k),
|
||||
u->btree_id,
|
||||
bkey_i_to_s_c(u->k.k),
|
||||
0, failed, flags, -1);
|
||||
ret = __bch2_read_extent(trans, rbio, bvec_iter,
|
||||
bkey_start_pos(&u->k.k->k),
|
||||
u->btree_id,
|
||||
bkey_i_to_s_c(u->k.k),
|
||||
0, failed, flags, -1);
|
||||
err:
|
||||
bch2_trans_iter_exit(&iter);
|
||||
|
||||
@ -1316,9 +1318,8 @@ retry_pick:
|
||||
|
||||
if (likely(!rbio->pick.do_ec_reconstruct)) {
|
||||
if (unlikely(!rbio->have_ioref)) {
|
||||
bch2_rbio_error(rbio,
|
||||
-BCH_ERR_data_read_retry_device_offline,
|
||||
BLK_STS_IOERR);
|
||||
ret = bch_err_throw(c, data_read_retry_device_offline);
|
||||
bch2_rbio_error(rbio, ret, BLK_STS_IOERR);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -1344,8 +1345,8 @@ retry_pick:
|
||||
} else {
|
||||
/* Attempting reconstruct read: */
|
||||
if (bch2_ec_read_extent(trans, rbio, k)) {
|
||||
bch2_rbio_error(rbio, -BCH_ERR_data_read_retry_ec_reconstruct_err,
|
||||
BLK_STS_IOERR);
|
||||
ret = bch_err_throw(c, data_read_retry_ec_reconstruct_err);
|
||||
bch2_rbio_error(rbio, ret, BLK_STS_IOERR);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user