[PATCH 05/14] Add support for dtype

Valerie Aurora val at versity.com
Mon Mar 3 09:02:24 PST 2025


On Fri, Feb 28, 2025 at 11:31 PM Zach Brown <zab at zabbo.net> wrote:
>
> On Thu, Feb 27, 2025 at 03:16:14PM +0100, Valerie Aurora wrote:
> > From: Zach Brown <zab at zabbo.net>
> >
> > Add dtype support to avoid unnecesary inode reads.
> >
> > Co-authored-by: Valerie Aurora <val at versity.com>
> > Signed-off-by: Valerie Aurora <val at versity.com>
>
> Ah, this is also fine and I'll land it...
>
> > +     da->dtype = IFTODT(mode);
> >
> >       da->dent.ino = cpu_to_le64(ino);
> >       da->dent.version = cpu_to_le64(0); /* XXX :/ */
> > -     da->dent.dtype = ngnfs_dt(mode);
> > +     da->dent.type = mode_to_type(mode);
>
> I had missed that da->dtype is the actual vfs dtype, not persistent
> ngnfs enum, so it makes sense to use the linux helper.  Maybe we'll want
> to tighten up the names to make the distinction clear, but it's fine for
> now.

Thanks! I agree with changing the names, there are three kinds of
dtypes (VFS, in-memory, on-disk) and I got the conversion wrong
multiple times while writing these. Do you have any thoughts on a
better scheme? As you know, I'm terrible at naming things. :)

Valerie



More information about the ngnfs-devel mailing list