From 53aec1a3a4fd66cf5c0d8f60cb7bae402caa6868 Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 2 Feb 2003 11:59:54 +0000 Subject: [PATCH] Add a bio_disk pointer for use between geom_disk and the device drivers. --- sys/geom/geom_disk.c | 4 ++-- sys/sys/bio.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c index b7f0eecfb47..eb134a9bff0 100644 --- a/sys/geom/geom_disk.c +++ b/sys/geom/geom_disk.c @@ -150,7 +150,7 @@ g_disk_done(struct bio *bp) { struct disk *dp; - dp = bp->bio_caller1; + dp = bp->bio_disk; bp->bio_completed = bp->bio_length - bp->bio_resid; if (!(dp->d_flags & DISKFLAG_NOGIANT)) { DROP_GIANT(); @@ -188,7 +188,7 @@ g_disk_start(struct bio *bp) bp2->bio_pblkno = bp2->bio_offset / dp->d_sectorsize; bp2->bio_bcount = bp2->bio_length; bp2->bio_dev = dev; - bp2->bio_caller1 = dp; + bp2->bio_disk = dp; g_disk_lock_giant(dp); dp->d_strategy(bp2); g_disk_unlock_giant(dp); diff --git a/sys/sys/bio.h b/sys/sys/bio.h index d012c86881d..5aaba85c122 100644 --- a/sys/sys/bio.h +++ b/sys/sys/bio.h @@ -44,12 +44,14 @@ #include +struct disk; /* * The bio structure describes an I/O operation in the kernel. */ 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. */ -- 2.45.2