bcache: avoid oversize memory allocation by small stripe_size
[platform/kernel/linux-starfive.git] / drivers / md / bcache / bcache.h
index 5a79bb3..83eb7f2 100644 (file)
@@ -265,6 +265,7 @@ struct bcache_device {
 #define BCACHE_DEV_WB_RUNNING          3
 #define BCACHE_DEV_RATE_DW_RUNNING     4
        int                     nr_stripes;
+#define BCH_MIN_STRIPE_SZ              ((4 << 20) >> SECTOR_SHIFT)
        unsigned int            stripe_size;
        atomic_t                *stripe_sectors_dirty;
        unsigned long           *full_dirty_stripes;