diff options
author | NeilBrown <neilb@suse.de> | 2010-10-18 19:03:39 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-10-28 02:32:26 -0400 |
commit | 57dab0bdf689d42972975ec646d862b0900a4bf3 (patch) | |
tree | d136f69b8a68850e40844397ebaffde31787c988 /drivers/md/raid1.c | |
parent | 4b532c9b8c87eb8e51605c4d08dfb5139c758dc5 (diff) |
md: use sector_t in bitmap_get_counter
bitmap_get_counter returns the number of sectors covered
by the counter in a pass-by-reference variable.
In some cases this can be very large, so make it a sector_t
for safety.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 378a25894c57..a4b85a947532 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -1245,7 +1245,7 @@ static void end_sync_write(struct bio *bio, int error) | |||
1245 | break; | 1245 | break; |
1246 | } | 1246 | } |
1247 | if (!uptodate) { | 1247 | if (!uptodate) { |
1248 | int sync_blocks = 0; | 1248 | sector_t sync_blocks = 0; |
1249 | sector_t s = r1_bio->sector; | 1249 | sector_t s = r1_bio->sector; |
1250 | long sectors_to_go = r1_bio->sectors; | 1250 | long sectors_to_go = r1_bio->sectors; |
1251 | /* make sure these bits doesn't get cleared. */ | 1251 | /* make sure these bits doesn't get cleared. */ |
@@ -1705,7 +1705,7 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i | |||
1705 | int i; | 1705 | int i; |
1706 | int wonly = -1; | 1706 | int wonly = -1; |
1707 | int write_targets = 0, read_targets = 0; | 1707 | int write_targets = 0, read_targets = 0; |
1708 | int sync_blocks; | 1708 | sector_t sync_blocks; |
1709 | int still_degraded = 0; | 1709 | int still_degraded = 0; |
1710 | 1710 | ||
1711 | if (!conf->r1buf_pool) | 1711 | if (!conf->r1buf_pool) |