Skip to contentSkip to conversation

Mystery solved? files not written for days...

DISCUSSION Eric Sandeen 2 participants 2 messages Mar 30, 2009

lore
Share & tools
lore
#0 lore raw

On LKML:

[PATCH] writeback: guard against jiffies wraparound on inode->dirtied_when checks

When a file is continually dirtied, the check in sync_sb_inodes:

        /* Was this inode dirtied after sync_sb_inodes was called? */
        if (time_after(inode->dirtied_when, start))
                break;

may have large windows where this trips on the first (continually-dirtied) inode on the list when the time_after check has wrapped, causing the nothing to be written out for that superblock, potentially for days.

Could this be the reason for those various "hey, my file disappeared after a crash and I hadn't written to it for *days*" reports we got now and then, leaving us all scratching our heads?

-Eric

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#1 lore raw
Quoted 4 lines · Eric Sandeen

On LKML:

[PATCH] writeback: guard against jiffies wraparound on inode->dirtied_when checks

The "jiffies wraparound" sounds very familiar, but I thought it's been fixed ages ago.

Quoted 6 lines

When a file is continually dirtied, the check in sync_sb_inodes:

       /* Was this inode dirtied after sync_sb_inodes was called? */
       if (time_after(inode->dirtied_when, start))
               break;
Quoted 8 lines

may have large windows where this trips on the first (continually-dirtied) inode on the list when the time_after check has wrapped, causing the nothing to be written out for that superblock, potentially for days.

Could this be the reason for those various "hey, my file disappeared after a crash and I hadn't written to it for *days*" reports we got now and then, leaving us all scratching our heads?

The "jiffies wraparound" could definitely cause this.

Felix

Quoted 8 lines

-Eric

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs