tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Layered fs, vnode locking and v_vnlock removal
On Wed, Jun 02, 2010 at 05:58:40PM +0100, David Laight wrote:
> > > In the long term VOP_xxxLOCK() should become part of the file systems.
> >
> > AFAIK there is a consensus between yamt@, ad@ and thorpej@ that
> > locking should be moved down to the filesystems.
> > There was some discussion about it here some time before.
Yes, this keeps coming up and I keep trying to explain why it's
misguided.
> There is a lurking problem making read/write atomically update the file
> offset. I suspect that is currently covered by the vnode lock.
> Might only affect O_APPEND - but I've seen systems get that wrong!
>
> Not to mention the problem of correctly setting the file position
> when read/write fault on a userspace address part way through a
> transfer.
Other important cases include atomicity of O_CREAT and permission
checks done in VFS-level code.
These cases can all be "handled" by cutting and pasting the code into
every file system, but we really don't want to do that.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index