FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 06-18-2012, 01:23 PM
Mikulas Patocka
 
Default dm-stripe: remove minimum stripe size

dm-stripe: remove minimum stripe size

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.

The patch also makes it reject stripe sizes that do not fit to 32 bits.
(previously the upper bits were truncated)

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

---
drivers/md/dm-stripe.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-3.4.2-fast/drivers/md/dm-stripe.c
================================================== =================
--- linux-3.4.2-fast.orig/drivers/md/dm-stripe.c 2012-06-18 14:52:22.000000000 +0200
+++ linux-3.4.2-fast/drivers/md/dm-stripe.c 2012-06-18 15:07:39.000000000 +0200
@@ -96,7 +96,7 @@ static int stripe_ctr(struct dm_target *
struct stripe_c *sc;
sector_t width;
uint32_t stripes;
- uint32_t chunk_size;
+ unsigned long chunk_size;
char *end;
int r;
unsigned int i;
@@ -113,7 +113,7 @@ static int stripe_ctr(struct dm_target *
}

chunk_size = simple_strtoul(argv[1], &end, 10);
- if (*end || (chunk_size < (PAGE_SIZE >> SECTOR_SHIFT))) {
+ if (*end || !chunk_size || chunk_size != (uint32_t)chunk_size) {
ti->error = "Invalid chunk_size";
return -EINVAL;
}

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 06:56 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org