Subject: Re: fileassoc (Re: CVS commit: src)
To: Elad Efrat <elad@NetBSD.org>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 07/17/2006 11:52:06
--HlL+5n6rz5pIUxbD
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Jul 16, 2006 at 09:52:33PM +0200, Elad Efrat wrote:
> YAMAMOTO Takashi wrote:
>=20
> > (assuming #3 is reasonable for your purpose)
>=20
> the idea, as even you noted before i added this code, is that fileassoc
> (arguably) needs to know when a file is removed or a fs is unmounted.
>=20
> > i don't think we have a good place in filesystem independent code.
>=20
> then we should. if our vfs layer can't tell when a file is being
> removed, that's a problem, and defective design imho.

Why? Well, why should the routines that call into file systems need to=20
worry about this?

> how to resolve this problem is up to you: if you want me to remove
> the sys_unlink() hooks i will, if you have a different solution in
> mind (either adding code to indicate file removal in vfs, whatever)
> it all goes afaic.
>=20
> one thing i won't do is add fs-specific hooks for this purpose. :)

Why? That's the best level for this. Only the file system really knows=20
what's going on. So it's the best place to put the hooks.

Note: to be clear, I think it'd be best if the fileassoc call that says=20
"file is gone" comes from the fs itself as opposed to above it.

Take care,

Bill

--HlL+5n6rz5pIUxbD
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFEu9xWWz+3JHUci9cRAqN2AJ9tEXt0sg4xW3jmlXgHuBeokENBvwCcCdd7
t9yXUOEzAqc4l6IAx4uEIms=
=GMoZ
-----END PGP SIGNATURE-----

--HlL+5n6rz5pIUxbD--