Changed uint32_t to chunk_t, so that there is no 32-bit limitation on systems with 64-bit sector numbers. chunk_t is 64-bit only if the architecture is 64-bit or if the user explicitly enabled large devices in kernel config, so there will be no performance or code-size penalty for normal uses. Signed-off-by: Mikulas Patocka --- drivers/md/dm-exception-store.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) Index: linux-2.6.26-fast/drivers/md/dm-exception-store.c =================================================================== --- linux-2.6.26-fast.orig/drivers/md/dm-exception-store.c 2008-07-16 22:58:19.000000000 +0200 +++ linux-2.6.26-fast/drivers/md/dm-exception-store.c 2008-07-16 23:03:58.000000000 +0200 @@ -108,12 +108,12 @@ struct pstore { * Used to keep track of which metadata area the data in * 'chunk' refers to. */ - uint32_t current_area; + chunk_t current_area; /* * The next free chunk for an exception. */ - uint32_t next_free; + chunk_t next_free; /* * The index of next free exception in the current @@ -175,7 +175,7 @@ static void do_metadata(struct work_stru /* * Read or write a chunk aligned and sized block of data from a device. */ -static int chunk_io(struct pstore *ps, uint32_t chunk, int rw, int metadata) +static int chunk_io(struct pstore *ps, chunk_t chunk, int rw, int metadata) { struct dm_io_region where = { .bdev = ps->snap->cow->bdev, @@ -212,10 +212,10 @@ static int chunk_io(struct pstore *ps, u * Read or write a metadata area. Remembering to skip the first * chunk which holds the header. */ -static int area_io(struct pstore *ps, uint32_t area, int rw) +static int area_io(struct pstore *ps, chunk_t area, int rw) { int r; - uint32_t chunk; + chunk_t chunk; /* convert a metadata area index to a chunk index */ chunk = 1 + ((ps->exceptions_per_area + 1) * area); @@ -228,7 +228,7 @@ static int area_io(struct pstore *ps, ui return 0; } -static int zero_area(struct pstore *ps, uint32_t area) +static int zero_area(struct pstore *ps, chunk_t area) { memset(ps->area, 0, ps->snap->chunk_size << SECTOR_SHIFT); return area_io(ps, area, WRITE); @@ -407,7 +407,7 @@ static int insert_exceptions(struct psto static int read_exceptions(struct pstore *ps) { - uint32_t area; + chunk_t area; int r, full = 1; /*