summaryrefslogtreecommitdiff
path: root/include/linux/raid
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 20:09:44 -0800
committerLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 20:09:44 -0800
commita67f1b5da2cf8b14395596048c876247b894aa5c (patch)
tree0f125e709fddc4d32579fb267ede0f9c8079ff11 /include/linux/raid
parente9e7d7fa16122d7bfa6f87188828baf6080cb02e (diff)
v2.4.8 -> v2.4.8.1
- Rui Sousa: emu10k1 module fixes, remove joystick part. - Alan Cox: driver merges - Andrea Arkangeli: alpha updates - David Woodhouse: up_and_exit -> complete_and_exit - David Miller: sparc and network update - Andrew Morton: update 3c59x driver - Neil Brown: NFS export VFAT, knfsd cleanups, raid fixes - Ben Collins: ieee1394 updates - Paul Mackerras: PPC update - me: make sure we don't lose position bits in "filldir()"
Diffstat (limited to 'include/linux/raid')
-rw-r--r--include/linux/raid/md.h1
-rw-r--r--include/linux/raid/md_k.h27
-rw-r--r--include/linux/raid/raid1.h3
3 files changed, 30 insertions, 1 deletions
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h
index 5cd20c6fcc1b..d18f20205636 100644
--- a/include/linux/raid/md.h
+++ b/include/linux/raid/md.h
@@ -36,6 +36,7 @@
#include <linux/locks.h>
#include <linux/kernel_stat.h>
#include <asm/io.h>
+#include <linux/completion.h>
#include <linux/raid/md_compatible.h>
/*
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index 8b6c3d7c0060..3b51e92fe555 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -323,7 +323,7 @@ typedef struct mdk_thread_s {
void *data;
md_wait_queue_head_t wqueue;
unsigned long flags;
- struct semaphore *sem;
+ struct completion *event;
struct task_struct *tsk;
const char *name;
} mdk_thread_t;
@@ -366,5 +366,30 @@ do { \
__wait_event_lock_irq(wq, condition, lock); \
} while (0)
+
+#define __wait_disk_event(wq, condition) \
+do { \
+ wait_queue_t __wait; \
+ init_waitqueue_entry(&__wait, current); \
+ \
+ add_wait_queue(&wq, &__wait); \
+ for (;;) { \
+ set_current_state(TASK_UNINTERRUPTIBLE); \
+ if (condition) \
+ break; \
+ run_task_queue(&tq_disk); \
+ schedule(); \
+ } \
+ current->state = TASK_RUNNING; \
+ remove_wait_queue(&wq, &__wait); \
+} while (0)
+
+#define wait_disk_event(wq, condition) \
+do { \
+ if (condition) \
+ break; \
+ __wait_disk_event(wq, condition); \
+} while (0)
+
#endif
diff --git a/include/linux/raid/raid1.h b/include/linux/raid/raid1.h
index a9a9d3e8edb8..40675b40ca0f 100644
--- a/include/linux/raid/raid1.h
+++ b/include/linux/raid/raid1.h
@@ -42,7 +42,10 @@ struct raid1_private_data {
*/
struct buffer_head *freebh;
int freebh_cnt; /* how many are on the list */
+ int freebh_blocked;
struct raid1_bh *freer1;
+ int freer1_blocked;
+ int freer1_cnt;
struct raid1_bh *freebuf; /* each bh_req has a page allocated */
md_wait_queue_head_t wait_buffer;