mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-04-01 00:00:03 +03:00
Update bcachefs sources to 10ca1f99f8c9 bcachefs: Fix bch2_dev_btree_bitmap_marked_sectors() shift
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
cf44deafe6
commit
c824bbe69d
@ -1 +1 @@
|
||||
ad29cf999a9161e7849aa229d2028854f90728c2
|
||||
10ca1f99f8c99a3d992b686cdc29d427807070e5
|
||||
|
@ -888,7 +888,7 @@ static int validate_bset_keys(struct bch_fs *c, struct btree *b,
|
||||
-BCH_ERR_btree_node_read_err_fixable,
|
||||
c, NULL, b, i,
|
||||
btree_node_bkey_bad_u64s,
|
||||
"bad k->u64s %u (min %u max %lu)", k->u64s,
|
||||
"bad k->u64s %u (min %u max %zu)", k->u64s,
|
||||
bkeyp_key_u64s(&b->format, k),
|
||||
U8_MAX - BKEY_U64s + bkeyp_key_u64s(&b->format, k)))
|
||||
goto drop_this_key;
|
||||
|
@ -302,6 +302,8 @@ again:
|
||||
|
||||
start->max_key = bpos_predecessor(n->min_key);
|
||||
start->range_updated = true;
|
||||
} else if (n->level) {
|
||||
n->overwritten = true;
|
||||
} else {
|
||||
struct printbuf buf = PRINTBUF;
|
||||
|
||||
|
@ -232,13 +232,15 @@ static long bch2_ioctl_fsck_offline(struct bch_ioctl_fsck_offline __user *user_a
|
||||
/* We need request_key() to be called before we punt to kthread: */
|
||||
opt_set(thr->opts, nostart, true);
|
||||
|
||||
bch2_thread_with_stdio_init(&thr->thr, &bch2_offline_fsck_ops);
|
||||
|
||||
thr->c = bch2_fs_open(devs.data, arg.nr_devs, thr->opts);
|
||||
|
||||
if (!IS_ERR(thr->c) &&
|
||||
thr->c->opts.errors == BCH_ON_ERROR_panic)
|
||||
thr->c->opts.errors = BCH_ON_ERROR_ro;
|
||||
|
||||
ret = bch2_run_thread_with_stdio(&thr->thr, &bch2_offline_fsck_ops);
|
||||
ret = __bch2_run_thread_with_stdio(&thr->thr);
|
||||
out:
|
||||
darray_for_each(devs, i)
|
||||
kfree(*i);
|
||||
|
@ -249,7 +249,10 @@ int bch2_journal_replay(struct bch_fs *c)
|
||||
|
||||
struct journal_key *k = *kp;
|
||||
|
||||
replay_now_at(j, k->journal_seq);
|
||||
if (k->journal_seq)
|
||||
replay_now_at(j, k->journal_seq);
|
||||
else
|
||||
replay_now_at(j, j->replay_journal_seq_end);
|
||||
|
||||
ret = commit_do(trans, NULL, NULL,
|
||||
BCH_TRANS_COMMIT_no_enospc|
|
||||
|
@ -235,7 +235,7 @@ static inline bool bch2_dev_btree_bitmap_marked_sectors(struct bch_dev *ca, u64
|
||||
{
|
||||
u64 end = start + sectors;
|
||||
|
||||
if (end > 64 << ca->mi.btree_bitmap_shift)
|
||||
if (end > 64ULL << ca->mi.btree_bitmap_shift)
|
||||
return false;
|
||||
|
||||
for (unsigned bit = sectors >> ca->mi.btree_bitmap_shift;
|
||||
|
@ -294,16 +294,27 @@ static int thread_with_stdio_fn(void *arg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int bch2_run_thread_with_stdio(struct thread_with_stdio *thr,
|
||||
const struct thread_with_stdio_ops *ops)
|
||||
void bch2_thread_with_stdio_init(struct thread_with_stdio *thr,
|
||||
const struct thread_with_stdio_ops *ops)
|
||||
{
|
||||
stdio_buf_init(&thr->stdio.input);
|
||||
stdio_buf_init(&thr->stdio.output);
|
||||
thr->ops = ops;
|
||||
}
|
||||
|
||||
int __bch2_run_thread_with_stdio(struct thread_with_stdio *thr)
|
||||
{
|
||||
return bch2_run_thread_with_file(&thr->thr, &thread_with_stdio_fops, thread_with_stdio_fn);
|
||||
}
|
||||
|
||||
int bch2_run_thread_with_stdio(struct thread_with_stdio *thr,
|
||||
const struct thread_with_stdio_ops *ops)
|
||||
{
|
||||
bch2_thread_with_stdio_init(thr, ops);
|
||||
|
||||
return __bch2_run_thread_with_stdio(thr);
|
||||
}
|
||||
|
||||
int bch2_run_thread_with_stdout(struct thread_with_stdio *thr,
|
||||
const struct thread_with_stdio_ops *ops)
|
||||
{
|
||||
|
@ -63,6 +63,9 @@ struct thread_with_stdio {
|
||||
const struct thread_with_stdio_ops *ops;
|
||||
};
|
||||
|
||||
void bch2_thread_with_stdio_init(struct thread_with_stdio *,
|
||||
const struct thread_with_stdio_ops *);
|
||||
int __bch2_run_thread_with_stdio(struct thread_with_stdio *);
|
||||
int bch2_run_thread_with_stdio(struct thread_with_stdio *,
|
||||
const struct thread_with_stdio_ops *);
|
||||
int bch2_run_thread_with_stdout(struct thread_with_stdio *,
|
||||
|
Loading…
Reference in New Issue
Block a user