Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38123
b: refs/heads/master
c: f022b2f
h: refs/heads/master
i:
  38121: 97103bd
  38119: d6cace3
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Oct 3, 2006
1 parent f803080 commit 140d60d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0d12922823408b26f83b15cae4a4feff4bd22f28
refs/heads/master: f022b2fddd97795bc9333ffb6862eacfa95c6a95
21 changes: 21 additions & 0 deletions trunk/drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -2593,6 +2593,24 @@ static int raid5_issue_flush(request_queue_t *q, struct gendisk *disk,
return ret;
}

static int raid5_congested(void *data, int bits)
{
mddev_t *mddev = data;
raid5_conf_t *conf = mddev_to_conf(mddev);

/* No difference between reads and writes. Just check
* how busy the stripe_cache is
*/
if (conf->inactive_blocked)
return 1;
if (conf->quiesce)
return 1;
if (list_empty_careful(&conf->inactive_list))
return 1;

return 0;
}

static int make_request(request_queue_t *q, struct bio * bi)
{
mddev_t *mddev = q->queuedata;
Expand Down Expand Up @@ -3296,6 +3314,9 @@ static int run(mddev_t *mddev)

mddev->queue->unplug_fn = raid5_unplug_device;
mddev->queue->issue_flush_fn = raid5_issue_flush;
mddev->queue->backing_dev_info.congested_fn = raid5_congested;
mddev->queue->backing_dev_info.congested_data = mddev;

mddev->array_size = mddev->size * (conf->previous_raid_disks -
conf->max_degraded);

Expand Down

0 comments on commit 140d60d

Please sign in to comment.