Date: Wed, 23 Aug 1995 10:00:24 +1000 From: Bruce Evans <bde@zeta.org.au> To: bde@zeta.org.au, terry@cs.weber.edu Cc: hackers@freebsd.org, msmith@atrad.adelaide.edu.au Subject: Re: Using space in a DOS filesystem Message-ID: <199508230000.KAA27459@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> In FreeBSD, unlike in Terryx :-), O_EXCL is only implemented for regular >> files. The semantics of O_EXCL are specified by POSIX (only) for >> regular files. They don't give mandatory locking. Everything that >> opens the file would have to use O_EXCL to give advisory locking. >Why from the FAT perspective isn't a contiguous slab of blocks considered >a regular file? It is, but POSIX conformance guarantees that O_EXCL is no use for implementing mandatory locking in that case. >We are asserting the lock against potential FAT users, not against >root clobbering himself. The FAT users are unlikely to use O_EXCL, although root could be more careful. Normal protecion methods are probably good enough. Either don't mount the file system containing the slab, or mount it ro, or don't allow non-root to change the slab. Root has to be careful not to clobber the slab. I noticed the expected strange behaviour when I clobber the file underlying a vn device. The cache lacks coherency because the same block can be in two buffers at once (once for the file vnode and once for the device vnode), so various things worked better after sync than before. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508230000.KAA27459>