Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
[firefly-linux-kernel-4.4.55.git] / drivers / md / md.h
index af443ab868db910f2db2d35d53ffacca701f1e60..eca59c3074ef65bee75301f92411d9968adbaf9d 100644 (file)
@@ -307,6 +307,7 @@ struct mddev {
         * REQUEST:  user-space has requested a sync (used with SYNC)
         * CHECK:    user-space request for check-only, no repair
         * RESHAPE:  A reshape is happening
+        * ERROR:    sync-action interrupted because io-error
         *
         * If neither SYNC or RESHAPE are set, then it is a recovery.
         */
@@ -320,6 +321,7 @@ struct mddev {
 #define        MD_RECOVERY_CHECK       7
 #define MD_RECOVERY_RESHAPE    8
 #define        MD_RECOVERY_FROZEN      9
+#define        MD_RECOVERY_ERROR       10
 
        unsigned long                   recovery;
        /* If a RAID personality determines that recovery (of a particular
@@ -551,32 +553,6 @@ struct md_thread {
 
 #define THREAD_WAKEUP  0
 
-#define __wait_event_lock_irq(wq, condition, lock, cmd)                \
-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);                                 \
-               cmd;                                                    \
-               schedule();                                             \
-               spin_lock_irq(&lock);                                   \
-       }                                                               \
-       current->state = TASK_RUNNING;                                  \
-       remove_wait_queue(&wq, &__wait);                                \
-} while (0)
-
-#define wait_event_lock_irq(wq, condition, lock, cmd)                  \
-do {                                                                   \
-       if (condition)                                                  \
-               break;                                                  \
-       __wait_event_lock_irq(wq, condition, lock, cmd);                \
-} while (0)
-
 static inline void safe_put_page(struct page *p)
 {
        if (p) put_page(p);