diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/md/dm-stripe.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/md/dm-stripe.c')
-rw-r--r-- | drivers/md/dm-stripe.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c index e0efc1adcaff..e610725db766 100644 --- a/drivers/md/dm-stripe.c +++ b/drivers/md/dm-stripe.c | |||
@@ -80,8 +80,7 @@ static int get_stripe(struct dm_target *ti, struct stripe_c *sc, | |||
80 | if (sscanf(argv[1], "%llu", &start) != 1) | 80 | if (sscanf(argv[1], "%llu", &start) != 1) |
81 | return -EINVAL; | 81 | return -EINVAL; |
82 | 82 | ||
83 | if (dm_get_device(ti, argv[0], start, sc->stripe_width, | 83 | if (dm_get_device(ti, argv[0], dm_table_get_mode(ti->table), |
84 | dm_table_get_mode(ti->table), | ||
85 | &sc->stripe[stripe].dev)) | 84 | &sc->stripe[stripe].dev)) |
86 | return -ENXIO; | 85 | return -ENXIO; |
87 | 86 | ||
@@ -110,7 +109,7 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
110 | } | 109 | } |
111 | 110 | ||
112 | stripes = simple_strtoul(argv[0], &end, 10); | 111 | stripes = simple_strtoul(argv[0], &end, 10); |
113 | if (*end) { | 112 | if (!stripes || *end) { |
114 | ti->error = "Invalid stripe count"; | 113 | ti->error = "Invalid stripe count"; |
115 | return -EINVAL; | 114 | return -EINVAL; |
116 | } | 115 | } |