From b3eb57c5d4e776fd1834e960b774ee2ca7221842 Mon Sep 17 00:00:00 2001 From: phk Date: Sat, 18 Oct 2003 17:53:34 +0000 Subject: [PATCH] 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. --- sys/geom/geom_disk.c | 1 - sys/sys/bio.h | 1 - sys/sys/buf.h | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c index 8bb9850d201a..b2a3717b74b0 100644 --- a/sys/geom/geom_disk.c +++ b/sys/geom/geom_disk.c @@ -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; diff --git a/sys/sys/bio.h b/sys/sys/bio.h index 6f98f9338b74..707f34f3db39 100644 --- a/sys/sys/bio.h +++ b/sys/sys/bio.h @@ -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. */ diff --git a/sys/sys/buf.h b/sys/sys/buf.h index 198aa7e34d77..9bb5fa5f3423 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -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 */