diff options
author | Steve French <sfrench@us.ibm.com> | 2006-03-20 11:58:09 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-03-20 11:58:09 -0500 |
commit | fd4a0b92db6a57cba8d03efbe1cebf91f9124ce0 (patch) | |
tree | 5886a08bfa1132058b06074f4666a36dc5ddd2a1 /drivers/md/dm-stripe.c | |
parent | 88274815f7477dc7550439413ab87c5ce4c5a623 (diff) | |
parent | 7705a8792b0fc82fd7d4dd923724606bbfd9fb20 (diff) |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'drivers/md/dm-stripe.c')
-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 | } |