Subject: Re: CVS commit: src/sys/miscfs/genfs
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Reinoud Zandijk <reinoud@netbsd.org>
List: source-changes
Date: 11/30/2005 03:20:39
--tKW2IUtsqtDRztdT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Wed, Nov 30, 2005 at 10:59:33AM +0900, YAMAMOTO Takashi wrote:
> > Module Name:	src
> > Committed By:	reinoud
> > Date:		Wed Nov 30 01:46:06 UTC 2005
> > 
> > Modified Files:
> > 	src/sys/miscfs/genfs: genfs_vnops.c
> > 
> > Log Message:
> > Learn genfs that (struct buf *)->b_lblkno allways need to point to the
> > logical block number of the file instead of allways zero.
> 
> for what is it necessary?

buffers passed from bread()/bwrite() have this field set up correctly 
whereas genfs just bluntly sets it to zero.

Note that there are other problems currently with buffer passing to 
strategy, see my PR # "kern/32193: vop_strategy gets broken struct buf's 
passed by genfs/bread, possible memory leakage"

For filingsystems that rely/want to do 1:1 mapping in bmap, its a PITA that 
suddenly the b_lblknr gets cleared and in one routine they have to manually 
correct this.

Cheers,
Reinoud


--tKW2IUtsqtDRztdT
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iQEVAwUBQ40MY4KcNwBDyKpoAQINPgf/UWR89GeHAB4jSVJwXopHTry58prwWeM4
KvqUVBv7blufws0zdb8MS/lqukIybsMkL0fBoCXHuE4n8s/fvwLUGWOhQiFeLwzH
kP17PJ+07RJKd9Wb3gi0i1CoE+4z+V2GugH9vc+bHaAYzpgb9Nb8WM11zdZfweY4
kkHbRf1AftV0EA42HeM0NsYPS1sZlHR0TuHD6qpP5en9+jHP28HYoIsaYEGBITvG
F/drsJnm8eBrJhefsaHFHKPLFE9lRqxjXIFllhJeYexmbKqvde7/wFgFLSB4zN3u
5e7+SMiPmEiXxyS8Yp6d4ruScEv6CJdgF4EJi+Kw+fPpOw4Rp0W6Dg==
=Di/z
-----END PGP SIGNATURE-----

--tKW2IUtsqtDRztdT--