-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement request - support file systems with lower PATH_MAX values #42
Comments
|
Relevant discussions: |
It actually isn't hard-coded. The
I think this would be a very reasonable enhancement to pjdfstest. |
See https://github.com/bminor/glibc/blob/5f72f9800b250410cad3abfeeb09469ef12b2438/sysdeps/posix/pathconf.c#L89 - it does seem to be hard-coded based on the limits.h that was available for glibc compilation? |
Oh, wow, I didn't realize that Linux doesn't implement pathconf(2). That's lame. FreeBSD does, and there is currently one file system (smbfs) that returns a non-default value for _PC_PATH_MAX. It looks like OpenBSD, NetBSD, and OSX also implement pathconf(2). |
I think pathconf is implemented in Linux, just not for PATH_MAX which is assumed to be statically defined. |
My grep can't find a pathconf syscall in Linux. Here is the FreeBSD man page for the KPI: https://www.freebsd.org/cgi/man.cgi?query=VOP_PATHCONF&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html . And here is smbfs's implementation, which overrides the default PATH_MAX: https://svnweb.freebsd.org/base/head/sys/fs/smbfs/smbfs_vnops.c?view=markup#l913 . |
This is also an issue with s3fs which can only support 1024 byte |
PATH_MAX seems to be hard-coded everywhere. Unfortunately, when using some file systems (Gluster, for example), the real paths are longer than PATH_MAX.
There is no way (that I found, as opposed to NAME_MAX) that one can query the FS for PATH_MAX - it is just assumed to be 4096 everywhere.
I suspect if we can change dirgen_max and perhaps other functions to be able to get a hard-coded, lower PATH_MAX, we'll be able to overcome this limitation, which currently fails many tests.
The text was updated successfully, but these errors were encountered: