Download Troubleshooting
Transcript
Filesystem limits © 2008, QNX Software Systems GmbH & Co. KG. setrlimit() Change the value of certain limits. For example, you can use this function to limit the number of files that a process can open; this limit also depends on the value of the -F option to procnto. Filesystem limits Under Neutrino, filesystems aren’t part of the kernel or core operating system; they’re provided by separately loadable processes or libraries. This means that: • There’s no one set limit or rule for filesystems under Neutrino — the limits depend on the filesystem in question and on the process that provides access to that filesystem. • You can provide your own filesystem process or layer that can almost transparently override or change many of the underlying values. The sections that follow give the limits for the supported filesystems. Note the following: • Lengths for filenames and pathnames are in bytes, not characters. • Many of the filesystems that Neutrino supports use a 32-bit format. This means that files are limited to 2 G − 1 bytes. This, in turn, limits the size of a directory, because the file that stores the directory’s information is limited to 2 G − 1 bytes. Querying filesystem limits You can query the path-specific configuration limits to determine some of the properties and limits of a specific filesystem: _PC_LINK_MAX Maximum value of a file’s link count. _PC_MAX_CANON Maximum number of bytes in a terminal’s canonical input buffer (edit buffer). _PC_MAX_INPUT Maximum number of bytes in a terminal’s raw input buffer. _PC_NAME_MAX Maximum number of bytes in a filename (not including the terminating null). _PC_PATH_MAX Maximum number of bytes in a pathname (not including the terminating null). _PC_PIPE_BUF Maximum number of bytes that can be written atomically when writing to a pipe. _PC_CHOWN_RESTRICTED If defined (not -1), indicates that the use of the chown() function is restricted to a process with appropriate privileges, and to changing the group ID of a file to the effective group ID of the process or to one of its supplementary group IDs. 338 Chapter 21 • Understanding System Limits September 30, 2008