diff options
author | NeilBrown <neilb@suse.de> | 2009-09-23 04:10:29 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-09-23 04:10:29 -0400 |
commit | 3fa841d7e7266f6fcc1b3885b905f5153ba897d8 (patch) | |
tree | 7afa971a10eddcf52787340ea43fa1e910b5805b /drivers/md/md.c | |
parent | 0da3c6194ec2f32617b272df4505a1cf022faea5 (diff) |
md: report device as congested when suspended
This should writeback from coming when the device is temporarily
suspended.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index a3dd3c8ea681..26ba42a79129 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -262,6 +262,12 @@ static void mddev_resume(mddev_t *mddev) | |||
262 | mddev->pers->quiesce(mddev, 0); | 262 | mddev->pers->quiesce(mddev, 0); |
263 | } | 263 | } |
264 | 264 | ||
265 | int mddev_congested(mddev_t *mddev, int bits) | ||
266 | { | ||
267 | return mddev->suspended; | ||
268 | } | ||
269 | EXPORT_SYMBOL(mddev_congested); | ||
270 | |||
265 | 271 | ||
266 | static inline mddev_t *mddev_get(mddev_t *mddev) | 272 | static inline mddev_t *mddev_get(mddev_t *mddev) |
267 | { | 273 | { |