Skip to contentSkip to conversation

gfs2 fix

GIT PULL Merged Andreas Gruenbacher 3 participants 4 messages Jun 6, 2023

lore
Share & tools
lore
#0 lore raw

Hi Linus,

please consider pulling the following fix.

Thanks,
Andreas

The following changes since commit 48b1320a674e1ff5de2fad8606bee38f724594dc:

Merge tag 'for-6.4-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux (2023-05-30 17:23:50 -0400)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git tags/gfs2-v6.4-rc4-fix

for you to fetch changes up to fa58cc888d67e640e354d8b3ceef877ea167b0cf:

gfs2: Don't get stuck writing page onto itself under direct I/O (2023-06-01 14:55:43 +0200)

----------------------------------------------------------------
gfs2 fix

- Don't get stuck writing page onto itself under direct I/O.

----------------------------------------------------------------
Andreas Gruenbacher (1):
gfs2: Don't get stuck writing page onto itself under direct I/O

 fs/gfs2/file.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
#1 lore raw
Quoted 2 lines · On Tue, Jun 6, 2023 at 5:48?AM Andreas Gruenbacher <[email protected]> wrote:

- Don't get stuck writing page onto itself under direct I/O.

Btw, is there a test for this DIO case?

We've had the deadlock issue on t page lock (or for inode locks or whatever) for normal IO when faulting in the same page that is written to, and we have as pattern for solving that and I think there are filesystem tests that trigger this.

But the DIO pattern is a bit different, with the whole "invalidate page cache: issue, and the fact that you send this patch now (rather than years ago) makes me wonder about test coverage for this all?

Linus

#2 lore raw
Quoted 5 lines · On Tue, Jun 6, 2023 at 2:55?PM Linus Torvalds <[email protected]>…
Quoted 2 lines · On Tue, Jun 6, 2023 at 5:48?AM Andreas Gruenbacher <[email protected]> wrote:

- Don't get stuck writing page onto itself under direct I/O.

Btw, is there a test for this DIO case?

The previous test case I wrote for these kinds of page faults is:

"generic: Test page faults during read and write"
https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/commit/?id=d3cbdabff

I've added a check for this specific case, but this change hasn't been posted/merged yet:

"generic/728: Add mmap + DIO write test"
https://gitlab.com/agruenba/xfstests/-/commit/8c37de03

Quoted 8 lines

We've had the deadlock issue on t page lock (or for inode locks or whatever) for normal IO when faulting in the same page that is written to, and we have as pattern for solving that and I think there are filesystem tests that trigger this.

But the DIO pattern is a bit different, with the whole "invalidate page cache: issue, and the fact that you send this patch now (rather than years ago) makes me wonder about test coverage for this all?

Yes, this case wasn't covered so far. The other page fault issues are covered since 2021, and were fixed in gfs2 back then.

Thanks,
Andreas

merge bot Merged
#3 lore raw
In reply to Andreas Gruenbacher
The pull request you sent on Tue, 6 Jun 2023 14:48:00 +0200:

The pull request you sent on Tue, 6 Jun 2023 14:48:00 +0200:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git tags/gfs2-v6.4-rc4-fix

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/0bdd0f0bf17c5aac16f348ee4b1ebf23d1ec1649

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html