[PATCHSET RFC v3 4/4] fuse: handle timestamps and ACLs correctly when iomap is enabled

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

 



Hi all,

When iomap is enabled for a fuse file, we try to keep as much of the
file IO path in the kernel as we possibly can.  That means no calling
out to the fuse server in the IO path when we can avoid it.  However,
the existing FUSE architecture defers all file attributes to the fuse
server -- [cm]time updates, ACL metadata management, set[ug]id removal,
and permissions checking thereof, etc.

We'd really rather do all these attribute updates in the kernel, and
only push them to the fuse server when it's actually necessary (e.g.
fsync).  Furthermore, the POSIX ACL code has the weird behavior that if
the access ACL can be represented entirely by i_mode bits, it will
change the mode and delete the ACL, which fuse servers generally don't
seem to implement.

IOWs, we want consistent and correct (as defined by fstests) behavior
of file attributes in iomap mode.  Let's make the kernel manage all that
and push the results to userspace as needed.  This improves performance
even further, since it's sort of like writeback_cache mode but more
aggressive.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

This has been running on the djcloud for months with no problems.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=fuse-iomap-attrs
---
Commits in this patchset:
 * fuse: force a ctime update after a fileattr_set call when in iomap mode
 * fuse: synchronize inode->i_flags after fileattr_[gs]et
 * fuse: cache atime when in iomap mode
 * fuse: update file mode when updating acls
 * fuse: propagate default and file acls on creation
 * fuse: let the kernel handle KILL_SUID/KILL_SGID for iomap filesystems
 * fuse: update ctime when updating acls on an iomap inode
---
 fs/fuse/fuse_i.h     |    5 ++
 fs/fuse/fuse_trace.h |  103 ++++++++++++++++++++++++++++++++++++++++++++++
 fs/fuse/acl.c        |  104 ++++++++++++++++++++++++++++++++++++++++++++++
 fs/fuse/dir.c        |  113 ++++++++++++++++++++++++++++++++++++++------------
 fs/fuse/inode.c      |   20 ++++++++-
 fs/fuse/ioctl.c      |  100 ++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 415 insertions(+), 30 deletions(-)





[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