Mount writer count and read-only bind mounts (v5)
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest28 patches 12 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/28 | prepare for write access checks: collapse if()fs/ fs/ | +87 | 1 reply | |
| 2/28 | r/o bind mount prepwork: move open_namei()'s vfs_create()fs/ | +20 | 1 reply | |
| 3/28 | unlink: monitor i_nlinkdrivers/ fs/ fs/ +25 more | +84 | 1 reply | |
| 4/28 | OCFS2 is screwyfs/ fs/ include/ | +20 | 7 replies | |
| 5/28 | monitor zeroing of i_nlinkfs/ fs/ fs/ +13 more | +22 | 0 replies | |
| 6/28 | reintroduce list of vfsmounts over superblockfs/ fs/ include/ +1 more | +15 | 2 replies | |
| 7/28 | Add vfsmount writer countfs/ fs/ include/ +1 more | +142 | 0 replies | |
| 8/28 | record when sb_writer_count elevated for inodefs/ fs/ include/ | +9 | 0 replies | |
| 9/28 | kill open files traverse on remount rofs/ fs/ include/ | +0 | 0 replies | |
| 10/28 | increment sb writer count when nlink hits zerofs/ | +1 | 0 replies | |
| 11/28 | elevate writer count for chown and friendsfs/ | +33 | 0 replies | |
| 12/28 | elevate mnt writers for callers of vfs_mkdir()fs/ fs/ | +9 | 0 replies | |
| 13/28 | elevate write count during entire ncp_ioctl()fs/ | +54 | 0 replies | |
| 14/28 | sys_symlinkat() elevate write count around vfs_symlink()fs/ | +5 | 0 replies | |
| 15/28 | elevate mount count for extended attributesfs/ fs/ | +20 | 0 replies | |
| 16/28 | sys_linkat(): elevate write count around vfs_link()fs/ | +5 | 0 replies | |
| 17/28 | mount_is_safe(): add commentfs/ | +4 | 0 replies | |
| 18/28 | unix_find_other() elevate write count for touch_atime()net/ | +12 | 0 replies | |
| 19/28 | elevate write count over calls to vfs_rename()fs/ fs/ | +24 | 0 replies | |
| 20/28 | tricky: elevate write count files are open()edfs/ fs/ ipc/ | +25 | 0 replies | |
| 21/28 | elevate writer count for do_sys_truncate()fs/ | +11 | 0 replies | |
| 22/28 | elevate write count for do_utimes()fs/ | +9 | 0 replies | |
| 23/28 | elevate write count for do_sys_utime() and touch_atime()fs/ fs/ | +18 | 0 replies | |
| 24/28 | sys_mknodat(): elevate write count for vfs_mknod/create()fs/ fs/ net/ | +20 | 0 replies | |
| 25/28 | elevate mnt writers for vfs_unlink() callersfs/ ipc/ | +8 | 0 replies | |
| 26/28 | do_rmdir(): elevate write countfs/ | +5 | 0 replies | |
| 27/28 | elevate writer count for custom 'struct file'fs/ mm/ mm/ +1 more | +9 | 2 replies | |
| 28/28 | honor r/w changes at do_remount() timefs/ fs/ | +23 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/28] Mount writer count and read-only bind mounts (v5)
Tries to incorporate comments from Al:
http://article.gmane.org/gmane.linux.kernel/421029
Quoted 2 lines · Al
b) figuring out what (if anything) should be done with propagation when we have shared subtrees... (not trivial at all)
Talked with Ram: Shared subtrees are about having identical views into the filesystem. Changing the mount permissions doesn't affect the view of the filesystem, so it should not be propagated.
The things that probably need the heaviest review in here are the i_nlink monitoring patch (including the inode state flag patches 03 and 06) and the new MNT_SB_WRITABLE flag (patch 05).
These are against 2.6.18-rc2-mm1. Does anybody have anything against them having some testing in -mm?
---
The following series implements read-only 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. In this version, if there are writers on a superblock, the filesystem may not be remounted r/o. The same goes for MS_BIND mounts, and writers on a vfsmount.
This has a number of uses. It allows chroots to have parts of filesystems writable. It will be useful for containers in the future and is intended to replace 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, when you don't want to have entire new filesystems mounted, or when you want atime selectively updated.
This set makes no attempt to keep the return codes for these r/o bind mounts the same as for a real r/o filesystem or device. It would require significantly more code and be quite a bit more invasive.
Using this feature requires two steps:
mount --bind /source /dest mount -o remount,ro /dest