Merge tag 'md/4.1-rc4-fixes' of git://neil.brown.name/md
[firefly-linux-kernel-4.4.55.git] / drivers / md / raid5.h
index 6614ac5ffc0ef08e3411f9bf60b174b2c0b9762a..7dc0dd86074b1702276ccb51ba166a38d5d0f7e3 100644 (file)
@@ -433,6 +433,7 @@ struct r5conf {
        int                     max_degraded;
        int                     raid_disks;
        int                     max_nr_stripes;
+       int                     min_nr_stripes;
 
        /* reshape_progress is the leading edge of a 'reshape'
         * It has value MaxSector when no reshape is happening
@@ -509,9 +510,19 @@ struct r5conf {
        struct llist_head       released_stripes;
        wait_queue_head_t       wait_for_stripe;
        wait_queue_head_t       wait_for_overlap;
-       int                     inactive_blocked;       /* release of inactive stripes blocked,
-                                                        * waiting for 25% to be free
-                                                        */
+       unsigned long           cache_state;
+#define R5_INACTIVE_BLOCKED    1       /* release of inactive stripes blocked,
+                                        * waiting for 25% to be free
+                                        */
+#define R5_ALLOC_MORE          2       /* It might help to allocate another
+                                        * stripe.
+                                        */
+#define R5_DID_ALLOC           4       /* A stripe was allocated, don't allocate
+                                        * more until at least one has been
+                                        * released.  This avoids flooding
+                                        * the cache.
+                                        */
+       struct shrinker         shrinker;
        int                     pool_size; /* number of disks in stripeheads in pool */
        spinlock_t              device_lock;
        struct disk_info        *disks;
@@ -526,6 +537,7 @@ struct r5conf {
        int                     worker_cnt_per_group;
 };
 
+
 /*
  * Our supported algorithms
  */