Revert "MD: fix lock contention for flush bios"
[sfrench/cifs-2.6.git] / drivers / md / md.h
index c52afb52c77608aa749a3aa8d79f87e268eba21e..2deb84fa93f98af2b60f428d470939812075ec3e 100644 (file)
@@ -252,19 +252,6 @@ enum mddev_sb_flags {
        MD_SB_NEED_REWRITE,     /* metadata write needs to be repeated */
 };
 
-#define NR_FLUSH_INFOS 8
-#define NR_FLUSH_BIOS 64
-struct flush_info {
-       struct bio                      *bio;
-       struct mddev                    *mddev;
-       struct work_struct              flush_work;
-       atomic_t                        flush_pending;
-};
-struct flush_bio {
-       struct flush_info *fi;
-       struct md_rdev *rdev;
-};
-
 struct mddev {
        void                            *private;
        struct md_personality           *pers;
@@ -470,8 +457,13 @@ struct mddev {
                                                   * metadata and bitmap writes
                                                   */
 
-       mempool_t                       *flush_pool;
-       mempool_t                       *flush_bio_pool;
+       /* Generic flush handling.
+        * The last to finish preflush schedules a worker to submit
+        * the rest of the request (without the REQ_PREFLUSH flag).
+        */
+       struct bio *flush_bio;
+       atomic_t flush_pending;
+       struct work_struct flush_work;
        struct work_struct event_work;  /* used by dm to report failure event */
        void (*sync_super)(struct mddev *mddev, struct md_rdev *rdev);
        struct md_cluster_info          *cluster_info;