]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.fixes/md-raid1-chunksize
Reenabled linux-xen and xen-image build
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.fixes / md-raid1-chunksize
CommitLineData
00e5a55c
BS
1From: NeilBrown <neilb@suse.de>
2Subject: Don't fail to start a RAID1 with a small chunksize
3Patch-mainline: no
4References: 459557
5
6For a RAID1 array, chunksize is almost meaningless (it is used to
7round down the device size to a multiple of chunksize, but that is
8largely of historical interest).
9However it is possible to set the chunksize, and it is possible to
10set it to be less than PAGE_SIZE. This currently causes the
11array to fail to start. However there is no good reason for that.
12And YaST seems to create RAID1 arrays with a 4K chunks which breaks
13on PPC-64 machines with 64K pages.
14
15So ignore the "chunk_size < PAGE_SIZE" check on RAID1 like we do
16for RAID0
17
18Signed-off-by: Neil Brown <neilb@suse.de>
19
20---
21 drivers/md/md.c | 6 +++---
22 1 file changed, 3 insertions(+), 3 deletions(-)
23
24--- a/drivers/md/md.c
25+++ b/drivers/md/md.c
26@@ -3585,13 +3585,13 @@ static int do_md_run(mddev_t * mddev)
27 return -EINVAL;
28 }
29 if (chunk_size < PAGE_SIZE) {
30- if (mddev->level) {
31+ if (mddev->level != 0 && mddev->level != 1) {
32 printk(KERN_ERR "too small chunk_size: %d < %ld\n",
33 chunk_size, PAGE_SIZE);
34 return -EINVAL;
35 } else {
36- printk(KERN_ERR "too small chunk_size: %d < %ld, but continuing anyway on raid0. Good luck!\n",
37- chunk_size, PAGE_SIZE);
38+ printk(KERN_ERR "too small chunk_size: %d < %ld, but continuing anyway on raid%d. Good luck!\n",
39+ chunk_size, PAGE_SIZE, mddev->level);
40 }
41 }
42