Messages in this thread | | | From | "J. R. Okajima" <> | Subject | Re: [rfc] new stat*fs-like syscall? | Date | Sat, 26 Jun 2010 21:54:44 +0900 |
| |
Christoph Hellwig: > That's really job for a pathconf system call that allows quering random > paramters.
Do you mean it should be implemented such like this? vfs_pathconf(struct dentry, int parm) --> return d_sb->s_op->pathconf(parm)
I am afraid it is overdesign because the actual parameter(for FS) is _PC_LINK_MAX only. All other params are already handled by VFS, glibc or sb->statfs.
J. R. Okajima
(pathconf(3) parameters from the manual) _PC_LINK_MAX returns the maximum number of links to the file. If fd or path refer to a direc- tory, then the value applies to the whole directory. The corresponding macro is _POSIX_LINK_MAX.
_PC_MAX_CANON returns the maximum length of a formatted input line, where fd or path must refer to a terminal. The corresponding macro is _POSIX_MAX_CANON.
_PC_MAX_INPUT returns the maximum length of an input line, where fd or path must refer to a ter- minal. The corresponding macro is _POSIX_MAX_INPUT.
_PC_NAME_MAX returns the maximum length of a filename in the directory path or fd that the pro- cess is allowed to create. The corresponding macro is _POSIX_NAME_MAX.
_PC_PATH_MAX returns the maximum length of a relative pathname when path or fd is the current working directory. The corresponding macro is _POSIX_PATH_MAX.
_PC_PIPE_BUF returns the size of the pipe buffer, where fd must refer to a pipe or FIFO and path must refer to a FIFO. The corresponding macro is _POSIX_PIPE_BUF.
_PC_CHOWN_RESTRICTED returns non-zero if the chown(2) call may not be used on this file. If fd or path refer to a directory, then this applies to all files in that directory. The corre- sponding macro is _POSIX_CHOWN_RESTRICTED.
_PC_NO_TRUNC returns non-zero if accessing filenames longer than _POSIX_NAME_MAX generates an error. The corresponding macro is _POSIX_NO_TRUNC.
_PC_VDISABLE returns non-zero if special character processing can be disabled, where fd or path must refer to a terminal.
| |