[PATCH 05/14] Add support for dtype

Zach Brown zab at zabbo.net
Fri Feb 28 14:31:15 PST 2025


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.

- z 



More information about the ngnfs-devel mailing list