On Wed, Jan 14, 2026, at 1:11 PM, Jan Kara wrote: > On Wed 14-01-26 09:28:44, Chuck Lever wrote: >> From: Chuck Lever <[email protected]> >> >> Enable upper layers such as NFSD to retrieve case sensitivity >> information from file systems by adding case_insensitive and >> case_nonpreserving boolean fields to struct file_kattr. >> >> These fields default to false (POSIX semantics: case-sensitive and >> case-preserving), allowing filesystems to set them only when >> behavior differs from the default. >> >> Signed-off-by: Chuck Lever <[email protected]> > ... >> diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h >> index 66ca526cf786..07286d34b48b 100644 >> --- a/include/uapi/linux/fs.h >> +++ b/include/uapi/linux/fs.h >> @@ -229,10 +229,20 @@ struct file_attr { >> __u32 fa_nextents; /* nextents field value (get) */ >> __u32 fa_projid; /* project identifier (get/set) */ >> __u32 fa_cowextsize; /* CoW extsize field value (get/set) */ >> + /* VER1 additions: */ >> + __u32 fa_case_behavior; /* case sensitivity (get) */ >> + __u32 fa_reserved; >> }; >> >> #define FILE_ATTR_SIZE_VER0 24 >> -#define FILE_ATTR_SIZE_LATEST FILE_ATTR_SIZE_VER0 >> +#define FILE_ATTR_SIZE_VER1 32 >> +#define FILE_ATTR_SIZE_LATEST FILE_ATTR_SIZE_VER1 >> + >> +/* >> + * Case sensitivity flags for fa_case_behavior >> + */ >> +#define FS_CASE_INSENSITIVE 0x00000001 /* case-insensitive lookups */ >> +#define FS_CASE_NONPRESERVING 0x00000002 /* case not preserved */ > > This is a matter of taste so not sure what others think about it but > file_attr already have fa_xflags field and there is already one flag which > doesn't directly correspond to on-disk representation (FS_XFLAG_HASATTR) so > we could also put the two new flags in there... I have hard time imagining > fa_case_behavior would grow past the two flags you've introduced so u32 > seems a bit wasteful. No problem. I'll wait for additional guidance on this. -- Chuck Lever _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH v4 01/16] fs: Add case sensitivity info to file_kattr
Chuck Lever via Linux-f2fs-devel Wed, 14 Jan 2026 11:02:51 -0800
- [f2fs-dev] [PATCH v4 00/16] Exposin... Chuck Lever via Linux-f2fs-devel
- [f2fs-dev] [PATCH v4 03/16] ex... Chuck Lever via Linux-f2fs-devel
- [f2fs-dev] [PATCH v4 04/16] nt... Chuck Lever via Linux-f2fs-devel
- [f2fs-dev] [PATCH v4 13/16] is... Chuck Lever via Linux-f2fs-devel
- [f2fs-dev] [PATCH v4 02/16] fa... Chuck Lever via Linux-f2fs-devel
- [f2fs-dev] [PATCH v4 12/16] vb... Chuck Lever via Linux-f2fs-devel
- [f2fs-dev] [PATCH v4 01/16] fs... Chuck Lever via Linux-f2fs-devel
- Re: [f2fs-dev] [PATCH v4 0... Jan Kara
- Re: [f2fs-dev] [PATCH ... Chuck Lever via Linux-f2fs-devel
- Re: [f2fs-dev] [PA... Darrick J. Wong via Linux-f2fs-devel
- Re: [f2fs-dev... Christian Brauner via Linux-f2fs-devel
- [f2fs-dev] [PATCH v4 14/16] nf... Chuck Lever via Linux-f2fs-devel
- [f2fs-dev] [PATCH v4 11/16] f2... Chuck Lever via Linux-f2fs-devel
- [f2fs-dev] [PATCH v4 08/16] xf... Chuck Lever via Linux-f2fs-devel
- [f2fs-dev] [PATCH v4 06/16] hf... Chuck Lever via Linux-f2fs-devel
- [f2fs-dev] [PATCH v4 10/16] nf... Chuck Lever via Linux-f2fs-devel
- [f2fs-dev] [PATCH v4 05/16] hf... Chuck Lever via Linux-f2fs-devel
- [f2fs-dev] [PATCH v4 16/16] ks... Chuck Lever via Linux-f2fs-devel
- [f2fs-dev] [PATCH v4 09/16] ci... Chuck Lever via Linux-f2fs-devel
