public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] fuse: fix direct io folio offset and length calculation
@ 2024-12-11 20:55 Joanne Koong
  2024-12-11 20:55 ` [PATCH 1/1] " Joanne Koong
  0 siblings, 1 reply; 5+ messages in thread
From: Joanne Koong @ 2024-12-11 20:55 UTC (permalink / raw)
  To: miklos, linux-fsdevel
  Cc: josef, bernd.schubert, malte.schroeder, willy, kent.overstreet,
	jefflexu, kernel-team

As Malte noted in [1], there is an issue with commit 3b97c3652d91 ("fuse:
convert direct io to use folios"). This commit mistakenly assumed that all
folios encountered in fuse are one page size, but this is not true for the
direct io case.

This problem was found when running bcachefs as the rootfs on an Arch VM, and
installing FreeCAD with "flatpak install flathub org.freecad.FreeCAD".

Before this fix, the checksum was corrupted and installation fails:
 error: Failed to install org.kde.Platform: Error pulling from repo:
 While pulling runtime/org.kde.Platform/x86_64/6.7 from remote flathub:
 fsck content object
 886fd60617b81e81475db5e62beda5846d3e85fe77562eae536d2dd2a7af5b33:
 Corrupted file object; checksum
 expected='886fd60617b81e81475db5e62beda5846d3e85fe77562eae536d2dd2a7af5b33'
 actual='67f5a60d19f7a65e1ee272d455fed138b864be73399816ad18fa71319614a418'

After this fix, the installation succeeds.

A test case will be added for this (eg userspace opting into huge pages and
using O_DIRECT) as well, in a separate patchset.

[1] https://lore.kernel.org/linux-fsdevel/p3iss6hssbvtdutnwmuddvdadubrhfkdoosgmbewvo674f7f3y@cwnwffjqltzw/

Joanne Koong (1):
  fuse: fix direct io folio offset and length calculation

 fs/fuse/file.c | 28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)

-- 
2.43.5


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-12-12 11:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-11 20:55 [PATCH 0/1] fuse: fix direct io folio offset and length calculation Joanne Koong
2024-12-11 20:55 ` [PATCH 1/1] " Joanne Koong
2024-12-11 22:46   ` Bernd Schubert
2024-12-12  1:53   ` Jingbo Xu
2024-12-12 11:03   ` Miklos Szeredi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox