From: Valerie Aurora on 6 Aug 2010 13:20 On Thu, Aug 05, 2010 at 01:13:55PM +0200, Miklos Szeredi wrote: > On Wed, 4 Aug 2010, Valerie Aurora wrote: > > > Another idea is to use an internal inode and make all fallthroughs be > > > hard links to that. > > > > > > I think the same would work for whiteouts as well. I don't like the > > > fact that whiteouts are invisible even when not mounted as part of a > > > union. > > > > I don't know if this helps, but I just wrote support for removing ext2 > > whiteouts and fallthrus using tune2fs and e2fsck. I think this does > > what people want from a "visible" whiteout feature without adding more > > complexity to the VFS. It also takes away all consideration of race > > conditions and dentry conversion that happens with online removal of > > whiteouts and fallthrus. > > > > What are your thoughts on what a visible whiteout/fallthru would look > > like? > > Best would be if it didn't need any modification to filesystems. All > this having to upgrade util-linux, e2fsprogs, having incompatible > filesystem features is a pain for users (just been through that). > > What we already have in most filesystems: > > - extended attributes, e.g. use the system.union.* namespace and > denote whiteouts and falltroughs with such an attribute > > - hard links to make sure a separate inode is not necessary for each > whiteout/fallthrough entry > > - some way for the user to easily identify such files when not > mounted as part of a union e.g. make it a symlink pointing to > "(deleted)" or whatever > > Later the extended attributes can also be used for other things like > e.g. chmod()/chown() only copying up metadata, not data, and > indicating that data is still found on the lower layers. Just a quick note to say that my explicit design was to do as much as possible in the VFS, except when adding a little support to the low-level fs would make it significantly faster, simpler, and more correct. I think for union mounts to perform moderately well, and to avoid namespace problems, we can't build it 100% out of existing file system parts like xattrs. However, I could be wrong and I will definitely give any other implementation serious consideration. -VAL -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Miklos Szeredi on 6 Aug 2010 13:50 On Fri, 6 Aug 2010, Valerie Aurora wrote: > Oh, "mmount -b 8" == "mount -o union". Right. > Is this the mmount from mtools > or something else? It's primitive utility that basically just wraps the mount(2) syscall without any fstab/mtab support: http://www.kernel.org/pub/linux/kernel/people/mszeredi/mmount/ Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Miklos Szeredi on 13 Aug 2010 10:00 On Sun, 8 Aug 2010, Valerie Aurora wrote: > Add support for fallthru directory entries to ext2. This still doesn't work correctly, only now after unmounting/mounting the top layer the directory appears empty: uml:~# mount -oloop -r ext3.img /mnt/img/ uml:~# losetup /dev/loop2 ovl.img uml:~# /host/store/git/e2fsprogs/misc/mke2fs -O whiteout,fallthru /dev/loop2 mke2fs 1.41.12 (17-May-2010) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) Stride=0 blocks, Stripe width=0 blocks 1280 inodes, 10240 blocks 512 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=10485760 2 block groups 8192 blocks per group, 8192 fragments per group 640 inodes per group Superblock backups stored on blocks: 8193 Allocating group tables: done Writing inode tables: done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 24 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. uml:~# mmount -b 8 -t ext2 /dev/loop2 /mnt/img/ uml:~# "ls" /mnt/img lost+found union uml:~# "ls" /mnt/img/union 1 2 3 uml:~# umount /mnt/img uml:~# mmount -b 8 -t ext2 /dev/loop2 /mnt/img/ uml:~# ls -l /mnt/img/ total 13 drwx------ 2 root root 12288 Aug 13 13:42 lost+found drwxr-xr-x 2 root root 1024 Aug 13 13:42 union uml:~# ls -la /mnt/img/union/ total 2 drwxr-xr-x 2 root root 1024 Aug 13 13:42 . drwxr-xr-x 4 root root 1024 Aug 13 13:42 .. uml:~# grep /mnt/img /proc/self/mountinfo 21 12 7:0 / /mnt/img ro,relatime - ext3 /dev/loop0 ro,errors=continue,barrier=0,data=writeback 22 21 7:2 / /mnt/img rw,relatime,union - ext2 /dev/loop2 rw,errors=continue Thanks, Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
First
|
Prev
|
Pages: 1 2 Prev: fixed resource leak in scripts/mod/modpost.c Next: ntp: add hardpps implementation |