Bug 216466
Summary: | ext4: dir corruption when ext4_dx_add_entry() fails | ||
---|---|---|---|
Product: | File System | Reporter: | Zhihao Cheng (chengzhihao1) |
Component: | ext4 | Assignee: | fs_ext4 (fs_ext4) |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 6.0.0-rc4 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
diff
test.sh |
Description
Zhihao Cheng
2022-09-09 02:21:36 UTC
Reproducer: 1. Apply diff and compile kernel 2. ./test.sh,Stop machine after seeing kernel message "wait shutdown" 3. reboot,fsck -fa /dev/sdb fsck from util-linux 2.38 /dev/sdb: recovering journal /dev/sdb: Inode 12, end of extent exceeds allowed value (logical block 128, physical block 3819, len 1) /dev/sdb: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options) 4. fsck -fn /dev/sdb fsck from util-linux 2.38 e2fsck 1.43.4 (31-Jan-2017) Pass 1: Checking inodes, blocks, and sizes Inode 12, end of extent exceeds allowed value (logical block 128, physical block 3819, len 1) Clear? no Inode 12, i_blocks is 262, should be 260. Fix? no Pass 2: Checking directory structure Problem in HTREE directory inode 12 (/dir): bad block number 128. Clear HTree index? no Problem in HTREE directory inode 12: block #2 has invalid depth (2) Problem in HTREE directory inode 12: block #2 has bad max hash Problem in HTREE directory inode 12: block #2 not referenced Created attachment 301777 [details]
diff
Created attachment 301778 [details]
test.sh
|