All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Max Reitz <mreitz@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>,
	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: Tue, 1 Jun 2021 21:23:31 +0300	[thread overview]
Message-ID: <CAOQ4uxgcDBCD1xSDv-yuknyA4bN-qLBrFXwjMyT8RdMM5ZZc-g@mail.gmail.com> (raw)
In-Reply-To: <4a85fc2f-8ee0-9772-0347-76221a13ef95@redhat.com>

> >> But this does not help with persistent file handle issue for fuse
> >> client.
> >>
> > I see. Yes that should work, but he'd still need to cope with reused
> > inode numbers in case you allow unlinks from the host (do you?),
> > because LOOKUP can find a host fs inode that does not match
> > the file handle of a previously found inode of the same ino.
>
> That’s indeed an issue.  My current approach is to use the file handle
> (if available) as the key for lookups, so that the generation ID is
> included.
>
> Right now, we use st_ino+st_dev+mnt_id as the key.  st_dev is just a
> fallback for the mount ID, basically, so what we’d really need is inode
> ID + generation ID + mount ID, and that’s basically the file handle +
> mount ID.  So different generation IDs will lead to lookup
> finding/creating a different inode object (lo_inode in C virtiofsd,
> InodeData in virtiofsd-rs), and thus returning different fuse_ino IDs to
> the guest.
>
> (See also:
> https://gitlab.com/mreitz/virtiofsd-rs/-/blob/handles-for-inodes-v4/src/passthrough/mod.rs#L594)
>

I see, because you do not require persistent inode numbers.
That makes sense if you do not need to export file handles to NFS
and if you are not evicting inode objects from the server inodes map.

Please keep me posted if there are any updates on LOOKUP_HANDLE.

Thanks,
Amir.

  reply	other threads:[~2021-06-01 18:23 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             ` virtiofs uuid and file handles Amir Goldstein
2020-09-23  7:44               ` 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 [this message]
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=CAOQ4uxgcDBCD1xSDv-yuknyA4bN-qLBrFXwjMyT8RdMM5ZZc-g@mail.gmail.com \
    --to=amir73il@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=mreitz@redhat.com \
    --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.