From: Andrew Morton <akpm@linux-foundation.org>
To: David Howells <dhowells@redhat.com>
Cc: "Vishal Moola (Oracle)" <vishal.moola@gmail.com>,
linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] afs: Fix waiting for writeback then skipping folio
Date: Fri, 16 Jun 2023 16:22:02 -0700 [thread overview]
Message-ID: <20230616162202.f46e1279d6b638406fd0eecd@linux-foundation.org> (raw)
In-Reply-To: <702179.1686955382@warthog.procyon.org.uk>
On Fri, 16 Jun 2023 23:43:02 +0100 David Howells <dhowells@redhat.com> wrote:
> Andrew Morton <akpm@linux-foundation.org> wrote:
>
> > > Commit acc8d8588cb7 converted afs_writepages_region() to write back a
> > > folio batch. The function waits for writeback to a folio, but then
> > > proceeds to the rest of the batch without trying to write that folio
> > > again. This patch fixes has it attempt to write the folio again.
> > >
> > > This has only been compile tested.
> >
> > This seems fairly serious?
>
> We will try to write the again later, but sync()/fsync() might now have
> skipped it.
>
> > From my reading, we'll fail to write out the dirty data. Presumably
> > not easily observable, as it will get written out again later on.
>
> As it's a network filesystem, interactions with third parties could cause
> apparent corruption. Closing a file will flush it - but if there's a
> simultaneous op of some other kind, a bit of a flush or a sync may get missed
> and the copy visible to another user be temporarily missing that bit.
>
> > But we're also calling afs_write_back_from_locked_folio() with an unlocked
> > folio, which might cause mayhem.
>
> Without this patch, you mean? There's a "continue" statement that should send
> us back to the top of the loop before we get as far as
> afs_write_back_from_locked_folio() - and then the folio_unlock() there would
> go bang.
>
Well, what I'm really asking is the thing I ask seven times a day:
- what are the end-user visible effects of the bug
- should be fix be backported into earlier kernels
next prev parent reply other threads:[~2023-06-16 23:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 20:41 [PATCH] afs: Fix dangling folio ref counts in writeback Vishal Moola (Oracle)
2023-06-07 20:41 ` [PATCH] afs: Fix waiting for writeback then skipping folio Vishal Moola (Oracle)
2023-06-09 0:50 ` Andrew Morton
2023-06-16 22:43 ` David Howells
2023-06-16 23:22 ` Andrew Morton [this message]
2023-06-16 23:26 ` David Howells
2023-06-16 22:30 ` [PATCH] afs: Fix dangling folio ref counts in writeback David Howells
2023-06-16 22:43 ` [PATCH] afs: Fix waiting for writeback then skipping folio David Howells
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=20230616162202.f46e1279d6b638406fd0eecd@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=linux-afs@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vishal.moola@gmail.com \
/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
Powered by JetHome