summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-10-18 17:53:34 +0000
committerphk <phk@FreeBSD.org>2003-10-18 17:53:34 +0000
commitb3eb57c5d4e776fd1834e960b774ee2ca7221842 (patch)
treeee5aea4ac66d53eb507197208fd73f67496e4c81
parent5a1c5c9c133e6203cc6a02b83c76730842c39948 (diff)
downloadFreeBSD-src-b3eb57c5d4e776fd1834e960b774ee2ca7221842.zip
FreeBSD-src-b3eb57c5d4e776fd1834e960b774ee2ca7221842.tar.gz
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.
-rw-r--r--sys/geom/geom_disk.c1
-rw-r--r--sys/sys/bio.h1
-rw-r--r--sys/sys/buf.h2
3 files changed, 1 insertions, 3 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c
index 8bb9850..b2a3717 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 6f98f93..707f34f 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 198aa7e..9bb5fa5 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 */
OpenPOWER on IntegriCloud