Bug 205569
Summary: | potential data race (likely benign) on inode->i_state (reading and writing to different bits) | ||
---|---|---|---|
Product: | File System | Reporter: | Meng Xu (mengxu.gatech) |
Component: | ext4 | Assignee: | fs_ext4 (fs_ext4) |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | tytso |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 5.4-rc5 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Meng Xu
2019-11-18 20:41:40 UTC
The writeback thread is only applicable for data files. While rmdir() is only applicable for directories. Also, in both of these function traces, what you referenced is i_state bits being *read*: [WRITE] dirty = inode->i_state & I_DIRTY; ^^^^^ not correct! That being said, there are places in fs/fs-writeback.c where i_state is modified, and there are code paths where ext4_orphan_add() can be called on regular data files --- just not the ones you've listed in this bug. Can you recheck the call traces and make sure they are correct? (In reply to Theodore Tso from comment #1) > The writeback thread is only applicable for data files. While rmdir() is > only applicable for directories. Also, in both of these function traces, > what you referenced is i_state bits being *read*: > > [WRITE] dirty = inode->i_state & I_DIRTY; > ^^^^^ not correct! > > That being said, there are places in fs/fs-writeback.c where i_state is > modified, and there are code paths where ext4_orphan_add() can be called on > regular data files --- just not the ones you've listed in this bug. > > Can you recheck the call traces and make sure they are correct? Hi Ted, My bad, the [WRITE] location is a few lines down the path, inode->i_state &= ~dirty; Best Regards, Meng Yes, it's benign. An inode which is I_NEW or I_FREEING will never be in the writeback. (In reply to Theodore Tso from comment #3) > Yes, it's benign. An inode which is I_NEW or I_FREEING will never be in > the writeback. Many thanks for the confirmation Ted, in the future, I'll post these unsure cases to the mailing list instead of filing a bug report. |