From: David Howells <dhowells@redhat.com>
To: Dominique Martinet <asmadeus@codewreck.org>
Cc: dhowells@redhat.com, Michael Mulqueen <mike@method-b.uk>,
ericvh@kernel.org, lucho@ionkov.net, pc@manguebit.org,
linux_oss@crudebyte.com, v9fs@lists.linux.dev,
netfs@lists.linux.dev, linux-fsdevel@vger.kernel.org,
regressions@lists.linux.dev
Subject: Re: PROBLEM: [REGRESSION 7.1-rc4 -> 7.1-rc5] 9p: silent NUL corruption of file data on cache modes with CACHE_WRITEBACK
Date: Sun, 13 Sep 2026 08:55:13 +0100 [thread overview]
Message-ID: <2718782.1789286113@warthog.procyon.org.uk> (raw)
In-Reply-To: <aqUIEEvKad-o-zft@codewreck.org>
Dominique Martinet <asmadeus@codewreck.org> wrote:
> When v9fs_issue_write() is re-entered, writing the remaining data at the
> original subreq->start offset rather than subreq->start + subreq->transferred
> would overwrite previously written data.
Retry should now be resetting ->transferred to 0, so actually I should remove
adding ->transferred from other filesystems.
> > + spin_lock(&inode->i_lock);
> > +
> > + /* We can read the sizes directly as we hold i_lock. */
> > + i_size = inode->i_size;
> Does reading and updating i_size from this asynchronous writeback path race
> with concurrent truncate operations?
Supposedly, you're not allowed to change i_size unless you hold
i_lock... which we do.
> Also, reading inode->i_size directly without i_size_read() bypasses
> i_size_seqcount, which can cause torn reads on 32-bit platforms.
Which should be irrelevant as we hold i_lock.
David
next prev parent reply other threads:[~2026-09-13 7:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 10:56 PROBLEM: [REGRESSION 7.1-rc4 -> 7.1-rc5] 9p: silent NUL corruption of file data on cache modes with CACHE_WRITEBACK Michael Mulqueen
2026-09-10 12:23 ` Dominique Martinet
2026-09-10 14:06 ` Christian Schoenebeck
2026-09-12 1:43 ` Dominique Martinet
2026-09-11 7:16 ` David Howells
2026-09-11 8:10 ` David Howells
2026-09-11 9:25 ` David Howells
2026-09-11 12:53 ` Michael Mulqueen
2026-09-11 13:13 ` David Howells
2026-09-12 8:06 ` Dominique Martinet
2026-09-13 7:55 ` David Howells [this message]
2026-09-13 8:56 ` Dominique Martinet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2718782.1789286113@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=asmadeus@codewreck.org \
--cc=ericvh@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux_oss@crudebyte.com \
--cc=lucho@ionkov.net \
--cc=mike@method-b.uk \
--cc=netfs@lists.linux.dev \
--cc=pc@manguebit.org \
--cc=regressions@lists.linux.dev \
--cc=v9fs@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox