Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Linus Torvalds committed Jul 1, 2009
2 parents 55bcab4 + ea9df47 commit 9fcfc91
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions drivers/md/dm-exception-store.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/md/dm-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit 9fcfc91

Please sign in to comment.