whitespace.
This commit is contained in:
parent
8613dc06f0
commit
6237cabc7d
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: subr_disk.c,v 1.75 2006/04/20 12:13:53 blymn Exp $ */
|
||||
/* $NetBSD: subr_disk.c,v 1.76 2006/04/21 13:48:57 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1999, 2000 The NetBSD Foundation, Inc.
|
||||
@ -74,7 +74,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.75 2006/04/20 12:13:53 blymn Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.76 2006/04/21 13:48:57 yamt Exp $");
|
||||
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
||||
@ -177,7 +177,7 @@ disk_find(char *name)
|
||||
if ((stat != NULL) && (stat->io_type == IOSTAT_DISK))
|
||||
return stat->io_parent;
|
||||
|
||||
return (NULL);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -214,9 +214,8 @@ disk_attach0(struct disk *diskp)
|
||||
* Set up the stats collection.
|
||||
*/
|
||||
diskp->dk_stats = iostat_alloc(IOSTAT_DISK);
|
||||
diskp->dk_stats->io_parent = (void *) diskp;
|
||||
diskp->dk_stats->io_name = diskp->dk_name;
|
||||
|
||||
diskp->dk_stats->io_parent = (void *) diskp;
|
||||
diskp->dk_stats->io_name = diskp->dk_name;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -226,7 +225,7 @@ disk_detach0(struct disk *diskp)
|
||||
/*
|
||||
* Remove from the drivelist.
|
||||
*/
|
||||
iostat_free(diskp->dk_stats);
|
||||
iostat_free(diskp->dk_stats);
|
||||
|
||||
/*
|
||||
* Free the space used by the disklabel structures.
|
||||
@ -293,6 +292,7 @@ pseudo_disk_detach(struct disk *diskp)
|
||||
void
|
||||
disk_busy(struct disk *diskp)
|
||||
{
|
||||
|
||||
iostat_busy(diskp->dk_stats);
|
||||
}
|
||||
|
||||
@ -302,6 +302,7 @@ disk_busy(struct disk *diskp)
|
||||
void
|
||||
disk_unbusy(struct disk *diskp, long bcount, int read)
|
||||
{
|
||||
|
||||
iostat_unbusy(diskp->dk_stats, bcount, read);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: subr_iostat.c,v 1.2 2006/04/20 12:13:53 blymn Exp $ */
|
||||
/* $NetBSD: subr_iostat.c,v 1.3 2006/04/21 13:48:57 yamt Exp $ */
|
||||
/* NetBSD: subr_disk.c,v 1.69 2005/05/29 22:24:15 christos Exp */
|
||||
|
||||
/*-
|
||||
@ -75,7 +75,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: subr_iostat.c,v 1.2 2006/04/20 12:13:53 blymn Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: subr_iostat.c,v 1.3 2006/04/21 13:48:57 yamt Exp $");
|
||||
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
||||
@ -105,8 +105,8 @@ iostati_getnames(int disk_only, char *oldp, size_t *oldlenp, const void *newp,
|
||||
* A global list of all drives attached to the system. May grow or
|
||||
* shrink over time.
|
||||
*/
|
||||
struct iostatlist_head iostatlist = TAILQ_HEAD_INITIALIZER(iostatlist);
|
||||
int iostat_count; /* number of drives in global drivelist */
|
||||
struct iostatlist_head iostatlist = TAILQ_HEAD_INITIALIZER(iostatlist);
|
||||
int iostat_count; /* number of drives in global drivelist */
|
||||
struct simplelock iostatlist_slock = SIMPLELOCK_INITIALIZER;
|
||||
|
||||
/*
|
||||
@ -136,8 +136,8 @@ iostat_find(char *name)
|
||||
/*
|
||||
* Allocate and initialise memory for the i/o statistics.
|
||||
*/
|
||||
struct
|
||||
io_stats *iostat_alloc(int32_t type)
|
||||
struct io_stats *
|
||||
iostat_alloc(int32_t type)
|
||||
{
|
||||
int s;
|
||||
struct io_stats *stats;
|
||||
@ -182,9 +182,9 @@ void
|
||||
iostat_free(struct io_stats *stats)
|
||||
{
|
||||
|
||||
/*
|
||||
* Remove from the iostat list.
|
||||
*/
|
||||
/*
|
||||
* Remove from the iostat list.
|
||||
*/
|
||||
if (iostat_count == 0)
|
||||
panic("iostat_free: iostat_count == 0");
|
||||
simple_lock(&iostatlist_slock);
|
||||
@ -255,18 +255,21 @@ iostat_unbusy(struct io_stats *stats, long bcount, int read)
|
||||
void
|
||||
iostat_seek(struct io_stats *stats)
|
||||
{
|
||||
|
||||
stats->io_seek++;
|
||||
}
|
||||
|
||||
static int
|
||||
sysctl_hw_disknames(SYSCTLFN_ARGS)
|
||||
{
|
||||
|
||||
return iostati_getnames(1, oldp, oldlenp, newp, namelen);
|
||||
}
|
||||
|
||||
static int
|
||||
sysctl_hw_iostatnames(SYSCTLFN_ARGS)
|
||||
{
|
||||
|
||||
return iostati_getnames(0, oldp, oldlenp, newp, namelen);
|
||||
}
|
||||
|
||||
@ -397,6 +400,7 @@ sysctl_hw_iostats(SYSCTLFN_ARGS)
|
||||
|
||||
SYSCTL_SETUP(sysctl_io_stats_setup, "sysctl i/o stats setup")
|
||||
{
|
||||
|
||||
sysctl_createv(clog, 0, NULL, NULL,
|
||||
CTLFLAG_PERMANENT,
|
||||
CTLTYPE_STRING, "disknames",
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: disk.h,v 1.34 2006/04/14 13:09:07 blymn Exp $ */
|
||||
/* $NetBSD: disk.h,v 1.35 2006/04/21 13:48:57 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 2004 The NetBSD Foundation, Inc.
|
||||
@ -293,9 +293,9 @@ void disk_detach(struct disk *);
|
||||
void pseudo_disk_init(struct disk *);
|
||||
void pseudo_disk_attach(struct disk *);
|
||||
void pseudo_disk_detach(struct disk *);
|
||||
void disk_busy(struct disk *);
|
||||
void disk_unbusy(struct disk *, long, int);
|
||||
struct disk *disk_find(char *);
|
||||
void disk_busy(struct disk *);
|
||||
void disk_unbusy(struct disk *, long, int);
|
||||
struct disk *disk_find(char *);
|
||||
|
||||
int dkwedge_add(struct dkwedge_info *);
|
||||
int dkwedge_del(struct dkwedge_info *);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: iostat.h,v 1.2 2006/04/20 12:13:53 blymn Exp $ */
|
||||
/* $NetBSD: iostat.h,v 1.3 2006/04/21 13:48:57 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 2004 The NetBSD Foundation, Inc.
|
||||
@ -106,8 +106,8 @@ TAILQ_HEAD(iostatlist_head, io_stats); /* the iostatlist is a TAILQ */
|
||||
#ifdef _KERNEL
|
||||
void iostat_busy(struct io_stats *);
|
||||
void iostat_unbusy(struct io_stats *, long, int);
|
||||
struct io_stats *iostat_find(char *);
|
||||
struct io_stats *iostat_alloc(int32_t);
|
||||
struct io_stats *iostat_find(char *);
|
||||
struct io_stats *iostat_alloc(int32_t);
|
||||
void iostat_free(struct io_stats *);
|
||||
void iostat_seek(struct io_stats *);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user