On 1/3/26 19:03, Andrew Morton wrote:
On Sun, 14 Dec 2025 19:00:43 -0800 Joanne Koong joannelkoong@gmail.com wrote:
Skip waiting on writeback for inodes that belong to mappings that do not have data integrity guarantees (denoted by the AS_NO_DATA_INTEGRITY mapping flag).
This restores fuse back to prior behavior where syncs are no-ops. This is needed because otherwise, if a system is running a faulty fuse server that does not reply to issued write requests, this will cause wait_sb_inodes() to wait forever.
Fixes: 0c58a97f919c ("fuse: remove tmp folio for writebacks and internal rb tree") Reported-by: Athul Krishna athul.krishna.kr@protonmail.com Reported-by: J. Neuschäfer j.neuschaefer@gmx.net Cc: stable@vger.kernel.org Signed-off-by: Joanne Koong joannelkoong@gmail.com
..
--- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -2751,7 +2751,8 @@ static void wait_sb_inodes(struct super_block *sb) * do not have the mapping lock. Skip it here, wb completion * will remove it. */
if (!mapping_tagged(mapping, PAGECACHE_TAG_WRITEBACK))
if (!mapping_tagged(mapping, PAGECACHE_TAG_WRITEBACK) ||mapping_no_data_integrity(mapping)) continue;It's not obvious why a no-data-integrity mapping would want to skip writeback - what do these things have to do with each other?
So can we please have a v2 which has a comment here explaining this to the reader?
Sorry for not replying earlier, I missed a couple of mails sent to my @redhat address due to @gmail being force-unsubscribed from linux-mm ...
Probably sufficient to add at the beginning of the commit:
"Above the while() loop in wait_sb_inodes(), we document that we must wait for all pages under writeback for data integrity. Consequently, if a mapping, like fuse, traditionally does not have data integrity semantics, there is no need to wait at all; we can simply skip these inodes.
So skip ..."