]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/md/md.h
md: use mddev->lock to protect updates to resync_{min,max}.
[mirror_ubuntu-bionic-kernel.git] / drivers / md / md.h
index 03cec5bdcaae751378f8ac2ad5a470c60219d2c7..6bf3faa951ec8bceb3926f0286d7a92b062db8d5 100644 (file)
@@ -386,7 +386,18 @@ struct mddev {
 
        struct work_struct del_work;    /* used for delayed sysfs removal */
 
-       spinlock_t                      write_lock;
+       /* "lock" protects:
+        *   flush_bio transition from NULL to !NULL
+        *   rdev superblocks, events
+        *   clearing MD_CHANGE_*
+        *   in_sync - and related safemode and MD_CHANGE changes
+        *   pers (also protected by reconfig_mutex and pending IO).
+        *   clearing ->bitmap
+        *   clearing ->bitmap_info.file
+        *   changing ->resync_{min,max}
+        *   setting MD_RECOVERY_RUNNING (which interacts with resync_{min,max})
+        */
+       spinlock_t                      lock;
        wait_queue_head_t               sb_wait;        /* for waiting on superblock updates */
        atomic_t                        pending_writes; /* number of active superblock writes */
 
@@ -459,7 +470,7 @@ struct md_personality
        struct module *owner;
        void (*make_request)(struct mddev *mddev, struct bio *bio);
        int (*run)(struct mddev *mddev);
-       int (*stop)(struct mddev *mddev);
+       void (*free)(struct mddev *mddev, void *priv);
        void (*status)(struct seq_file *seq, struct mddev *mddev);
        /* error_handler must set ->faulty and clear ->in_sync
         * if appropriate, and should abort recovery if needed
@@ -490,6 +501,13 @@ struct md_personality
         * array.
         */
        void *(*takeover) (struct mddev *mddev);
+       /* congested implements bdi.congested_fn().
+        * Will not be called while array is 'suspended' */
+       int (*congested)(struct mddev *mddev, int bits);
+       /* mergeable_bvec is use to implement ->merge_bvec_fn */
+       int (*mergeable_bvec)(struct mddev *mddev,
+                             struct bvec_merge_data *bvm,
+                             struct bio_vec *biovec);
 };
 
 struct md_sysfs_entry {