Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/man/man9 Sync with reality; The struct disk has been e...



details:   https://anonhg.NetBSD.org/src/rev/82755c5341c6
branches:  trunk
changeset: 539034:82755c5341c6
user:      enami <enami%NetBSD.org@localhost>
date:      Wed Nov 06 03:55:01 2002 +0000

description:
Sync with reality; The struct disk has been extended to have
separate read/write disk statistics.  Pointed out by itohy.

diffstat:

 share/man/man9/disk.9 |  23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)

diffs (66 lines):

diff -r a754630ca0d2 -r 82755c5341c6 share/man/man9/disk.9
--- a/share/man/man9/disk.9     Wed Nov 06 02:31:34 2002 +0000
+++ b/share/man/man9/disk.9     Wed Nov 06 03:55:01 2002 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: disk.9,v 1.18 2002/10/14 13:43:21 wiz Exp $
+.\"    $NetBSD: disk.9,v 1.19 2002/11/06 03:55:01 enami Exp $
 .\"
 .\" Copyright (c) 1995, 1996 Jason R. Thorpe.
 .\" All rights reserved.
@@ -56,7 +56,7 @@
 .Ft void
 .Fn disk_busy "struct disk *"
 .Ft void
-.Fn disk_unbusy "struct disk *"
+.Fn disk_unbusy "struct disk *" "long bcount" "int read"
 .Ft void
 .Fn disk_resetstat "struct disk *"
 .Ft struct disk *
@@ -85,9 +85,11 @@
         * on certain types of disks.
         */
        int       dk_busy;      /* busy counter */
-       u_int64_t dk_xfer;      /* total number of transfers */
+       u_int64_t dk_rxfer;     /* total number of read transfers */
+       u_int64_t dk_wxfer;     /* total number of write transfers */
        u_int64_t dk_seek;      /* total independent seek operations */
-       u_int64_t dk_bytes;     /* total bytes transfered */
+       u_int64_t dk_rbytes;    /* total bytes read */
+       u_int64_t dk_wbytes;    /* total bytes written */
        struct timeval  dk_attachtime;  /* time disk was attached */
        struct timeval  dk_timestamp;   /* timestamp of last unbusy */
        struct timeval  dk_time;        /* total time spent busy */
@@ -147,6 +149,11 @@
 Set the disk's timestamp to the current time.
 If the provided byte count is greater than 0, add it to the disk's
 running total and increment the number of transfers performed by the disk.
+The third argument
+.Ar read
+specifies the direction of I/O;
+if non-zero it means reading from the disk,
+otherwise it means writing to the disk.
 .It Fn disk_resetstat
 Reset the running byte, transfer, and time totals.
 .It Fn disk_find
@@ -303,6 +310,11 @@
 pending transfer on the disk.
 A byte count is also added to the disk's running total, and if greater than
 zero, the number of transfers the disk has performed is incremented.
+The third argument
+.Ar read
+specifies the direction of I/O;
+if non-zero it means reading from the disk,
+otherwise it means writing to the disk.
 .Bd -literal
 void
 foodone(xfer)
@@ -326,7 +338,8 @@
        [ . . . ]
 
        /* Notify the disk framework that we've completed the transfer. */
-       disk_unbusy(\*[Am]sc-\*[Gt]sc_dk, nbytes);
+       disk_unbusy(\*[Am]sc-\*[Gt]sc_dk, nbytes,
+           bp != NULL ? bp-\*[Gt]b_flags \*[Am] B_READ : 0);
 
        [ . . . ]
 }



Home | Main Index | Thread Index | Old Index