|
Subject: [PATCH, RFC] writeback: avoid redirtying when ->write_inode failed to clear I_DIRTY Newsgroups: gmane.comp.file-systems.xfs.general Date: Saturday 27th August 2011 06:14:09 UTC (over 6 years ago) Right now ->write_inode has no way to safely return a EAGAIN without explicitly redirtying the inode, as we would lose the dirty state otherwise. Most filesystems get this wrong, but XFS makes heavy use of it to avoid blocking the flusher thread when ->write_inode hits contentended inode locks. A contended ilock is something XFS can hit very easibly when extending files, as the data I/O completion handler takes the lock to update the size, and the ->write_inode call can race with it fairly easily if writing enough data in one go so that the completion for the first write come in just before we call ->write_inode. Change the handling of this case to use requeue_io for a quick retry instead of redirty_tail, which keeps moving out the dirtied_when data and thus keeps delaying the writeout more and more with every failed attempt to get the lock. Signed-off-by: Christoph Hellwig |
||