On 12/14/24 12:01 AM, Bernd Schubert wrote: > Our file system has a translation capability for S3-to-posix. > The current value of 1kiB is enough to cover S3 keys, but > does not allow encoding of %xx escape characters. > The limit is increased to (PATH_MAX - 1), as we need > 3 x 1024 and that is close to PATH_MAX (4kB) already. > -1 is used as the terminating null is not included in the > length calculation. > > Testing large file names was hard with libfuse/example file systems, > so I created a new memfs that does not have a 255 file name length > limitation. > https://github.com/libfuse/libfuse/pull/1077 > > Signed-off-by: Bernd Schubert <bschubert@xxxxxxx> LGTM. Reviewed-by: Jingbo Xu <jefflexu@xxxxxxxxxxxxxxxxx> > --- > fs/fuse/fuse_i.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h > index 74744c6f286003251564d1235f4d2ca8654d661b..a47a0ba3ccad7d9cbf105fcae728712d5721850c 100644 > --- a/fs/fuse/fuse_i.h > +++ b/fs/fuse/fuse_i.h > @@ -38,8 +38,8 @@ > /** Bias for fi->writectr, meaning new writepages must not be sent */ > #define FUSE_NOWRITE INT_MIN > > -/** It could be as large as PATH_MAX, but would that have any uses? */ > -#define FUSE_NAME_MAX 1024 > +/** Maximum length of a filename, not including terminating null */ > +#define FUSE_NAME_MAX (PATH_MAX - 1) > > /** Number of dentries for each connection in the control filesystem */ > #define FUSE_CTL_NUM_DENTRIES 5 > -- Thanks, Jingbo