summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2003-01-05 03:45:55 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2003-01-05 03:45:55 -0800
commit2aa8095221ad707bec9e41e2d1c8faf9e25a98cc (patch)
treef27a570ed292af7db83ddeae7d33a987c1422267
parentfb6b2f61d466367602aadb2e4abe5995451dd96d (diff)
[PATCH] md: Make MD device-is-idle test check whole device, not partition.
When resyncing an array, md will back off if it detects other activity on the device. This used to be based on the whole device, not the partition, but recent changes made it only check IO on the partition. This patch causes all sync_io accounting to be done on the whole device (bdev->bd_contains).
-rw-r--r--drivers/md/md.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index e5dbad89fa6b..8dbe3d5ed72d 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -2742,7 +2742,7 @@ int unregister_md_personality(int pnum)
void md_sync_acct(mdk_rdev_t *rdev, unsigned long nr_sectors)
{
- rdev->bdev->bd_disk->sync_io += nr_sectors;
+ rdev->bdev->bd_contains->bd_disk->sync_io += nr_sectors;
}
static int is_mddev_idle(mddev_t *mddev)
@@ -2754,7 +2754,7 @@ static int is_mddev_idle(mddev_t *mddev)
idle = 1;
ITERATE_RDEV(mddev,rdev,tmp) {
- struct gendisk *disk = rdev->bdev->bd_disk;
+ struct gendisk *disk = rdev->bdev->bd_contains->bd_disk;
curr_events = disk->read_sectors + disk->write_sectors - disk->sync_io;
if ((curr_events - rdev->last_events) > 32) {
rdev->last_events = curr_events;