From: Mikulas Patocka <[email-masked]>

Allow the snapshot chunk size to be smaller than the page size
The code is now capable of handling this due to some previous
fixes and enhancements.

As the page size varies between computers, prior to this patch,
the chunk size of a snapshot dictated which machines could read it.

Signed-off-by: Mikulas Patocka <[email-masked]>
Reviewed-by: Mike Snitzer <[email-masked]>
Reviewed-by: Jonathan Brassow <[email-masked]>

---
 drivers/md/dm-exception-store.c |   16 ----------------
 1 file changed, 16 deletions(-)

Index: linux-2.6.31/drivers/md/dm-exception-store.c
===================================================================
--- linux-2.6.31.orig/drivers/md/dm-exception-store.c
+++ linux-2.6.31/drivers/md/dm-exception-store.c
@@ -138,16 +138,6 @@ int dm_exception_store_type_unregister(s
 }
 EXPORT_SYMBOL(dm_exception_store_type_unregister);
 
-/*
- * Round a number up to the nearest 'size' boundary.  size must
- * be a power of 2.
- */
-static ulong round_up(ulong n, ulong size)
-{
-	size--;
-	return (n + size) & ~size;
-}
-
 static int set_chunk_size(struct dm_exception_store *store,
 			  const char *chunk_size_arg, char **error)
 {
@@ -165,12 +155,6 @@ static int set_chunk_size(struct dm_exce
 		return 0;
 	}
 
-	/*
-	 * Chunk size must be multiple of page size.  Silently
-	 * round up if it's not.
-	 */
-	chunk_size_ulong = round_up(chunk_size_ulong, PAGE_SIZE >> 9);
-
 	return dm_exception_store_set_chunk_size(store, chunk_size_ulong,
 						 error);
 }