Re: [PATCH v3] fuse: Allow page aligned writes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, I had sent out the wrong/old patch file - it doesn't have one change
(handling of already aligned buffers). 
Shall I sent v4? The correct version is below

---

From: Bernd Schubert <bschubert@xxxxxxx>
Date: Fri, 21 Jun 2024 11:51:23 +0200
Subject: [PATCH v3] fuse: Allow page aligned writes

Write IOs should be page aligned as fuse server
might need to copy data to another buffer otherwise in
order to fulfill network or device storage requirements.

Simple reproducer is with libfuse, example/passthrough*
and opening a file with O_DIRECT - without this change
writing to that file failed with -EINVAL if the underlying
file system was requiring alignment.

Required server side changes:
Server needs to seek to the next page, without splice that is
just page size buffer alignment, with splice another splice
syscall is needed to seek over the unaligned area.

Signed-off-by: Bernd Schubert <bschubert@xxxxxxx>

---

Changes since v2:
- Added a no-op return in fuse_copy_align for buffers that are
  already aligned (cs->len == PAGE_SIZE && cs->offset == 0). Some
  server implementations actually do that to compensate for fuse client
  misalignment. And it could also happen by accident for non aligned
  server allocation.
Added suggestions from Joannes review:
- Removed two sanity checks in fuse_copy_align() to have it
  generic.
- Moved from args->in_args[0].align to args->in_args[1].align
  to have it in the arg that actually needs the alignment
  (for FUSE_WRITE) and updated fuse_copy_args() to align that arg.
- Slight update in the commit body (removed "Reads").

libfuse patch:
https://github.com/libfuse/libfuse/pull/983


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux