summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2009-09-25 08:44:51 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2009-09-25 08:44:51 +1000
commit4df6dc45f8b7bb4a31ec5044205490901de09329 (patch)
tree8c9294c561471083a67c8b80ae5c44ffb8563fc4 /drivers/md
parentb66259d3300cb8b792a06133d58a303c1684dca6 (diff)
dm-snapshot-allow-chunk-size-to-be-less-than-page-size
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 <mpatocka@redhat.com> Reviewed-by: Mike Snitzer <snitzer@redhat.com> Reviewed-by: Jonathan Brassow <jbrassow@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-exception-store.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/md/dm-exception-store.c b/drivers/md/dm-exception-store.c
index 556acff3952f..8f49f278b587 100644
--- a/drivers/md/dm-exception-store.c
+++ b/drivers/md/dm-exception-store.c
@@ -138,16 +138,6 @@ int dm_exception_store_type_unregister(struct dm_exception_store_type *type)
}
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_exception_store *store,
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);
}