Skip to content

Commit

Permalink
dm stripe: remove minimum stripe size
Browse files Browse the repository at this point in the history
There is no technical limitation in device mapper that would prevent the
dm-stripe target from using a stripe size smaller than page size.

This patch removes the limit and makes stripe volumes portable across
architectures with different page size.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
  • Loading branch information
Mikulas Patocka authored and Alasdair G Kergon committed Jul 27, 2012
1 parent eb850de commit 8f069b4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/md/dm-stripe.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv)
return -EINVAL;
}

if (kstrtouint(argv[1], 10, &chunk_size) ||
(chunk_size < (PAGE_SIZE >> SECTOR_SHIFT))) {
if (kstrtouint(argv[1], 10, &chunk_size) || !chunk_size) {
ti->error = "Invalid chunk_size";
return -EINVAL;
}
Expand Down

0 comments on commit 8f069b4

Please sign in to comment.