Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Apr 2000 01:46:57 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        "Justin T. Gibbs" <gibbs@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern kern_mib.c vfs_bio.c src/sys/sys buf.h
Message-ID:  <Pine.BSF.4.21.0004050127390.2342-100000@alphplex.bde.org>
In-Reply-To: <27007.954851980@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 4 Apr 2000, Poul-Henning Kamp wrote:

> In message <Pine.BSF.4.21.0004042139060.2001-100000@alphplex.bde.org>, Bruce Ev
> ans writes:
> 
> >> I will propose we stick to just one field in struct bio:  a 64bit
> >> byte offset, we may want to keep a blkno around in struct buf,
> >> but lets decide that separately.
> >
> >This requires more widespread changes to convert block numbers to offsets
> >in all file systems, and normally gives 2 extra sets of conversions:
> 
> No, we can populate the bio_offset in specfs::strategy if it isn't
> already, we don't need to touch any filesystems for this:
> 
> 	if (!(bp->b_FLAGS & B_PHYS))
> 		bp->bio_offset = bp->b_blkno << DEV_BSIZE;

This should use dbtob() to avoid overflow.  BTW, dbtob() is broken on alphas.

OK, this is good enough for keeping complications out of the bio layer.
There are so many layers between bawrite() and the driver strategy routine
that the overhead for an extra conversion or two will be lost in the
bloat.

Bruce



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0004050127390.2342-100000>