On Sat, Oct 21, 2023 at 06:01:02PM +0100, Matthew Wilcox wrote: > On Sat, Oct 21, 2023 at 08:57:30AM -0700, Boqun Feng wrote: > > You're not wrong, my suggestion here had the assumption that write part > > of ->i_state is atomic (I hadn't look into that). Now a quick look tells > > it isn't, for example in fs/f2fs/namei.c, there is: > > > > inode->i_state |= I_LINKABLE; > > But it doesn't matter what f2fs does to _its_ inodes. tarfs will never > see an f2fs inode. I don't know what the rules are around inode->i_state; Well, maybe I choose a bad example ;-) I agree that tarfs will never see an f2fs inode and since tarfs is the only user right now, the data race should really depend on tarfs right now. But this is general filesystem Rust API, so it should in theory work with everything. Plus fs/dcache.c has something similar: inode->i_state &= ~I_NEW & ~I_CREATING; > I'm only an expert on the page cache, not the rest of the VFS. So > what are the rules around modifying i_state for the VFS? > Agreed, same question here. Regards, Boqun >