Subject: RE: changing VOP_REMOVE(), was Re: ufs-ism in lookup(9)
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Gordon Waidhofer <gww@traakan.com>
List: tech-kern
Date: 03/30/2004 23:06:24
Looking at sys_unlink(), the vp returned
by namei() is used to:
1) Check for a mount point
2) Check for write-blocking (new)
using vn_start_write(). I believe
this is in contemplation of LVM-based
snapshots.
3) Check leases for both the enclosing directory
(ni_dvp) and the object itself (ni_vp).
Three thoughts:
1) The VOP_LOOKUP() of the last component
is needed for all these checks
2) I'm uneasy with so many file system
semantics being vested above the VOP
layer; but
3) I'd be more uneasy trying to keep pace
with the evolving semantics below VOP_REMOVE()
(and kindred) in all the file systems (including
mine). Saving the VOP_LOOKUP() just isn't worth it.
Not enough of a case has been made for how eliminating
the VOP_LOOKUP() of the last component for dirops is a win.
A estimate of benefit might be helpful. For myself, I don't
see enough of a possible win to upset the VOP design.
Cheers,
-gww