Loading drivers/md/raid5.c +15 −7 Original line number Diff line number Diff line Loading @@ -3678,17 +3678,14 @@ static void raid5_unplug_device(struct request_queue *q) unplug_slaves(mddev); } static int raid5_congested(void *data, int bits) int md_raid5_congested(mddev_t *mddev, int bits) { mddev_t *mddev = data; raid5_conf_t *conf = mddev->private; /* No difference between reads and writes. Just check * how busy the stripe_cache is */ if (mddev_congested(mddev, bits)) return 1; if (conf->inactive_blocked) return 1; if (conf->quiesce) Loading @@ -3698,6 +3695,15 @@ static int raid5_congested(void *data, int bits) return 0; } EXPORT_SYMBOL_GPL(md_raid5_congested); static int raid5_congested(void *data, int bits) { mddev_t *mddev = data; return mddev_congested(mddev, bits) || md_raid5_congested(mddev, bits); } /* We want read requests to align with chunks where possible, * but write requests don't need to. Loading Loading @@ -5184,13 +5190,14 @@ static int run(mddev_t *mddev) mddev->queue->backing_dev_info.ra_pages = 2 * stripe; blk_queue_merge_bvec(mddev->queue, raid5_mergeable_bvec); mddev->queue->backing_dev_info.congested_data = mddev; mddev->queue->backing_dev_info.congested_fn = raid5_congested; } mddev->queue->queue_lock = &conf->device_lock; mddev->queue->unplug_fn = raid5_unplug_device; mddev->queue->backing_dev_info.congested_data = mddev; mddev->queue->backing_dev_info.congested_fn = raid5_congested; chunk_size = mddev->chunk_sectors << 9; blk_queue_io_min(mddev->queue, chunk_size); Loading Loading @@ -5220,6 +5227,7 @@ static int stop(mddev_t *mddev) md_unregister_thread(mddev->thread); mddev->thread = NULL; if (mddev->queue) mddev->queue->backing_dev_info.congested_fn = NULL; blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/ free_conf(conf); Loading drivers/md/raid5.h +2 −0 Original line number Diff line number Diff line Loading @@ -497,5 +497,7 @@ static inline int algorithm_is_DDF(int layout) { return layout >= 8 && layout <= 10; } extern int md_raid5_congested(mddev_t *mddev, int bits); extern int raid5_set_cache_size(mddev_t *mddev, int size); #endif Loading
drivers/md/raid5.c +15 −7 Original line number Diff line number Diff line Loading @@ -3678,17 +3678,14 @@ static void raid5_unplug_device(struct request_queue *q) unplug_slaves(mddev); } static int raid5_congested(void *data, int bits) int md_raid5_congested(mddev_t *mddev, int bits) { mddev_t *mddev = data; raid5_conf_t *conf = mddev->private; /* No difference between reads and writes. Just check * how busy the stripe_cache is */ if (mddev_congested(mddev, bits)) return 1; if (conf->inactive_blocked) return 1; if (conf->quiesce) Loading @@ -3698,6 +3695,15 @@ static int raid5_congested(void *data, int bits) return 0; } EXPORT_SYMBOL_GPL(md_raid5_congested); static int raid5_congested(void *data, int bits) { mddev_t *mddev = data; return mddev_congested(mddev, bits) || md_raid5_congested(mddev, bits); } /* We want read requests to align with chunks where possible, * but write requests don't need to. Loading Loading @@ -5184,13 +5190,14 @@ static int run(mddev_t *mddev) mddev->queue->backing_dev_info.ra_pages = 2 * stripe; blk_queue_merge_bvec(mddev->queue, raid5_mergeable_bvec); mddev->queue->backing_dev_info.congested_data = mddev; mddev->queue->backing_dev_info.congested_fn = raid5_congested; } mddev->queue->queue_lock = &conf->device_lock; mddev->queue->unplug_fn = raid5_unplug_device; mddev->queue->backing_dev_info.congested_data = mddev; mddev->queue->backing_dev_info.congested_fn = raid5_congested; chunk_size = mddev->chunk_sectors << 9; blk_queue_io_min(mddev->queue, chunk_size); Loading Loading @@ -5220,6 +5227,7 @@ static int stop(mddev_t *mddev) md_unregister_thread(mddev->thread); mddev->thread = NULL; if (mddev->queue) mddev->queue->backing_dev_info.congested_fn = NULL; blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/ free_conf(conf); Loading
drivers/md/raid5.h +2 −0 Original line number Diff line number Diff line Loading @@ -497,5 +497,7 @@ static inline int algorithm_is_DDF(int layout) { return layout >= 8 && layout <= 10; } extern int md_raid5_congested(mddev_t *mddev, int bits); extern int raid5_set_cache_size(mddev_t *mddev, int size); #endif