diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-03-20 04:38:03 -0500 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-03-20 04:38:03 -0500 |
| commit | d378aca6ec708bfb24df5c47801b1f2399efc481 (patch) | |
| tree | 7535f96bf34314df071698d2e06054b8d5223ebb /drivers/md | |
| parent | abc71c46dc0a12ab7fddc18cfe4f4aa26808c79b (diff) | |
| parent | 7705a8792b0fc82fd7d4dd923724606bbfd9fb20 (diff) | |
Merge branch 'master'
Diffstat (limited to 'drivers/md')
| -rw-r--r-- | drivers/md/dm-stripe.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c index ab89278a56bf..697aacafb02a 100644 --- a/drivers/md/dm-stripe.c +++ b/drivers/md/dm-stripe.c | |||
| @@ -103,9 +103,15 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
| 103 | return -EINVAL; | 103 | return -EINVAL; |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | if (((uint32_t)ti->len) & (chunk_size - 1)) { | ||
| 107 | ti->error = "dm-stripe: Target length not divisible by " | ||
| 108 | "chunk size"; | ||
| 109 | return -EINVAL; | ||
| 110 | } | ||
| 111 | |||
| 106 | width = ti->len; | 112 | width = ti->len; |
| 107 | if (sector_div(width, stripes)) { | 113 | if (sector_div(width, stripes)) { |
| 108 | ti->error = "dm-stripe: Target length not divisable by " | 114 | ti->error = "dm-stripe: Target length not divisible by " |
| 109 | "number of stripes"; | 115 | "number of stripes"; |
| 110 | return -EINVAL; | 116 | return -EINVAL; |
| 111 | } | 117 | } |
