projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6
[cascardo/linux.git]
/
drivers
/
md
/
dm-exception-store.c
diff --git
a/drivers/md/dm-exception-store.c
b/drivers/md/dm-exception-store.c
index
2b7907b
..
0bdb201
100644
(file)
--- a/
drivers/md/dm-exception-store.c
+++ b/
drivers/md/dm-exception-store.c
@@
-173,7
+173,9
@@
int dm_exception_store_set_chunk_size(struct dm_exception_store *store,
/* Validate the chunk size against the device block size */
if (chunk_size %
/* Validate the chunk size against the device block size */
if (chunk_size %
- (bdev_logical_block_size(dm_snap_cow(store->snap)->bdev) >> 9)) {
+ (bdev_logical_block_size(dm_snap_cow(store->snap)->bdev) >> 9) ||
+ chunk_size %
+ (bdev_logical_block_size(dm_snap_origin(store->snap)->bdev) >> 9)) {
*error = "Chunk size is not a multiple of device blocksize";
return -EINVAL;
}
*error = "Chunk size is not a multiple of device blocksize";
return -EINVAL;
}