Re: Race between generic_forget_inode() and sync_sb_inodes()?

2007-11-30 Thread Jarek Poplawski
On 30-11-2007 00:03, Neil Brown wrote: > On Friday November 30, [EMAIL PROTECTED] wrote: ... >> Or have I just not had enough coffee this morning? > > :-) And I cannot even blame the lack of coffee as I don't drink it. > Looks like logical error... (Or I haven't had enough coffee this morning

Re: Race between generic_forget_inode() and sync_sb_inodes()?

2007-11-30 Thread Jarek Poplawski
On 30-11-2007 00:03, Neil Brown wrote: On Friday November 30, [EMAIL PROTECTED] wrote: ... Or have I just not had enough coffee this morning? :-) And I cannot even blame the lack of coffee as I don't drink it. Looks like logical error... (Or I haven't had enough coffee this morning

Re: Race between generic_forget_inode() and sync_sb_inodes()?

2007-11-29 Thread Neil Brown
On Friday November 30, [EMAIL PROTECTED] wrote: > On Fri, Nov 30, 2007 at 09:07:06AM +1100, Neil Brown wrote: > > > > Hi David, > > > > On Friday November 30, [EMAIL PROTECTED] wrote: > > > > > > > > > I came across this because I've been making changes to XFS to avoid the > > > inode hash,

Re: Race between generic_forget_inode() and sync_sb_inodes()?

2007-11-29 Thread David Chinner
On Fri, Nov 30, 2007 at 09:07:06AM +1100, Neil Brown wrote: > > Hi David, > > On Friday November 30, [EMAIL PROTECTED] wrote: > > > > > > I came across this because I've been making changes to XFS to avoid the > > inode hash, and I've found that I need to remove the inode from the > > dirty

Re: Race between generic_forget_inode() and sync_sb_inodes()?

2007-11-29 Thread Neil Brown
Hi David, On Friday November 30, [EMAIL PROTECTED] wrote: > > > I came across this because I've been making changes to XFS to avoid the > inode hash, and I've found that I need to remove the inode from the > dirty list when setting I_WILL_FREE to avoid this race. I can't see > how this race is

Race between generic_forget_inode() and sync_sb_inodes()?

2007-11-29 Thread David Chinner
If we are in the process of dropping an inode and it is hashed, generic_forget_inode() will mark it I_WILL_FREE and drop the inode_lock before calling write_inode_now(). However, at this point, the inode is still on the sb->s_dirty_list so sync_sb_inodes() could see it and try to write it back.

Race between generic_forget_inode() and sync_sb_inodes()?

2007-11-29 Thread David Chinner
If we are in the process of dropping an inode and it is hashed, generic_forget_inode() will mark it I_WILL_FREE and drop the inode_lock before calling write_inode_now(). However, at this point, the inode is still on the sb-s_dirty_list so sync_sb_inodes() could see it and try to write it back.

Re: Race between generic_forget_inode() and sync_sb_inodes()?

2007-11-29 Thread Neil Brown
Hi David, On Friday November 30, [EMAIL PROTECTED] wrote: I came across this because I've been making changes to XFS to avoid the inode hash, and I've found that I need to remove the inode from the dirty list when setting I_WILL_FREE to avoid this race. I can't see how this race is

Re: Race between generic_forget_inode() and sync_sb_inodes()?

2007-11-29 Thread David Chinner
On Fri, Nov 30, 2007 at 09:07:06AM +1100, Neil Brown wrote: Hi David, On Friday November 30, [EMAIL PROTECTED] wrote: I came across this because I've been making changes to XFS to avoid the inode hash, and I've found that I need to remove the inode from the dirty list when

Re: Race between generic_forget_inode() and sync_sb_inodes()?

2007-11-29 Thread Neil Brown
On Friday November 30, [EMAIL PROTECTED] wrote: On Fri, Nov 30, 2007 at 09:07:06AM +1100, Neil Brown wrote: Hi David, On Friday November 30, [EMAIL PROTECTED] wrote: I came across this because I've been making changes to XFS to avoid the inode hash, and I've found that I