diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-09-26 21:19:17 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-09-28 03:46:35 +0200 |
commit | fd65378db9998a6deafdc4910ee1b01b377d6fee (patch) | |
tree | b289fa116cb51b05086807a8fa93d07557ed84af /fs/bcachefs/super-io.c | |
parent | bcachefs: Fix BCH_SB_ERRS() so we can reorder (diff) | |
download | linux-fd65378db9998a6deafdc4910ee1b01b377d6fee.tar.xz linux-fd65378db9998a6deafdc4910ee1b01b377d6fee.zip |
bcachefs: Don't delete unlinked inodes before logged op resume
Previously, check_inode() would delete unlinked inodes if they weren't
on the deleted list - this code dating from before there was a deleted
list.
But, if we crash during a logged op (truncate or finsert/fcollapse) of
an unlinked file, logged op resume will get confused if the inode has
already been deleted - instead, just add it to the deleted list if it
needs to be there; delete_dead_inodes runs after logged op resume.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to '')
-rw-r--r-- | fs/bcachefs/super-io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/super-io.c b/fs/bcachefs/super-io.c index b2e914841b5f..ce7410d72089 100644 --- a/fs/bcachefs/super-io.c +++ b/fs/bcachefs/super-io.c @@ -1190,7 +1190,8 @@ static void bch2_sb_ext_to_text(struct printbuf *out, struct bch_sb *sb, le_bitvector_to_cpu(errors_silent, (void *) e->errors_silent, sizeof(e->errors_silent) * 8); prt_printf(out, "Errors to silently fix:\t"); - prt_bitflags_vector(out, bch2_sb_error_strs, errors_silent, sizeof(e->errors_silent) * 8); + prt_bitflags_vector(out, bch2_sb_error_strs, errors_silent, + min(BCH_FSCK_ERR_MAX, sizeof(e->errors_silent) * 8)); prt_newline(out); kfree(errors_silent); |