Read-only bind mounts
Get series with b4
b4 am 20070917182718.70494C9B@kernelVersions newest first
- v1 Latest22 of 24 patches 34 repliesIn review
22 of 24 patches are in this archive. The cover letter announces 24.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/24 | filesystem helpers for custom 'struct file'sfs/ fs/ fs/ +5 more | +78 | 5 replies | |
| 2/24 | rearrange may_open() to be r/o friendlyfs/ | +9 | 2 replies | |
| 3/24 | create cleanup helper svc_msnfs()fs/ | +11 | 6 replies | |
| 4/24 | r/o bind mounts: stub functionsfs/ include/ | +49 | 1 reply | |
| 5/24 | elevate write count open()'d filesfs/ fs/ ipc/ | +27 | 1 reply | |
| 6/24 | r/o bind mounts: elevate write count for some ioctlsfs/ fs/ fs/ +8 more | +273 | 1 reply | |
| 7/24 | elevate writer count for chown and friendsfs/ | +30 | 1 reply | |
| 8/24 | make access() use mnt checkfs/ | +11 | 1 reply | |
| 9/24 | elevate mnt writers for callers of vfs_mkdir()fs/ fs/ | +9 | 1 reply | |
| 10/24 | elevate write count during entire ncp_ioctl()fs/ | +54 | 1 reply | |
| 11/24 | elevate write count for link and symlink callsfs/ | +10 | 1 reply | |
| 12/24 | elevate mount count for extended attributesfs/ fs/ | +20 | 1 reply | |
| 13/24 | elevate write count for file_update_time()fs/ | +12 | 1 reply | |
| 14/24 | unix_find_other() elevate write count for touch_atime()net/ | +12 | 1 reply | |
| 15/24 | elevate write count over calls to vfs_rename()fs/ fs/ | +15 | 1 reply | |
| 16/24 | nfs: check mnt instead of superblock directlyfs/ fs/ | +4 | 1 reply | |
| 17/24 | elevate writer count for do_sys_truncate()fs/ | +8 | 1 reply | |
| 18/24 | elevate write count for do_utimes()fs/ | +9 | 1 reply | |
| 19/24 | elevate write count for do_sys_utime() and touch_atime()fs/ | +12 | 1 reply | |
| 20/24 | sys_mknodat(): elevate write count for vfs_mknod/create()fs/ fs/ net/ | +29 | 1 reply | |
| 21/24 | elevate mnt writers for vfs_unlink() callersfs/ ipc/ | +8 | 1 reply | |
| 22/24 | do_rmdir(): elevate write countfs/ | +5 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/24] Read-only bind mounts
If we can't pull the entire series into -mm, can we just put the first three patches for now? They can stand on their own.
---
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.