]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/raid/md_k.h
[PATCH] md: support write-mostly device in raid1
[karo-tx-linux.git] / include / linux / raid / md_k.h
index 8c14ba565a45b95093b0a65e113bda2898f1d358..7ef78e15ce04afe100935bfcdd588cff1f7ffa88 100644 (file)
@@ -181,6 +181,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
@@ -278,6 +281,10 @@ struct mddev_s
                                                        * 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 +321,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);
 };