Subject: Re: ufs-ism in lookup(9)
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 04/06/2004 10:08:28
--ncSAzJYg3Aa9+CRW
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Apr 06, 2004 at 09:22:18AM -0700, Bill Studenmund wrote:
> On Tue, Apr 06, 2004 at 07:39:41PM +0900, YAMAMOTO Takashi wrote:
> > > You don't need to remember to remove the negative entry before=20
> > > creating the positive one, and if the opertation fails such that you =
know=20
> > > you have no such file, you can (if you wish) freely create a new nega=
tive=20
> > > entry.
> >=20
> > i think it's better to allow cache_enter() to overwrite an existing ent=
ry.

Hmm.... I'll see if there are implications to changing from negative to=20
positive entries & vis versa.

> > > And, I think, the changes I posted only do the removal for the=20
> > > CREATE case, not the DELETE case. I decided to let the fs deal with t=
hat=20
> > > case. :-)
> >=20
> > why do you always want to do the automatic removal for CREATE case?
> > consider O_EXCL create on nfsv2.
> > if you already have a negative cache entry,
> > i guess you don't want to issue a remote call to recheck it.
> > (or, at least, want to let the filesystem implementation make
> > its decision about usefulness of the cache.)
> > because current cache_lookup() silently removes the entry,
> > you have no clean way to see the negative entry.

I definitely think the "no way to see" aspect is bad. I think there may=20
still be value in keeping the removal, but we definitely should let the fs=
=20
know there was/is an entry.

Take care,

Bill

--ncSAzJYg3Aa9+CRW
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFAcuQLWz+3JHUci9cRAs8MAJ9bxM9QOk1I7UYbPnqrb3YC7MdLogCcDQrF
qi4O6lt4z2aufE9QRexamzk=
=lR5m
-----END PGP SIGNATURE-----

--ncSAzJYg3Aa9+CRW--