Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm
* git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm: dm table: fix blk_stack_limits arg to use bytes not sectors dm exception store: really fix type lookup
This commit is contained in:
commit
9fcfc91bda
2 changed files with 7 additions and 4 deletions
|
@ -195,7 +195,7 @@ int dm_exception_store_create(struct dm_target *ti, int argc, char **argv,
|
|||
struct dm_exception_store **store)
|
||||
{
|
||||
int r = 0;
|
||||
struct dm_exception_store_type *type;
|
||||
struct dm_exception_store_type *type = NULL;
|
||||
struct dm_exception_store *tmp_store;
|
||||
char persistent;
|
||||
|
||||
|
@ -211,12 +211,15 @@ int dm_exception_store_create(struct dm_target *ti, int argc, char **argv,
|
|||
}
|
||||
|
||||
persistent = toupper(*argv[1]);
|
||||
if (persistent != 'P' && persistent != 'N') {
|
||||
if (persistent == 'P')
|
||||
type = get_type("P");
|
||||
else if (persistent == 'N')
|
||||
type = get_type("N");
|
||||
else {
|
||||
ti->error = "Persistent flag is not P or N";
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
type = get_type(&persistent);
|
||||
if (!type) {
|
||||
ti->error = "Exception store type not recognised";
|
||||
r = -EINVAL;
|
||||
|
|
|
@ -495,7 +495,7 @@ int dm_set_device_limits(struct dm_target *ti, struct dm_dev *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (blk_stack_limits(limits, &q->limits, start) < 0)
|
||||
if (blk_stack_limits(limits, &q->limits, start << 9) < 0)
|
||||
DMWARN("%s: target device %s is misaligned",
|
||||
dm_device_name(ti->table->md), bdevname(bdev, b));
|
||||
|
||||
|
|
Loading…
Reference in a new issue