diff options
| author | oster <oster@NetBSD.org> | 2009-03-23 18:38:54 +0000 |
|---|---|---|
| committer | oster <oster@NetBSD.org> | 2009-03-23 18:38:54 +0000 |
| commit | e021b3e6a76b5a384d31cc8a6392ea360a570d08 (patch) | |
| tree | 270e746e4ed76f41ba68247c0fd73b3e73b25c50 /sys/dev/raidframe/rf_diskqueue.h | |
| parent | bd1b77b03793cf6c5afb9a99d641d91560f4239b (diff) | |
Rework/simplify the disk queuing code. A bunch of this was still
holdovers from the simulator and would never be seen/used in-kernel.
Diffstat (limited to 'sys/dev/raidframe/rf_diskqueue.h')
| -rw-r--r-- | sys/dev/raidframe/rf_diskqueue.h | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/sys/dev/raidframe/rf_diskqueue.h b/sys/dev/raidframe/rf_diskqueue.h index 5e6c95ec7e8..ade4d4193e1 100644 --- a/sys/dev/raidframe/rf_diskqueue.h +++ b/sys/dev/raidframe/rf_diskqueue.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_diskqueue.h,v 1.22 2007/03/04 06:02:37 christos Exp $ */ +/* $NetBSD: rf_diskqueue.h,v 1.23 2009/03/23 18:38:54 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -82,8 +82,6 @@ struct RF_DiskQueueData_s { int error; /* Indicate if an error occurred on this I/O (1=yes, 0=no) */ }; -#define RF_LOCK_DISK_QUEUE 0x01 -#define RF_UNLOCK_DISK_QUEUE 0x02 /* note: "Create" returns type-specific queue header pointer cast to (void *) */ struct RF_DiskQueueSW_s { @@ -114,10 +112,6 @@ struct RF_DiskQueue_s { int curPriority; /* the priority of accs all that are currently * outstanding */ long queueLength; /* number of requests in queue */ - RF_DiskQueueData_t *nextLockingOp; /* a locking op that has - * arrived at the head of the - * queue & is waiting for - * drainage */ RF_DiskQueueFlags_t flags; /* terminate, locked */ RF_Raid_t *raidPtr; /* associated array */ dev_t dev; /* device number for kernel version */ @@ -130,19 +124,12 @@ struct RF_DiskQueue_s { * explicitly unlocked */ /* macros setting & returning information about queues and requests */ -#define RF_QUEUE_LOCKED(_q) ((_q)->flags & RF_DQ_LOCKED) -#define RF_QUEUE_EMPTY(_q) (((_q)->numOutstanding == 0) && ((_q)->nextLockingOp == NULL) && !RF_QUEUE_LOCKED(_q)) +#define RF_QUEUE_EMPTY(_q) ((_q)->numOutstanding == 0) #define RF_QUEUE_FULL(_q) ((_q)->numOutstanding == (_q)->maxOutstanding) -#define RF_LOCK_QUEUE(_q) (_q)->flags |= RF_DQ_LOCKED -#define RF_UNLOCK_QUEUE(_q) (_q)->flags &= ~RF_DQ_LOCKED - #define RF_LOCK_QUEUE_MUTEX(_q_,_wh_) RF_LOCK_MUTEX((_q_)->mutex) #define RF_UNLOCK_QUEUE_MUTEX(_q_,_wh_) RF_UNLOCK_MUTEX((_q_)->mutex) -#define RF_LOCKING_REQ(_r) ((_r)->flags & RF_LOCK_DISK_QUEUE) -#define RF_UNLOCKING_REQ(_r) ((_r)->flags & RF_UNLOCK_DISK_QUEUE) - /* whether it is ok to dispatch a regular request */ #define RF_OK_TO_DISPATCH(_q_,_r_) \ (RF_QUEUE_EMPTY(_q_) || \ |
