tmpfs now operational in development branch

Naoya Sugioka naoya.sugioka at gmail.com
Thu Feb 25 23:02:42 PST 2010


Hi Matt,

Here is my janitoring item for tmpfs.
I would really appreciate your effort to polish on tmpfs,
Also I would do small pieces of janitors in parallel.

The attachment is a patch to enable option -u, -g and -m as NetBSD
does. We can mount with non root uid, gid or even with sticky bit by
applying this.
See mount_tmpfs(8) for reference.

My next plan is to write a patch allowing users full notation (i.e. -o
uid=hoge,mode=1777 instead of -o -u=hoge -o -m=1777) as we see by
tmpfs(5)

thank you,
- Naoya

On 2/16/10, Matthew Dillon <dillon at apollo.backplane.com> wrote:
>     We now have a very nice port by Naoya Sugioka of TMPFS from NetBSD
>     in our main development branch.  It is brand new and still considered
>     experimental but should be reasonably stable.
>
>     TMPFS is a better alternative to MFS and MD for temporary filesystems.
>     It doesn't have the data duplication issue that MFS has and its data
>     is swap-backed using a very nice algorithm that only pages data to swap
>     when the system is under real memory pressure (and not due to buffer
>     cache flushes, fsyncs, or anything else).
>
> 					-Matt
> 					Matthew Dillon
> 					<dillon at backplane.com>
>
diff --git a/sys/vfs/tmpfs/tmpfs_vfsops.c b/sys/vfs/tmpfs/tmpfs_vfsops.c
index 5fd5d38..d183889 100644
--- a/sys/vfs/tmpfs/tmpfs_vfsops.c
+++ b/sys/vfs/tmpfs/tmpfs_vfsops.c
@@ -171,6 +171,9 @@ tmpfs_mount(struct mount *mp, char *path, caddr_t data, struct ucred *cred)
 		}
 		size_max = args.ta_size_max;
 		nodes_max = args.ta_nodes_max;
+		root_uid = args.ta_root_uid;
+		root_gid = args.ta_root_gid;
+		root_mode = args.ta_root_mode;
 	}
 
 	/*




More information about the Users mailing list