aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-snap.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2009-10-16 18:18:17 -0400
committerAlasdair G Kergon <agk@redhat.com>2009-10-16 18:18:17 -0400
commitdf96eee679ba28c98cf722fa7c9f4286ee1ed0bd (patch)
tree282c1368f3dff6ed0e0994210cc13c09b4680d66 /drivers/md/dm-snap.c
parent4c6fff445d7aa753957856278d4d93bcad6e2c14 (diff)
dm snapshot: use unsigned integer chunk size
Use unsigned integer chunk size. Maximum chunk size is 512kB, there won't ever be need to use 4GB chunk size, so the number can be 32-bit. This fixes compiler failure on 32-bit systems with large block devices. Cc: stable@kernel.org Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Reviewed-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-snap.c')
-rw-r--r--drivers/md/dm-snap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index 9bc814aa2bbd..3a3ba46e6d4b 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -961,7 +961,7 @@ static void start_copy(struct dm_snap_pending_exception *pe)
961 961
962 src.bdev = bdev; 962 src.bdev = bdev;
963 src.sector = chunk_to_sector(s->store, pe->e.old_chunk); 963 src.sector = chunk_to_sector(s->store, pe->e.old_chunk);
964 src.count = min(s->store->chunk_size, dev_size - src.sector); 964 src.count = min((sector_t)s->store->chunk_size, dev_size - src.sector);
965 965
966 dest.bdev = s->store->cow->bdev; 966 dest.bdev = s->store->cow->bdev;
967 dest.sector = chunk_to_sector(s->store, pe->e.new_chunk); 967 dest.sector = chunk_to_sector(s->store, pe->e.new_chunk);
@@ -1402,7 +1402,7 @@ static void origin_resume(struct dm_target *ti)
1402 struct dm_dev *dev = ti->private; 1402 struct dm_dev *dev = ti->private;
1403 struct dm_snapshot *snap; 1403 struct dm_snapshot *snap;
1404 struct origin *o; 1404 struct origin *o;
1405 chunk_t chunk_size = 0; 1405 unsigned chunk_size = 0;
1406 1406
1407 down_read(&_origins_lock); 1407 down_read(&_origins_lock);
1408 o = __lookup_origin(dev->bdev); 1408 o = __lookup_origin(dev->bdev);