mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-22 00:00:03 +03:00
Update bcachefs sources to defaad6d47 bcachefs: Fix an assertion when rebuilding replicas
This commit is contained in:
parent
2ab2ab0f78
commit
19005ecf08
@ -1 +1 @@
|
||||
b12d1535f33661c5f11925d9a2debe28be661088
|
||||
defaad6d47791d3e6285cba323f92847b6e4c226
|
||||
|
@ -679,7 +679,8 @@ void bch2_btree_ptr_debugcheck(struct bch_fs *c, struct btree *b,
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (!bch2_bkey_replicas_marked(c, btree_node_type(b), e.s_c)) {
|
||||
if (!test_bit(BCH_FS_REBUILD_REPLICAS, &c->flags) &&
|
||||
!bch2_bkey_replicas_marked(c, btree_node_type(b), e.s_c)) {
|
||||
bch2_bkey_val_to_text(c, btree_node_type(b),
|
||||
buf, sizeof(buf), k);
|
||||
bch2_fs_bug(c,
|
||||
@ -1713,7 +1714,8 @@ static void bch2_extent_debugcheck_extent(struct bch_fs *c, struct btree *b,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!bch2_bkey_replicas_marked(c, btree_node_type(b), e.s_c)) {
|
||||
if (!test_bit(BCH_FS_REBUILD_REPLICAS, &c->flags) &&
|
||||
!bch2_bkey_replicas_marked(c, btree_node_type(b), e.s_c)) {
|
||||
bch2_bkey_val_to_text(c, btree_node_type(b),
|
||||
buf, sizeof(buf), e.s_c);
|
||||
bch2_fs_bug(c,
|
||||
|
@ -1464,7 +1464,7 @@ static int bch2_fsck_walk_inodes_only(struct bch_fs *c)
|
||||
|
||||
int bch2_fsck(struct bch_fs *c)
|
||||
{
|
||||
if (!c->opts.nofsck)
|
||||
if (c->opts.fsck)
|
||||
return bch2_fsck_full(c);
|
||||
|
||||
if (!c->sb.clean &&
|
||||
|
@ -741,7 +741,8 @@ int bch2_journal_read(struct bch_fs *c, struct list_head *list)
|
||||
jlist.ret = 0;
|
||||
|
||||
for_each_member_device(ca, c, iter) {
|
||||
if (!(bch2_dev_has_data(c, ca) & (1 << BCH_DATA_JOURNAL)))
|
||||
if (!test_bit(BCH_FS_REBUILD_REPLICAS, &c->flags) &&
|
||||
!(bch2_dev_has_data(c, ca) & (1 << BCH_DATA_JOURNAL)))
|
||||
continue;
|
||||
|
||||
if ((ca->mi.state == BCH_MEMBER_STATE_RW ||
|
||||
|
@ -152,9 +152,9 @@ enum opt_type {
|
||||
BCH_OPT(journal_flush_disabled, u8, OPT_RUNTIME, \
|
||||
OPT_BOOL(), \
|
||||
NO_SB_OPT, false) \
|
||||
BCH_OPT(nofsck, u8, OPT_MOUNT, \
|
||||
BCH_OPT(fsck, u8, OPT_MOUNT, \
|
||||
OPT_BOOL(), \
|
||||
NO_SB_OPT, false) \
|
||||
NO_SB_OPT, true) \
|
||||
BCH_OPT(fix_errors, u8, OPT_MOUNT, \
|
||||
OPT_BOOL(), \
|
||||
NO_SB_OPT, false) \
|
||||
|
@ -151,7 +151,7 @@ int bch2_fs_recovery(struct bch_fs *c)
|
||||
bch_info(c, "recovering from clean shutdown, journal seq %llu",
|
||||
le64_to_cpu(clean->journal_seq));
|
||||
|
||||
if (!clean || !c->opts.nofsck) {
|
||||
if (!clean || c->opts.fsck) {
|
||||
ret = bch2_journal_read(c, &journal);
|
||||
if (ret)
|
||||
goto err;
|
||||
@ -218,6 +218,8 @@ int bch2_fs_recovery(struct bch_fs *c)
|
||||
goto err;
|
||||
bch_verbose(c, "mark and sweep done");
|
||||
|
||||
clear_bit(BCH_FS_REBUILD_REPLICAS, &c->flags);
|
||||
|
||||
if (c->opts.noreplay)
|
||||
goto out;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user