[PATCH] md: remove old cruft from md_k.h header file
[pandora-kernel.git] / include / linux / raid / md_k.h
index 8c14ba5..8042f55 100644 (file)
@@ -85,70 +85,6 @@ typedef struct mdk_rdev_s mdk_rdev_t;
 
 #define MAX_CHUNK_SIZE (4096*1024)
 
-/*
- * default readahead
- */
-
-static inline int disk_faulty(mdp_disk_t * d)
-{
-       return d->state & (1 << MD_DISK_FAULTY);
-}
-
-static inline int disk_active(mdp_disk_t * d)
-{
-       return d->state & (1 << MD_DISK_ACTIVE);
-}
-
-static inline int disk_sync(mdp_disk_t * d)
-{
-       return d->state & (1 << MD_DISK_SYNC);
-}
-
-static inline int disk_spare(mdp_disk_t * d)
-{
-       return !disk_sync(d) && !disk_active(d) && !disk_faulty(d);
-}
-
-static inline int disk_removed(mdp_disk_t * d)
-{
-       return d->state & (1 << MD_DISK_REMOVED);
-}
-
-static inline void mark_disk_faulty(mdp_disk_t * d)
-{
-       d->state |= (1 << MD_DISK_FAULTY);
-}
-
-static inline void mark_disk_active(mdp_disk_t * d)
-{
-       d->state |= (1 << MD_DISK_ACTIVE);
-}
-
-static inline void mark_disk_sync(mdp_disk_t * d)
-{
-       d->state |= (1 << MD_DISK_SYNC);
-}
-
-static inline void mark_disk_spare(mdp_disk_t * d)
-{
-       d->state = 0;
-}
-
-static inline void mark_disk_removed(mdp_disk_t * d)
-{
-       d->state = (1 << MD_DISK_FAULTY) | (1 << MD_DISK_REMOVED);
-}
-
-static inline void mark_disk_inactive(mdp_disk_t * d)
-{
-       d->state &= ~(1 << MD_DISK_ACTIVE);
-}
-
-static inline void mark_disk_nonsync(mdp_disk_t * d)
-{
-       d->state &= ~(1 << MD_DISK_SYNC);
-}
-
 /*
  * MD's 'extended' device
  */
@@ -181,6 +117,9 @@ struct mdk_rdev_s
        int faulty;                     /* if faulty do not issue IO requests */
        int in_sync;                    /* device is a full member of the array */
 
+       unsigned long   flags;          /* Should include faulty and in_sync here. */
+#define        WriteMostly     4               /* Avoid reading if at all possible */
+
        int desc_nr;                    /* descriptor index in the superblock */
        int raid_disk;                  /* role of device in array */
        int saved_raid_disk;            /* role that device used to have in the
@@ -272,12 +211,19 @@ struct mddev_s
        atomic_t                        writes_pending; 
        request_queue_t                 *queue; /* for plugging ... */
 
+       atomic_t                        write_behind; /* outstanding async IO */
+       unsigned int                    max_write_behind; /* 0 = sync */
+
        struct bitmap                   *bitmap; /* the bitmap for the device */
        struct file                     *bitmap_file; /* the bitmap file */
        long                            bitmap_offset; /* offset from superblock of
                                                        * start of bitmap. May be
                                                        * negative, but not '0'
                                                        */
+       long                            default_bitmap_offset; /* this is the offset to use when
+                                                               * hot-adding a bitmap.  It should
+                                                               * eventually be settable by sysfs.
+                                                               */
 
        struct list_head                all_mddevs;
 };
@@ -314,6 +260,12 @@ struct mdk_personality_s
        int (*resize) (mddev_t *mddev, sector_t sectors);
        int (*reshape) (mddev_t *mddev, int raid_disks);
        int (*reconfig) (mddev_t *mddev, int layout, int chunk_size);
+       /* quiesce moves between quiescence states
+        * 0 - fully active
+        * 1 - no new requests allowed
+        * others - reserved
+        */
+       void (*quiesce) (mddev_t *mddev, int state);
 };