Subject: Re: VOP_BMAP question
To: None <>
From: Bill Studenmund <>
List: tech-kern
Date: 12/23/2003 09:55:37
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Dec 19, 2003 at 10:13:22PM +0100, Juergen Hannken-Illjes wrote:
> How does VOP_BMAP() handle fragments?
> Given a file with holes obtained from ftruncate(), what does VOP_BMAP()
> return in its argument "bnp" if it finds a fragment?
> Is it the block number of the fragment or will it return (daddr_t)-1?
> Is it always ok to write a full block to "bnp"?

I think you've been bitten by an ffs ambiguity (since only ffs has=20

What ffs calls a fragment in its documentation (the 1k in an 8k/1k file=20
system) is what the kernel internally calls a block. Since VOP_BMAP()=20
deals with kernel things, a "fragment" is a block, so there is no problem.

Take care,


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

Version: GnuPG v1.2.3 (NetBSD)