login
Header Space

 
 

[PATCH 00/26] Mount writer count and read-only bind mounts

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <akpm@...>
Cc: <linux-fsdevel@...>, <hch@...>, <viro@...>, Dave Hansen <haveblue@...>
Date: Friday, June 22, 2007 - 4:03 pm

The largest change from last time is in patch 25/26.  It has
been reworked to use per-cpu lock instead of a per-node one.
See the patch for more details.

I would also appreciate any close review of patch 08/27.  It
touches a lot of code, and I'm a bit worried that a buglet or
two could have snuck in there.

Note that there are a few stragglers left using IS_RDONLY()
in reiser4 and in some other low-level filesystem code.  The
reiser4 asserts should be just fine left the way they are,
plus reiser4 needs quite a bit of work before merging anyway.
The ntfs usage appears to be internal, and not related to
user activity.

This patch survives running ltp as well as a home-grown set
of filesystem operations here:

	http://sr71.net/~dave/linux/robind-test.sh

---

Why do we need r/o bind mounts?

This feature allows a read-only view into a read-write filesystem.
In the process of doing that, it also provides infrastructure for
keeping track of the number of writers to any given mount.

This has a number of uses.  It allows chroots to have parts of
filesystems writable.  It will be useful for containers in the future
because users may have root inside a container, but should not
be allowed to write to somefilesystems.  This also replaces 
patches that vserver has had out of the tree for several years.

It allows security enhancement by making sure that parts of
your filesystem read-only (such as when you don't trust your
FTP server), when you don't want to have entire new filesystems
mounted, or when you want atime selectively updated.
I've been using the following script to test that the feature is
working as desired.  It takes a directory and makes a regular
bind and a r/o bind mount of it.  It then performs some normal
filesystem operations on the three directories, including ones
that are expected to fail, like creating a file on the r/o
mount.


Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/26] Mount writer count and read-only bind mounts, Dave Hansen, (Fri Jun 22, 4:03 pm)
Re: [PATCH 00/26] Mount writer count and read-only bind mounts, Christoph Hellwig, (Sat Jun 30, 5:57 am)
Re: [PATCH 14/26] elevate write count for file_update_time(), Christoph Hellwig, (Sat Jun 23, 3:46 am)
Re: [PATCH 14/26] elevate write count for file_update_time(), Christoph Hellwig, (Sat Jun 30, 5:38 am)
Re: [PATCH 17/26] elevate write count over calls to vfs_rena..., Christoph Hellwig, (Sat Jun 23, 3:49 am)
Re: [PATCH 22/26] sys_mknodat(): elevate write count for vfs..., Christoph Hellwig, (Sat Jun 23, 3:51 am)
Re: [PATCH 22/26] sys_mknodat(): elevate write count for vfs..., Christoph Hellwig, (Sat Jun 30, 5:39 am)
Re: [PATCH 22/26] sys_mknodat(): elevate write count for vfs..., Christoph Hellwig, (Wed Jul 11, 6:22 am)
Re: [PATCH 22/26] sys_mknodat(): elevate write count for vfs..., Christoph Hellwig, (Wed Jul 11, 6:22 am)
Re: [PATCH 16/26] unix_find_other() elevate write count for ..., Christoph Hellwig, (Sat Jun 23, 3:47 am)
[PATCH 24/26] do_rmdir(): elevate write count, Dave Hansen, (Fri Jun 22, 4:03 pm)
Re: [PATCH 24/26] do_rmdir(): elevate write count, Christoph Hellwig, (Sat Jun 23, 3:51 am)
[PATCH 26/26] honor r/w changes at do_remount() time, Dave Hansen, (Fri Jun 22, 4:03 pm)
Re: [PATCH 26/26] honor r/w changes at do_remount() time, Christoph Hellwig, (Sat Jun 23, 3:51 am)
[PATCH 25/26] r/o bind mounts: scalable writer count, Dave Hansen, (Fri Jun 22, 4:03 pm)
Re: [PATCH 25/26] r/o bind mounts: scalable writer count, Andrew Morton, (Sat Jun 23, 12:52 pm)
Re: [PATCH 25/26] r/o bind mounts: scalable writer count, Miklos Szeredi, (Sat Jun 23, 7:28 am)
Re: [PATCH 25/26] r/o bind mounts: scalable writer count, Miklos Szeredi, (Mon Jun 25, 3:09 pm)
Re: [PATCH 25/26] r/o bind mounts: scalable writer count, Miklos Szeredi, (Sat Jun 23, 7:31 am)
Re: [PATCH 21/26] elevate write count for do_sys_utime() and..., Christoph Hellwig, (Sat Jun 23, 3:50 am)
Re: [PATCH 23/26] elevate mnt writers for vfs_unlink() callers, Christoph Hellwig, (Sat Jun 23, 3:51 am)
Re: [PATCH 19/26] elevate writer count for do_sys_truncate(), Christoph Hellwig, (Sat Jun 23, 3:49 am)
[PATCH 20/26] elevate write count for do_utimes(), Dave Hansen, (Fri Jun 22, 4:03 pm)
Re: [PATCH 20/26] elevate write count for do_utimes(), Christoph Hellwig, (Sat Jun 23, 3:49 am)
[PATCH 15/26] mount_is_safe(): add comment, Dave Hansen, (Fri Jun 22, 4:03 pm)
Re: [PATCH 15/26] mount_is_safe(): add comment, Christoph Hellwig, (Sat Jun 23, 3:47 am)
Re: [PATCH 15/26] mount_is_safe(): add comment, Dave Hansen, (Mon Jun 25, 11:10 am)
[PATCH 01/26] document nlink function, Dave Hansen, (Fri Jun 22, 4:03 pm)
Re: [PATCH 01/26] document nlink function, Christoph Hellwig, (Sat Jun 23, 3:36 am)
Re: [PATCH 10/26] elevate mnt writers for callers of vfs_mkd..., Christoph Hellwig, (Sat Jun 23, 3:45 am)
Re: [PATCH 18/26] nfs: check mnt instead of superblock direc..., Christoph Hellwig, (Sat Jun 23, 3:49 am)
[PATCH 05/26] r/o bind mounts: stub functions, Dave Hansen, (Fri Jun 22, 4:03 pm)
Re: [PATCH 05/26] r/o bind mounts: stub functions, Andrew Morton, (Sat Jun 23, 12:52 pm)
Re: [PATCH 05/26] r/o bind mounts: stub functions, Dave Hansen, (Mon Jun 25, 11:49 am)
Re: [PATCH 05/26] r/o bind mounts: stub functions, Christoph Hellwig, (Sat Jun 23, 3:39 am)
[PATCH 06/26] elevate write count open()'d files, Dave Hansen, (Fri Jun 22, 4:03 pm)
Re: [PATCH 06/26] elevate write count open()'d files, Christoph Hellwig, (Sat Jun 23, 3:40 am)
Re: [PATCH 06/26] elevate write count open()'d files, Dave Hansen, (Mon Jun 25, 11:03 am)
Re: [PATCH 04/26] filesystem helpers for custom 'struct file's, Christoph Hellwig, (Sat Jun 30, 5:35 am)
Re: [PATCH 04/26] filesystem helpers for custom 'struct file's, Christoph Hellwig, (Sat Jun 23, 3:38 am)
Re: [PATCH 08/26] elevate writer count for chown and friends, Christoph Hellwig, (Sat Jun 23, 3:43 am)
[PATCH 09/26] make access() use mnt check, Dave Hansen, (Fri Jun 22, 4:03 pm)
Re: [PATCH 09/26] make access() use mnt check, Christoph Hellwig, (Sat Jun 23, 3:45 am)
Re: [PATCH 09/26] make access() use mnt check, Dave Hansen, (Mon Jun 25, 2:27 pm)
Re: [PATCH 09/26] make access() use mnt check, Christoph Hellwig, (Sat Jun 30, 5:37 am)
Re: [PATCH 09/26] make access() use mnt check, Dave Hansen, (Mon Jul 2, 12:09 pm)
Re: [PATCH 09/26] make access() use mnt check, Dave Kleikamp, (Tue Jun 26, 3:04 pm)
Re: [PATCH 07/26] r/o bind mounts: elevate write count for s..., Christoph Hellwig, (Sat Jun 23, 3:42 am)
[PATCH 03/26] ext4: remove extra IS_RDONLY() check, Dave Hansen, (Fri Jun 22, 4:03 pm)
Re: [PATCH 03/26] ext4: remove extra IS_RDONLY() check, Christoph Hellwig, (Sat Jun 23, 3:37 am)
[PATCH 02/26] ext3: remove extra IS_RDONLY() check, Dave Hansen, (Fri Jun 22, 4:03 pm)
Re: [PATCH 02/26] ext3: remove extra IS_RDONLY() check, Christoph Hellwig, (Sat Jun 23, 3:36 am)
speck-geostationary