diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2009-10-16 23:18:17 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2009-10-16 23:18:17 +0100 |
commit | df96eee679ba28c98cf722fa7c9f4286ee1ed0bd (patch) | |
tree | 282c1368f3dff6ed0e0994210cc13c09b4680d66 /drivers/md/dm-snap.c | |
parent | 4c6fff445d7aa753957856278d4d93bcad6e2c14 (diff) | |
download | op-kernel-dev-df96eee679ba28c98cf722fa7c9f4286ee1ed0bd.zip op-kernel-dev-df96eee679ba28c98cf722fa7c9f4286ee1ed0bd.tar.gz |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index 9bc814a..3a3ba46 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) src.bdev = bdev; src.sector = chunk_to_sector(s->store, pe->e.old_chunk); - src.count = min(s->store->chunk_size, dev_size - src.sector); + src.count = min((sector_t)s->store->chunk_size, dev_size - src.sector); dest.bdev = s->store->cow->bdev; dest.sector = chunk_to_sector(s->store, pe->e.new_chunk); @@ -1402,7 +1402,7 @@ static void origin_resume(struct dm_target *ti) struct dm_dev *dev = ti->private; struct dm_snapshot *snap; struct origin *o; - chunk_t chunk_size = 0; + unsigned chunk_size = 0; down_read(&_origins_lock); o = __lookup_origin(dev->bdev); |