Search code examples
unixfilesystemsposixfuse

Defining PATH_MAX for a filesystem?


I'm presently writing a filesystem. The statvfs (and even the statfs) structs contain a field specifying the maximum length of a name in that path. As PATH_MAX is defined in the pathconf manpage (getconf), this means it is defined on a per-directory basis (and thus, determined by the underlying filesystem). How does one specify this value?


Solution

  • Since this question is tagged "FUSE" ...

    I just ran into this issue while working on a FUSE filesystem. I wrote an e-mail to the FUSE developers, seeking clarification. Reply from the current libfuse maintainer (January 2018): There is not a way to specify the maximum path length in a FUSE filesystem [driver].

    Is there a way for a FUSE filesystem to inform software running on top of it about the correct maximum path length?

    Not at the moment, no.

    If not, should there be?

    Probably yes. Patches welcome :-)

    For reference: Full e-mail thread