Skip to contentSkip to conversation

tmpfs (documentation?) bug

DISCUSSION Alexander E. Patrakov 4 participants 6 messages Nov 2, 2005 – Nov 3, 2005

lore
Share & tools
lore
#0 lore raw

Hello,

Documentation/filesystems/tmpfs.c currently says:

If nr_blocks=0 (or size=0), blocks will not be limited in that instance; if nr_inodes=0, inodes will not be limited.

However, mounting a tmpfs with "mount -t tmpfs -o size=0 tmpfs /root/tmpfs" results in a tmpfs where only zero-sized files can live. So either this behaviour should be fixed to be in accordance with the documentation, or the documentation should reflect the current behaviour.

Signature · 1 line
Alexander E. Patrakov
#1 lore raw
Quoted 9 lines · Alexander E. Patrakov

Hello,

Documentation/filesystems/tmpfs.c currently says:

If nr_blocks=0 (or size=0), blocks will not be limited in that instance; if nr_inodes=0, inodes will not be limited.

However, mounting a tmpfs with "mount -t tmpfs -o size=0 tmpfs /root/tmpfs" results in a tmpfs where only zero-sized files can live. So either this behaviour should be fixed to be in accordance with the documentation, or the documentation should reflect the current behaviour.

Please ignore, that applies to old kernels only, not to 2.6.14.

Signature · 1 line
Alexander E. Patrakov
#5 lore raw
In reply to Alexander E. Patrakov
Quoted 11 lines · Alexander E. Patrakov

Hello,

Documentation/filesystems/tmpfs.c currently says:

If nr_blocks=0 (or size=0), blocks will not be limited in that instance; if nr_inodes=0, inodes will not be limited.

However, mounting a tmpfs with "mount -t tmpfs -o size=0 tmpfs /root/tmpfs" results in a tmpfs where only zero-sized files can live. So either this behaviour should be fixed to be in accordance with the documentation, or the documentation should reflect the current behaviour.

I like this behavior. Please keep this behavior. A dynamic /dev on tmpfs should _only_ have dentries (device nodes and symlinks), no actual files. I have a system that's currently using this to enforce that...

Rob

#2 lore raw
In reply to Alexander E. Patrakov
Quoted 8 lines · Alexander E. Patrakov
Quoted 7 lines · Alexander E. Patrakov

Hello,

Documentation/filesystems/tmpfs.c currently says:

If nr_blocks=0 (or size=0), blocks will not be limited in that instance; if nr_inodes=0, inodes will not be limited.

Quoted 6 lines
Quoted 4 lines

However, mounting a tmpfs with "mount -t tmpfs -o size=0 tmpfs /root/tmpfs" results in a tmpfs where only zero-sized files can live. So either this behaviour should be fixed to be in accordance with the documentation, or the documentation should reflect the current behaviour.

Please ignore, that applies to old kernels only, not to 2.6.14.

So what's the new way to specify "this tmpfs mount should just be a directory hierarchy with no data blocks" for those of us who _want_ the old behavior?

Rob

#3 lore raw
Quoted 3 lines · Rob Landley

So what's the new way to specify "this tmpfs mount should just be a directory hierarchy with no data blocks" for those of us who _want_ the old behavior?

Sorry about that. I guess you'll have to do the unaesthetic

mount -t tmpfs -o nr_blocks=1 tmpfs /mountpoint
echo full >/mountpoint/.full

Hugh

#4 lore raw
Quoted 9 lines · Hugh Dickins
Quoted 3 lines · Rob Landley

So what's the new way to specify "this tmpfs mount should just be a directory hierarchy with no data blocks" for those of us who _want_ the old behavior?

Sorry about that. I guess you'll have to do the unaesthetic

mount -t tmpfs -o nr_blocks=1 tmpfs /mountpoint
echo full >/mountpoint/.full

Hmmm... I suppose as long as I have the sucker mounted "noexec" I can live with that.

Rob