Re: [PATCH 01/13] fs: avoid double-writing inodes on lazytime expiration

From
Christoph Hellwig <hch@lst.de>
Date
2021-01-08 08:55:32
Also in
linux-ext4, linux-f2fs-devel, linux-fsdevel, stable
Reply to
Eric Biggers, 2021-01-07
On Thu, Jan 07, 2021 at 01:46:37PM -0800, Eric Biggers wrote:
It looks like that's going to work, and it fixes the XFS bug too.

Note that if __writeback_single_inode() is called from writeback_single_inode()
(rather than writeback_sb_inodes()), then the inode might not be queued for
sync, in which case mark_inode_dirty_sync() will move it to a writeback list.

That's okay because afterwards, writeback_single_inode() will delete the inode
from any writeback list if it's been fully cleaned, right?  So clean inodes
won't get left on a writeback list.

It's confusing because there are comments in writeback_single_inode() and above
__writeback_single_inode() that say that the inode must not be moved between
writeback lists.  I take it that those comments are outdated, as they predate
I_SYNC_QUEUED being introduced by commit 5afced3bf281 ("writeback: Avoid
skipping inode writeback")?
Yes.  I think we need to update the comment as well.
Thread (37 messages) 37 messages, 4 authors, last reply 2021-01-09
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help