Date: Tue, 17 May 2016 10:42:32 +0200 From: Willem Jan Withagen <wjw@digiware.nl> To: Peter Jeremy <peter@rulingia.com> Cc: "freebsd-fs@FreeBSD.org" <freebsd-fs@freebsd.org> Subject: Re: Bigger MAX_PATH (Was: Re: State of native encryption in ZFS) Message-ID: <ee8e870f-68ef-0e8f-5300-16edb3c4c251@digiware.nl> In-Reply-To: <20160516200543.GC42426@server.rulingia.com> References: <5736E7B4.1000409@gmail.com> <57378707.19425.B54772B@s_sourceforge.nedprod.com> <CAHM0Q_PGvBRbUFOhmin4RKaDKRTRJyjieuaZ5_tjPerK4eRz=w@mail.gmail.com> <57385356.4525.E728971@s_sourceforge.nedprod.com> <9ead4b28-9711-5e38-483f-ef9eaf0bc583@digiware.nl> <20160516200543.GC42426@server.rulingia.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 16-5-2016 22:05, Peter Jeremy wrote: > On 2016-May-16 15:18:17 +0200, Willem Jan Withagen <wjw@digiware.nl> wrote: >> Trying to port Ceph is also running into the limit in: >> /usr/include/sys/syslimits.h: >> #define NAME_MAX 255 /* max bytes in a file name */ >> >> but I also found: >> /usr/include/stdio.h: >> #define FILENAME_MAX 1024 /* must be <= PATH_MAX <sys/syslimits.h> */ >> >> So take a pick?? > > There are two distinct limits: The maximum number of characters in a > pathname component (ie the name seen in a directory entry): For UFS, > this is 255 because the length is stored on disk in a uint8_t (I don't > know the limit for ZFS). The other limit is the maximum number of > characters in a pathname - PATH_MAX. This is used to dimension various > buffers but isn't persistent on disk so you should be able to increase > it by changing the relevant #defines and rebuilding everything. Don't remeber if I did such an experiment. Got to talk to the local engineer of dutie here to see if I can get a few more VMs to go compile and blow up. :) Getting the NAME_MAX size per fs is something I'm going to need in the long run for Ceph to make optimal usage of its capabilities. I think that Linux is now at 1024, and the underlaying store for Ceph is going to 4096..... --WjW
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ee8e870f-68ef-0e8f-5300-16edb3c4c251>