From 936cc4614b5187681f3a1c76a7740ead4845a548 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Fri, 7 Feb 2003 21:09:51 +0000 Subject: [PATCH] Rename bio_linkage to the more obvious bio_parent. Add bio_t0 timestamp, and include where needed --- sbin/vinum/vext.h | 1 + sys/cam/scsi/scsi_sa.c | 1 + sys/dev/vinum/vinumhdr.h | 1 + sys/geom/geom_dev.c | 2 +- sys/geom/geom_io.c | 2 +- sys/geom/geom_subr.c | 2 +- sys/sys/bio.h | 3 ++- 7 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sbin/vinum/vext.h b/sbin/vinum/vext.h index 92bd239249aa..3d0f79b8320a 100644 --- a/sbin/vinum/vext.h +++ b/sbin/vinum/vext.h @@ -57,6 +57,7 @@ enum { #include #include #include +#include #include #include #include diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c index b920b0009a67..75dd670bf26c 100644 --- a/sys/cam/scsi/scsi_sa.c +++ b/sys/cam/scsi/scsi_sa.c @@ -36,6 +36,7 @@ #include #endif #include +#include #include #include #include diff --git a/sys/dev/vinum/vinumhdr.h b/sys/dev/vinum/vinumhdr.h index 3fda4f17dc8e..00a2251e166b 100644 --- a/sys/dev/vinum/vinumhdr.h +++ b/sys/dev/vinum/vinumhdr.h @@ -53,6 +53,7 @@ #endif #include #include +#include #include #include #include diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c index 36634e206638..99f4cc7e0c12 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -363,7 +363,7 @@ g_dev_done(struct bio *bp2) { struct bio *bp; - bp = bp2->bio_linkage; + bp = bp2->bio_parent; bp->bio_error = bp2->bio_error; if (bp->bio_error != 0) { g_trace(G_T_BIO, "g_dev_done(%p) had error %d", diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c index 514703b6ff36..9a6d215d290c 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -148,7 +148,7 @@ g_clone_bio(struct bio *bp) bp2 = g_new_bio(); if (bp2 != NULL) { - bp2->bio_linkage = bp; + bp2->bio_parent = bp; bp2->bio_cmd = bp->bio_cmd; bp2->bio_length = bp->bio_length; bp2->bio_offset = bp->bio_offset; diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c index 7c1c4c1a5640..0d289789589f 100644 --- a/sys/geom/geom_subr.c +++ b/sys/geom/geom_subr.c @@ -494,7 +494,7 @@ g_std_done(struct bio *bp) { struct bio *bp2; - bp2 = bp->bio_linkage; + bp2 = bp->bio_parent; if (bp2->bio_error == 0) bp2->bio_error = bp->bio_error; bp2->bio_completed += bp->bio_completed; diff --git a/sys/sys/bio.h b/sys/sys/bio.h index 5aaba85c1225..2ef28bc77b68 100644 --- a/sys/sys/bio.h +++ b/sys/sys/bio.h @@ -71,10 +71,11 @@ struct bio { off_t bio_length; /* Like bio_bcount */ off_t bio_completed; /* Inverse of bio_resid */ u_int bio_children; /* Number of spawned bios */ + struct bio *bio_parent; /* Pointer to parent */ + struct bintime bio_t0; /* Time request started */ /* XXX: these go away when bio chaining is introduced */ daddr_t bio_pblkno; /* physical block number */ - struct bio *bio_linkage; }; /* bio_cmd */