2005-11-02 05:02:33

by Alexander E. Patrakov

[permalink] [raw]
Subject: tmpfs (documentation?) bug

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.

--
Alexander E. Patrakov


2005-11-02 05:04:38

by Alexander E. Patrakov

[permalink] [raw]
Subject: Re: tmpfs (documentation?) bug

Alexander E. Patrakov wrote:

> 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.

--
Alexander E. Patrakov

2005-11-03 01:36:40

by Rob Landley

[permalink] [raw]
Subject: Re: tmpfs (documentation?) bug

On Tuesday 01 November 2005 23:00, Alexander E. Patrakov wrote:
> 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

2005-11-03 01:36:52

by Rob Landley

[permalink] [raw]
Subject: Re: tmpfs (documentation?) bug

On Tuesday 01 November 2005 23:02, Alexander E. Patrakov wrote:
> Alexander E. Patrakov wrote:
> > 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.

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

2005-11-03 14:42:52

by Hugh Dickins

[permalink] [raw]
Subject: Re: tmpfs (documentation?) bug

On Wed, 2 Nov 2005, Rob Landley wrote:
>
> 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

2005-11-03 18:36:55

by Rob Landley

[permalink] [raw]
Subject: Re: tmpfs (documentation?) bug

On Thursday 03 November 2005 08:41, Hugh Dickins wrote:
> On Wed, 2 Nov 2005, Rob Landley wrote:
> > 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