Linux filesystem development
 help / color / mirror / Atom feed
From: John Groves <john@groves.net>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Miklos Szeredi <mszeredi@redhat.com>,
	fuse-devel@lists.linux.dev,  linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] famfs: FUSE_GET_DAXDEV -> FUSE_DEV_IOC_BACKING_OPEN
Date: Mon, 15 Jun 2026 11:20:16 -0500	[thread overview]
Message-ID: <ajAlcVPGa7ytSWOm@groves.net> (raw)
In-Reply-To: <CAJfpegsJj8cZ=CXL-VGeVDOayAeTzstWJgvQye3N+sudHJ5L9g@mail.gmail.com>

On 26/06/03 10:35AM, Miklos Szeredi wrote:
> On Tue, 2 Jun 2026 at 09:04, John Groves <john@groves.net> wrote:
> 
> > Device indices - the part that has to be right
> > ----------------------------------------------
> >
> > Everything below turns on what a famfs device index *is*, so let me make
> > it explicit, because the patch's model of it (kernel-allocated) isn't
> > workable for famfs.
> 
> The backing ID is a temporary reference for the lifetime of the fuse
> filesystem.  If there's a persistent device index the server just
> needs to map the persistent index to the temporary backing ID.
> 
> AFAICS the only case where this matters is debug messages, otherwise
> the kernel couldn't care less about whether the device index is
> persistent or not.
> 
> Am I missing something?
> 
> > Identity by reference, not by path - this part is right
> > -------------------------------------------------------
> >
> > The genuinely better idea here is getting the kernel out of resolving a
> > device pathname: the daemon hands over an already-resolved reference
> > (you do it with an fd, from which the kernel takes inode->i_rdev)
> > instead of a string the kernel has to kern_path(). I want to adopt that
> > - credit where it's due.
> 
> Name, dev_t  or fd are are all just ways to reference the same thing:
> the underlying DAX device.  They are completely interchangable, so if
> we have an interface that accepts one, there's no point in making it
> accept the others.
> 
> dev_t -> name:
>    readlink -f /dev/char/$dev
> 
> name -> dev_t:
>    stat -c %Hr:%Lr $name
> 
> name -> fd
>   fd = open(name, O_PATH);
> 
> fd -> dev_t
>   fstat(fd, &st);
> 
> Thanks,
> Miklos

Miklos,

Apologies for the slow response - I've been traveling and juggling the
other parts of my job. (If anyone here has only one job, don't tell me;
I'll just be jealous.)

I'm on vacation this week, but I plan to join the Thursday call -- from a
beach, signal permitting.

And starting next week I plan to take a real run at an implementation on
top of FUSE_DEV_IOC_BACKING_OPEN. So... beware ;)

Thanks,   
John


  reply	other threads:[~2026-06-15 16:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29 13:43 [PATCH] famfs: FUSE_GET_DAXDEV -> FUSE_DEV_IOC_BACKING_OPEN Miklos Szeredi
2026-05-31 17:36 ` Amir Goldstein
2026-06-01  8:42   ` Miklos Szeredi
2026-06-02  6:58 ` John Groves
2026-06-02 13:01   ` Amir Goldstein
2026-06-03  8:35   ` Miklos Szeredi
2026-06-15 16:20     ` John Groves [this message]
2026-06-03 22:09 ` Joanne Koong
2026-06-04 14:17   ` Miklos Szeredi

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=ajAlcVPGa7ytSWOm@groves.net \
    --to=john@groves.net \
    --cc=fuse-devel@lists.linux.dev \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=mszeredi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox