From: Alejandro Colomar <alx@kernel.org>
To: наб <nabijaczleweli@nabijaczleweli.xyz>
Cc: linux-man@vger.kernel.org, Jakub Wilk <jwilk@jwilk.net>
Subject: Re: [PATCH v2] tmpfs.5: document size/blocks=0 and nr_inodes=0 <=> unlimited
Date: Sat, 12 Aug 2023 22:49:21 +0200 [thread overview]
Message-ID: <d284b5e9-9b61-e9a6-1888-e58f7bf5bffe@kernel.org> (raw)
In-Reply-To: <yqduyx6v7k3ziu2fcwoqibrwwrg2fznga6l5xsvwgxvnkcsu4m@gqbl5hu4bw5m>
[-- Attachment #1.1: Type: text/plain, Size: 1825 bytes --]
Hi,
On 2023-08-12 22:03, наб wrote:
> 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>
Patch applied. Thanks,
Alex
> ---
> man5/tmpfs.5 | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/man5/tmpfs.5 b/man5/tmpfs.5
> index cdd5f2fd8..5274e632d 100644
> --- a/man5/tmpfs.5
> +++ b/man5/tmpfs.5
> @@ -51,6 +51,8 @@ .SS 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 @@ .SS Mount options
> 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 ,
--
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-08-12 20:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 13:41 [PATCH] tmpfs.5: document size/blocks=0 and nr_inodes=0 <=> unlimited наб
2023-08-12 18:08 ` Alejandro Colomar
2023-08-12 19:04 ` Jakub Wilk
2023-08-12 20:03 ` [PATCH v2] " наб
2023-08-12 20:49 ` Alejandro Colomar [this message]
2023-08-12 20:48 ` [PATCH] " Alejandro Colomar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d284b5e9-9b61-e9a6-1888-e58f7bf5bffe@kernel.org \
--to=alx@kernel.org \
--cc=jwilk@jwilk.net \
--cc=linux-man@vger.kernel.org \
--cc=nabijaczleweli@nabijaczleweli.xyz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox