Oliver Fromme
2007-Oct-24 06:17 UTC
[ANN] 8-CURRENT, RELENG_7 and RELENG_6 have gotten latest ?unionfs improvements
[Note: stripped excessive Cc.] Dmitry Marakasov <amdmi3@amdmi3.ru> wrote: > Btw, I was wondering: is unionfs related in any way with -ounion > option of mount_*? No. The union mount option (-o union) is completely separate from UNIONFS, although it can be used to achieve a somewhat similar effect. It depends on your requirements whether it is sufficient or not. > I was told long time ago that -ounion is even > more broken than unionfs. That's wrong. The union mount option was _never_ really broken. I'm using it for almost as long as FreeBSD exists. However UNIONFS was broken for a long time (along with NULLFS and UMAPFS). NULLFS has been fixed some time ago, UMAPFS was abandoned apparently, i.e. nobody showed up to fix it, and UNIONFS was pretty much completely overhauled by Daichi GOTO and his team. I would now regard it as stable. > Though, those two features seem to do very > similar thing and I think that -ounion option is pretty useful. Yes, it is useful. The biggest differences are: - The union mount option newly mounts a filesystem on top of an arbitrary existing directory tree, while UNIONFS mounts another representation of one existing directory tree on top of another one. That means UNIONFS does the same as NULLFS, but unlike NULLFS it does not hide the underlying directory tree. - When using the union mount option, only the entries in the root directory show through from the "lower" file system. When using UIONFS, _all_ entries in _all_ directories are visible (unless masked by an identical entry in the upper file system, of course). - The implementation of the union mount option is rather simple has rather low overhead. UNIONFS is much more complex and has some overhead for certain operations, especially when files and directories have to be created automatically in the upper layer. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Gesch?ftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht M?n- chen, HRB 125758, Gesch?ftsf?hrer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "Python is an experiment in how much freedom programmers need. Too much freedom and nobody can read another's code; too little and expressiveness is endangered." -- Guido van Rossum
Bruce Evans
2007-Oct-25 11:34 UTC
[ANN] 8-CURRENT, RELENG_7 and RELENG_6 have gotten latest ?unionfs improvements
On Wed, 24 Oct 2007, Oliver Fromme wrote:> Dmitry Marakasov <amdmi3@amdmi3.ru> wrote: > > I was told long time ago that -ounion is even > > more broken than unionfs. > > That's wrong. The union mount option was _never_ really > broken. I'm using it for almost as long as FreeBSD exists.I recently noticed the following bugs in -ounion (which I've never used for anything except testing): (1) It is broken for all file systems except ffs and ext2fs, since all (?) file systems now use nmount(2) and only these two file systems have "union" in their mount options list. It is still in the global options list in mount/mntopts.h, but this is only used with mount(2). The global options list in mount/mntopts.h has many bogus non-global options, and even the global options list in kern/vfs_mount.c has some bogus non-global options, but "union" actually is a global options. ext2fs loves "union" more than ffs -- although its options list is less disordered than ffs's, it has enough disorder to have 2 copies of "union". (2) After fixing (1) by not using nmount(2), following of symlinks works strangely for at least devfs: (a) a link foo -> zero (where zero doesn't exist in the underlying file system) doesn't work. mount(1) says that the lookup is done in the mounted file system first. (b) a link foo -> ./zero works. This is correct. Now I wonder if it would work if zero existed only in the underlying file system. Have you noticed these bugs? (2) is presumably old. Bruce