Retire bio_blkno entirely.
bio_offset is the field drivers should use. bio_pblkno remains as a convenient place to store the number of the device drivers.
This commit is contained in:
parent
5a1c5c9c13
commit
b3eb57c5d4
@ -265,7 +265,6 @@ g_disk_start(struct bio *bp)
|
||||
bp->bio_error = ENOMEM;
|
||||
}
|
||||
bp2->bio_done = g_disk_done;
|
||||
bp2->bio_blkno = bp2->bio_offset >> DEV_BSHIFT;
|
||||
bp2->bio_pblkno = bp2->bio_offset / dp->d_sectorsize;
|
||||
bp2->bio_bcount = bp2->bio_length;
|
||||
bp2->bio_disk = dp;
|
||||
|
@ -56,7 +56,6 @@ struct bio {
|
||||
u_int bio_cmd; /* I/O operation. */
|
||||
dev_t bio_dev; /* Device to do I/O on. */
|
||||
struct disk *bio_disk; /* Valid below geom_disk.c only */
|
||||
daddr_t bio_blkno; /* Underlying physical block number. */
|
||||
off_t bio_offset; /* Offset into file. */
|
||||
long bio_bcount; /* Valid bytes in buffer. */
|
||||
caddr_t bio_data; /* Memory, superblocks, indirect etc. */
|
||||
|
@ -104,7 +104,6 @@ typedef unsigned char b_xflags_t;
|
||||
struct buf {
|
||||
struct bio b_io; /* "Builtin" I/O request. */
|
||||
#define b_bcount b_io.bio_bcount
|
||||
#define b_blkno b_io.bio_blkno
|
||||
#define b_caller1 b_io.bio_caller1
|
||||
#define b_caller2 b_io.bio_caller2
|
||||
#define b_data b_io.bio_data
|
||||
@ -122,6 +121,7 @@ struct buf {
|
||||
#define B_MAGIC_BIO 0x10b10b10
|
||||
#define B_MAGIC_NFS 0x67238234
|
||||
void (*b_iodone)(struct buf *);
|
||||
daddr_t b_blkno; /* Underlying physical block number. */
|
||||
off_t b_offset; /* Offset into file. */
|
||||
TAILQ_ENTRY(buf) b_vnbufs; /* (V) Buffer's associated vnode. */
|
||||
struct buf *b_left; /* (V) splay tree link */
|
||||
|
Loading…
Reference in New Issue
Block a user