Messages in this thread | | | Date | Mon, 15 Mar 2004 04:53:51 +0100 | From | Herbert Poetzl <> | Subject | [PATCH] Bind Mount Extensions 0.04 |
| |
Greetings!
The following patch extends the 'noatime', 'nodiratime' and last but not least the 'ro' (read only) mount option to the vfs --bind mounts, allowing them to behave like any other mount, by honoring those mount flags (which are silently ignored by the current implementation)
an older version of this patch was included in 2.6.0-test6-mm2, and it is currently used by several people, without any issues, so I'd kindly request to consider it for inclusion into mainline.
if the size of the patch is an issue, I can break it down into three parts, one preparing the existing structures, one adding noatime/nodiratime and one doing the read only stuff.
the patch makes the following syscalls behave like expected
- open (read/write/trunc), create - link, symlink, unlink - mknod (reg/block/char/fifo), mkfifo - mkdir, rmdir - (f)chown, (f)chmod, utime - access, truncate, mmap - ioctl (gen/ext2/ext3/reiser)
the following cases where verified for --bind ro (test tool) and showed no difference to a 'real' ro mounted filesystem:
- open() - O_RDONLY: file, dir, symlink, broken, cdev, bdev, fifo, new - O_WRONLY: file, dir, symlink, broken, cdev, bdev, fifo, new - O_RDWR: file, dir, symlink, broken, cdev, bdev, fifo, new - O_CREAT: file
- mkdir() dir, new, invalid - mkfifo() fifo, new, invalid
- mknod() - S_IFREG: file, new, invalid - S_IFCHR: cdev, new, invalid - S_IFBLK: bdev, new, invalid - S_IFIFO: fifo, new, invalid
- chown() file, invalid - fchown() file - chmod() file, invalid - fchmod() file
- link() file/file, file/invalid, invalid/file - symlink() file/file, file/invalid, invalid/file
- rename() file/file, file/invalid, invalid/file - rmdir() dir, new, invalid - truncate() file, new invalid - ftruncate() file
- unlink() file, bdev, cdev, fifo, new, invalid
you can download them here, if you prefer that over extracting them from emails ...
http://www.13thfloor.at/patches/
TIA, Herbert
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |