Large file-names (up to 4095) may cause the encoded input of FUSE_SYMLINK and FUSE_RENAME to exceed the default value of FUSE_MIN_READ_BUFFER (8192). Whoever implements such a FUSE file-system should keep this in mind. - Shachar. On Fri, Dec 13, 2024 at 6:02 PM Bernd Schubert <bschubert@xxxxxxx> 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> > --- > 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 > > -- > 2.43.0 >