All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	overlayfs <linux-unionfs@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: virtiofs uuid and file handles
Date: Wed, 23 Sep 2020 05:49:29 +0300	[thread overview]
Message-ID: <CAOQ4uxg_FV8U833qVkgPaAWJ4MNcnGoy9Gci41bmak4_ROSc3g@mail.gmail.com> (raw)
In-Reply-To: <20200922210445.GG57620@redhat.com>

On Wed, Sep 23, 2020 at 12:04 AM Vivek Goyal <vgoyal@redhat.com> 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

       reply	other threads:[~2020-09-23  2:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <a8828676-210a-99e8-30d7-6076f334ed71@virtuozzo.com>
     [not found] ` <CAOQ4uxgZ08ePA5WFOYFoLZaq_-Kjr-haNzBN5Aj3MfF=f9pjdg@mail.gmail.com>
     [not found]   ` <1bb71cbf-0a10-34c7-409d-914058e102f6@virtuozzo.com>
     [not found]     ` <CAOQ4uxieqnKENV_kJYwfcnPjNdVuqH3BnKVx_zLz=N_PdAguNg@mail.gmail.com>
     [not found]       ` <dc696835-bbb5-ed4e-8708-bc828d415a2b@virtuozzo.com>
     [not found]         ` <CAOQ4uxg0XVEEzc+HyyC63WWZuA2AsRjJmbZBuNimtj=t+quVyg@mail.gmail.com>
     [not found]           ` <20200922210445.GG57620@redhat.com>
2020-09-23  2:49             ` Amir Goldstein [this message]
2020-09-23  7:44               ` virtiofs uuid and file handles Miklos Szeredi
2020-09-23  9:56                 ` Amir Goldstein
2020-09-23 11:12                   ` Miklos Szeredi
2021-05-29 16:05                     ` Amir Goldstein
2021-05-31 14:11                       ` Miklos Szeredi
2021-05-31 18:12                         ` Amir Goldstein
2021-06-01 14:49                           ` Vivek Goyal
2021-06-01 15:42                             ` Amir Goldstein
2021-06-01 16:08                               ` Max Reitz
2021-06-01 18:23                                 ` Amir Goldstein
2022-09-11 10:14                 ` Persistent FUSE file handles (Was: virtiofs uuid and file handles) Amir Goldstein
2022-09-11 15:16                   ` Bernd Schubert
2022-09-11 15:29                     ` Amir Goldstein
2022-09-11 15:55                       ` Bernd Schubert
2022-09-12 13:16                   ` Vivek Goyal
2022-09-12 13:38                     ` Amir Goldstein
2022-09-12 14:35                       ` Vivek Goyal
2022-09-12 15:07                         ` Amir Goldstein
2022-09-12 19:56                           ` Vivek Goyal
2022-09-13  2:07                             ` Amir Goldstein
     [not found]           ` <20200922212534.GH57620@redhat.com>
     [not found]             ` <CAOQ4uxjp6NpF_Q0QqUTzE5=YiKz9w6JbUVyROG+rNFcHPAThFg@mail.gmail.com>
2020-09-23 12:53               ` Copying overlayfs directories with index=on Pavel Tikhomirov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOQ4uxg_FV8U833qVkgPaAWJ4MNcnGoy9Gci41bmak4_ROSc3g@mail.gmail.com \
    --to=amir73il@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=vgoyal@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.