Bug 12843 (ramfs) - add mount option 'mode' to ramfs same as tmpfs
Summary: add mount option 'mode' to ramfs same as tmpfs
Status: RESOLVED CODE_FIX
Alias: ramfs
Product: File System
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 enhancement
Assignee: Alexey Dobriyan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-08 14:16 UTC by Ivan Anishchuk
Modified: 2009-10-16 00:58 UTC (History)
1 user (show)

See Also:
Kernel Version: any
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Ivan Anishchuk 2009-03-08 14:16:13 UTC
Latest working kernel version:
Earliest failing kernel version:
Distribution:
Hardware Environment:
Software Environment:
Problem Description:

I use ramfs instead of tmpfs for /tmp because I don't use swap on my laptop. Some apps need 1777 mode for /tmp directory, but ramfs does not support 'mode=' mount option. I'll be happy if I shall not invent workarounds for this small, but offensive truble. I think this feature (mode=) will not increase code too much and is not too hard to implement, but will be very usefull.

Steps to reproduce:
Comment 1 Anonymous Emailer 2009-03-09 14:56:03 UTC
Reply-To: akpm@linux-foundation.org


(switched to email.  Please respond via emailed reply-to-all, not via the
bugzilla web interface).

On Sun,  8 Mar 2009 14:16:13 -0700 (PDT)
bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=12843
> 
>            Summary: add mount option 'mode' to ramfs same as tmpfs
>            Product: File System
>            Version: 2.5
>      KernelVersion: any
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: enhancement
>           Priority: P1
>          Component: Other
>         AssignedTo: fs_other@kernel-bugs.osdl.org
>         ReportedBy: matimatik@gmail.com
> 
> 
> Latest working kernel version:
> Earliest failing kernel version:
> Distribution:
> Hardware Environment:
> Software Environment:
> Problem Description:
> 
> I use ramfs instead of tmpfs for /tmp because I don't use swap on my laptop.
> Some apps need 1777 mode for /tmp directory, but ramfs does not support
> 'mode='
> mount option. I'll be happy if I shall not invent workarounds for this small,
> but offensive truble. I think this feature (mode=) will not increase code too
> much and is not too hard to implement, but will be very usefull.
> 

A feature request!
Comment 2 Wu Fengguang 2009-03-11 00:57:51 UTC
On Mon, Mar 09, 2009 at 02:52:19PM -0700, Andrew Morton wrote:
> 
> (switched to email.  Please respond via emailed reply-to-all, not via the
> bugzilla web interface).
> 
> On Sun,  8 Mar 2009 14:16:13 -0700 (PDT)
> bugme-daemon@bugzilla.kernel.org wrote:
> 
> > http://bugzilla.kernel.org/show_bug.cgi?id=12843
> > 
> >            Summary: add mount option 'mode' to ramfs same as tmpfs
> >            Product: File System
> >            Version: 2.5
> >      KernelVersion: any
> >           Platform: All
> >         OS/Version: Linux
> >               Tree: Mainline
> >             Status: NEW
> >           Severity: enhancement
> >           Priority: P1
> >          Component: Other
> >         AssignedTo: fs_other@kernel-bugs.osdl.org
> >         ReportedBy: matimatik@gmail.com
> > 
> > 
> > Latest working kernel version:
> > Earliest failing kernel version:
> > Distribution:
> > Hardware Environment:
> > Software Environment:
> > Problem Description:
> > 
> > I use ramfs instead of tmpfs for /tmp because I don't use swap on my
> laptop.
> > Some apps need 1777 mode for /tmp directory, but ramfs does not support
> 'mode='
> > mount option. I'll be happy if I shall not invent workarounds for this
> small,
> > but offensive truble. I think this feature (mode=) will not increase code
> too
> > much and is not too hard to implement, but will be very usefull.
> > 
> 
> A feature request!

Hi Avan Anishchuk,

The attached patch works for me :-)

Thanks,
Fengguang
Comment 3 Alexey Dobriyan 2009-10-16 00:58:50 UTC
commit c3b1b1cbf002e65a3cabd479e68b5f35886a26db
"ramfs: add support for "mode=" mount option"

Note You need to log in before you can comment on or make changes to this bug.