patch-2.3.99-pre8 linux/include/linux/raid/md_k.h
Next file: linux/include/linux/raid/raid1.h
Previous file: linux/include/linux/raid/md.h
Back to the patch index
Back to the overall index
- Lines: 94
- Date:
Fri May 12 11:36:30 2000
- Orig file:
v2.3.99-pre7/linux/include/linux/raid/md_k.h
- Orig date:
Sat Feb 26 22:32:07 2000
diff -u --recursive --new-file v2.3.99-pre7/linux/include/linux/raid/md_k.h linux/include/linux/raid/md_k.h
@@ -162,7 +162,7 @@
kdev_t dev; /* Device number */
kdev_t old_dev; /* "" when it was last imported */
- int size; /* Device size (in blocks) */
+ unsigned long size; /* Device size (in blocks) */
mddev_t *mddev; /* RAID array if running */
unsigned long last_events; /* IO event timestamp */
@@ -170,7 +170,7 @@
struct file filp; /* Lock file */
mdp_super_t *sb;
- int sb_offset;
+ unsigned long sb_offset;
int faulty; /* if faulty do not issue IO requests */
int desc_nr; /* descriptor index in the superblock */
@@ -199,13 +199,17 @@
int sb_dirty;
mdu_param_t param;
int ro;
- unsigned int curr_resync;
+ unsigned long curr_resync;
unsigned long resync_start;
char *name;
int recovery_running;
struct semaphore reconfig_sem;
struct semaphore recovery_sem;
struct semaphore resync_sem;
+
+ atomic_t recovery_active;
+ md_wait_queue_head_t recovery_wait;
+
struct md_list_head all_mddevs;
request_queue_t queue;
};
@@ -213,15 +217,11 @@
struct mdk_personality_s
{
char *name;
- int (*map)(mddev_t *mddev, kdev_t dev, kdev_t *rdev,
- unsigned long *rsector, unsigned long size);
int (*make_request)(request_queue_t *q, mddev_t *mddev, int rw, struct buffer_head * bh);
void (*end_request)(struct buffer_head * bh, int uptodate);
int (*run)(mddev_t *mddev);
int (*stop)(mddev_t *mddev);
int (*status)(char *page, mddev_t *mddev);
- int (*ioctl)(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg);
int max_invalid_dev;
int (*error_handler)(mddev_t *mddev, kdev_t dev);
@@ -239,6 +239,7 @@
int (*stop_resync)(mddev_t *mddev);
int (*restart_resync)(mddev_t *mddev);
+ int (*sync_request)(mddev_t *mddev, unsigned long block_nr);
};
@@ -338,6 +339,32 @@
kdev_t dev;
char name [MAX_DISKNAME_LEN];
} dev_name_t;
+
+
+#define __wait_event_lock_irq(wq, condition, lock) \
+do { \
+ wait_queue_t __wait; \
+ init_waitqueue_entry(&__wait, current); \
+ \
+ add_wait_queue(&wq, &__wait); \
+ for (;;) { \
+ set_current_state(TASK_UNINTERRUPTIBLE); \
+ if (condition) \
+ break; \
+ spin_unlock_irq(&lock); \
+ schedule(); \
+ spin_lock_irq(&lock); \
+ } \
+ current->state = TASK_RUNNING; \
+ remove_wait_queue(&wq, &__wait); \
+} while (0)
+
+#define wait_event_lock_irq(wq, condition, lock) \
+do { \
+ if (condition) \
+ break; \
+ __wait_event_lock_irq(wq, condition, lock); \
+} while (0)
#endif _MD_K_H
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)