Re: virtiofs uuid and file handles

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

 



On Wed, Sep 23, 2020 at 12:04 AM Vivek Goyal <vgoyal@xxxxxxxxxx> wrote:
>
...
> > Note that if all overlayfs layers are on the same fs and that fs has
> > null uuid, then the "disk copy" use case should just work, but I never
> > tested that.
> >
> > So far, there has been no filesystem with null uuid that could be used
> > as upper+lower layers (even xfs with option nouuid has non null s_uuid).
> >
> > Recently, virtiofs was added as a filesystem that could be used for
> > upper+lower layers and virtiofs (which is fuse) has null uuid.
>
> I guess I never paid attention to uuid part of virtiofs. Probably we
> are not using index or any of the advanced features of overlayfs yet,
> that's why.
>

I don't expect you should have a problem enabling index because
of null uuid when all layers are on the same virtiofs.
That setup is allowed.
We only ever start checking for null uuid on lower layers that
are NOT on the same fs as upper layer.

What you are expected to have a problem with is that FUSE support
for file handles is "problematic".

I found out the hard way that FUSE can decode NFS file handles
to completely different object than the encoded object if the encoded
inode was evicted from cache and its node id has been reused.

Another problem is that FUSE protocol does not have complete
support for decoding file handles. FUSE implements decode
file handle by LOOKUP(ino, ".") to server, but if server is proxying
a local filesystem, there is not enough information to construct
an open_by_handle_at() request.

I wrote a fuse filesystem whose file handles are persistent and
reliable [1], but it is a specialized server that uses knowledge
of the local filesystem file handle format and it requires that the
local filesystem has a special feature to interpret a file handle
with 0 generation as ANY generation (ext4 does that).

I think that the proper was to implement reliable persistent file
handles in fuse/virtiofs would be to add ENCODE/DECODE to
FUSE protocol and allow the server to handle this.

Thanks,
Amir,

[1] https://github.com/amir73il/libfuse/commits/cachegwfs



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

  Powered by Linux