Re: [PATCH v14 00/12] FUSE passthrough for file io

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

 



On Tue, 31 Oct 2023 at 18:44, Amir Goldstein <amir73il@xxxxxxxxx> wrote:

> In that case, we would be able to "attach" the fuse_backing object
> to fuse_inode on CREATE response. If we end up with a backing map
> conflict at this point, we can return -EBUSY error to the user and forget
> the inode, but the server would have no easy feedback on its mistake.
> Also, -EBUSY to user would be confusing if user did not request O_EXCL.

I think -EIO is more appropriate.  Server is broken, WARN_ON_ONCE
could also be used to indicate that.

> Do you consider the described "atomic_open conflict" case an API problem?
>
> It is true that with v14 patches that do not enforce backing inode conflicts,
> the attribute coherency model that I proposed may result in attribute
> cache thrashing if the backing inode of a fuse inode is ambiguous.
>
> Do you have an idea how to handle this case elegantly?

Let me add some perspective.

Currently we have FOPEN_DIRECT_IO that disables caching.  My feeling
when dealing with this interface is that it was a mistake to make this
a property of the open file.  It should insted be a property of the
inode and all open file instances should respect this property
equally.  It makes no sense to have one file do cached reads while the
other is doing direct writes, etc.  Also it should be possible to turn
this on or off for all open file instances at any time.

Passthrough is similar, I think.  At any point in time all I/O should either be

 - cached
 - direct
 - passthrough to a specific backing file

Allowing these to be mixed leads to confusing semantics, especially
cached and non-cached

OTOH allowing passthrough to be switched on at any point in time
presents challenges.   If passthrough is turned on for an inode that
didn't have it previously means that the backing file needs to be set
up before the actual I/O.    So it's definitely more complex than just
setting up the backing at open.  But I feel that longer term we'll end
up with a better interface.

For the first version we can just bypass this whole mess, and say that
passthrough can only be turned on for the first open.  I.e. if there
are already open instances and passthrough has not yet been set up,
then FOPEN_PASSTHROUGH will be ignored.  Similarly if it has already
been set up, then the lack of FOPEN_PASSTHROUGH is also ignored.

Hmm?

Thanks,
Miklos




[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