Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/miscfs/genfs



> > > 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.

the current convention for VOP_STRATEGY is
        - do BMAP by itself if b_lblkno == b_blkno.
        - otherwise use b_blkno.
so i don't think there is a problem with setting 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"

i replied to the PR.

> 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.

"1:1 mapping" means "always lblkno == blkno" like nfs?
why can't you follow what nfs does?

YAMAMOTO Takashi



Home | Main Index | Thread Index | Old Index