diff options
| author | наб <nabijaczleweli@nabijaczleweli.xyz> | 2023-08-12 22:03:30 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2023-08-12 22:46:15 +0200 |
| commit | ec0dd57bc9d8019f34a9e00746216577db688dea (patch) | |
| tree | a5f8245b7efe3bafedf0e3dc3c8c2b950453d894 /man5 | |
| parent | a30b6c9f54e9a3b383659eefb035c53d0a9017b4 (diff) | |
| download | man-pages-ec0dd57bc9d8019f34a9e00746216577db688dea.tar.gz | |
tmpfs.5: Document that size/blocks=0 and nr_inodes=0 remove the limits
Bitten by this again. Behaviour blames back to at least 2005
(probably original to shmem.c), documented upstream in
Documentation/filesystems/tmpfs.rst (formerly .txt).
For example:
# mount -t tmpfs -o size=0 tmpfs /etc/
# df /etc/
Filesystem 1k-blocks Used Avail Use% Mounted on
tmpfs 0 0 0 - /etc
# head -c100M < /dev/urandom > /etc/passwd
# df /etc/
Filesystem 1k-blocks Used Avail Use% Mounted on
tmpfs 0 0 0 - /etc
# ls -l /etc/passwd
-rw-r--r-- 1 0 0 104857600 08-12 19:55 /etc/passwd
# du /etc/passwd
204800 /etc/passwd
whereas the current manual insinuates head should ENOSPC instantly.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Cc: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man5')
| -rw-r--r-- | man5/tmpfs.5 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/man5/tmpfs.5 b/man5/tmpfs.5 index cdd5f2fd86..5274e632d6 100644 --- a/man5/tmpfs.5 +++ b/man5/tmpfs.5 @@ -51,6 +51,8 @@ filesystem supports the following mount options: .BR size "=\fIbytes\fP" Specify an upper limit on the size of the filesystem. The size is given in bytes, and rounded up to entire pages. +The limit is removed if the size is +.BR 0 . .IP The size may have a .BR k , @@ -89,6 +91,8 @@ but not a % suffix. The maximum number of inodes for this instance. The default is half of the number of your physical RAM pages, or (on a machine with highmem) the number of lowmem RAM pages, whichever is smaller. +The limit is removed if the number is +.BR 0 . .IP Inodes may be specified with .BR k , |
