Subject: Re: CVS commit: src/sys/miscfs
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Bill Studenmund <wrstuden@netbsd.org>
List: source-changes
Date: 06/17/2004 15:15:44
--O3RTKUHj+75w1tg5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Jun 17, 2004 at 10:50:25AM -0700, Bill Studenmund wrote:
> On Thu, Jun 17, 2004 at 11:02:07AM +0900, YAMAMOTO Takashi wrote:
> > we have many code which assume that vn_lock with LK_RETRY never fails.
> > are you going to add error checks on all of them?
> > i think that it just bloats the code without any benefits.
>=20
> The difference here is that you're changing the state of PDIRUNLOCK. Don'=
t=20
> clear it if you don't know the lock succeeded.

Let me re-state this. The whole reason I added PDIRUNLOCK was for the=20
error case when we didn't get to re-lock dvp. Yes, VOP_LOOKUP() is=20
supposed to have it locked in the error case, and I agree it's really rare=
=20
that it won't work. But that's its purpose. Also, it's to facilitate lock=
=20
coordination, to let layered file systems know if something strange=20
happened so they can adapt.

Given that its whole purpose is to help with the error case, you could=20
just not bother re-locking the parent directory if the layer create fails.

Take care,

Bill

--O3RTKUHj+75w1tg5
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFA0hgQWz+3JHUci9cRAi1CAJ4+Hkl0mEH8hD/HlLsuf4WadreTggCdG3Ua
I9J4isNVF/dY5sQ7AoQVzDE=
=jVrT
-----END PGP SIGNATURE-----

--O3RTKUHj+75w1tg5--