Bug 15827
Summary: | ext4_get_blocks may be called while ext4_truncate() is in progress | ||
---|---|---|---|
Product: | File System | Reporter: | Dmitry Monakhov (dmonakhov) |
Component: | ext4 | Assignee: | fs_ext4 (fs_ext4) |
Status: | RESOLVED CODE_FIX | ||
Severity: | high | CC: | dmonakhov, jack |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | v2.6.29-rc5 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
dmesg output
debug patch against ext4.git/next + patches from bug #15792 |
Description
Dmitry Monakhov
2010-04-21 15:36:07 UTC
Created attachment 26082 [details] debug patch against ext4.git/next + patches from bug #15792 The debug patch is rather ugly, but still useful. in given example both alloc and truncate tasks try to modify same path path: 218:[1]33:108506 So ext4_ext_rm_leaf goes crazy because leaf node was modified. Possible solutions: 1) Truncate_task: Drop path collected if ext4_ext_truncate_extend_restart result in journal_restart, ant retry lookup. 2) Save current truncate path some where in inode, so get_block may check about conflicts and to let truncate task to know that path is no longer valid. If so truncate task must goes back to (1). Proposed patch http://patchwork.ozlabs.org/patch/50687/ BTW IMHO it is also reasonable to replace simple printk("strange request..") to something more scary like EXT4_ERROR_INODE(inode, "strange request..") |