Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157225
b: refs/heads/master
c: 2defcc3
h: refs/heads/master
i:
  157223: 41b8edb
v: v3
  • Loading branch information
Mikulas Patocka authored and Alasdair G Kergon committed Sep 4, 2009
1 parent 30d3c45 commit 7ff3502
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 61578dcd3fafe6babd72e8db32110cc0b630a432
refs/heads/master: 2defcc3fb4661e7351cb2ac48d843efc4c64db13
8 changes: 8 additions & 0 deletions trunk/drivers/md/dm-exception-store.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,14 @@ static int set_chunk_size(struct dm_exception_store *store,
*/
chunk_size_ulong = round_up(chunk_size_ulong, PAGE_SIZE >> 9);

return dm_exception_store_set_chunk_size(store, chunk_size_ulong,
error);
}

int dm_exception_store_set_chunk_size(struct dm_exception_store *store,
unsigned long chunk_size_ulong,
char **error)
{
/* Check chunk_size is a power of 2 */
if (!is_power_of_2(chunk_size_ulong)) {
*error = "Chunk size is not a power of 2";
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/md/dm-exception-store.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ static inline chunk_t sector_to_chunk(struct dm_exception_store *store,
int dm_exception_store_type_register(struct dm_exception_store_type *type);
int dm_exception_store_type_unregister(struct dm_exception_store_type *type);

int dm_exception_store_set_chunk_size(struct dm_exception_store *store,
unsigned long chunk_size_ulong,
char **error);

int dm_exception_store_create(struct dm_target *ti, int argc, char **argv,
unsigned *args_used,
struct dm_exception_store **store);
Expand Down

0 comments on commit 7ff3502

Please sign in to comment.