git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
drivers
/
md
/
dm-stripe.c
diff --git
a/drivers/md/dm-stripe.c
b/drivers/md/dm-stripe.c
index
ab89278
..
08328a8
100644
(file)
--- a/
drivers/md/dm-stripe.c
+++ b/
drivers/md/dm-stripe.c
@@
-49,9
+49,9
@@
static inline struct stripe_c *alloc_context(unsigned int stripes)
static int get_stripe(struct dm_target *ti, struct stripe_c *sc,
unsigned int stripe, char **argv)
{
static int get_stripe(struct dm_target *ti, struct stripe_c *sc,
unsigned int stripe, char **argv)
{
-
sector_t
start;
+
unsigned long long
start;
- if (sscanf(argv[1],
SECTOR_FORMAT
, &start) != 1)
+ if (sscanf(argv[1],
"%llu"
, &start) != 1)
return -EINVAL;
if (dm_get_device(ti, argv[0], start, sc->stripe_width,
return -EINVAL;
if (dm_get_device(ti, argv[0], start, sc->stripe_width,
@@
-103,9
+103,15
@@
static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv)
return -EINVAL;
}
return -EINVAL;
}
+ if (ti->len & (chunk_size - 1)) {
+ ti->error = "dm-stripe: Target length not divisible by "
+ "chunk size";
+ return -EINVAL;
+ }
+
width = ti->len;
if (sector_div(width, stripes)) {
width = ti->len;
if (sector_div(width, stripes)) {
- ti->error = "dm-stripe: Target length not divis
a
ble by "
+ ti->error = "dm-stripe: Target length not divis
i
ble by "
"number of stripes";
return -EINVAL;
}
"number of stripes";
return -EINVAL;
}
@@
-195,10
+201,11
@@
static int stripe_status(struct dm_target *ti,
break;
case STATUSTYPE_TABLE:
break;
case STATUSTYPE_TABLE:
- DMEMIT("%d " SECTOR_FORMAT, sc->stripes, sc->chunk_mask + 1);
+ DMEMIT("%d %llu", sc->stripes,
+ (unsigned long long)sc->chunk_mask + 1);
for (i = 0; i < sc->stripes; i++)
for (i = 0; i < sc->stripes; i++)
- DMEMIT(" %s
" SECTOR_FORMAT
, sc->stripe[i].dev->name,
-
sc->stripe[i].physical_start);
+ DMEMIT(" %s
%llu"
, sc->stripe[i].dev->name,
+
(unsigned long long)
sc->stripe[i].physical_start);
break;
}
return 0;
break;
}
return 0;