]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.suse/md-raid-metadata-PAGE_SIZE.patch
Changed checkfs to auto reboot after correctable fsck fixes.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.suse / md-raid-metadata-PAGE_SIZE.patch
CommitLineData
00e5a55c
BS
1Subject: [Bug 429490] sles10 raid0 can not be started
2From: bugzilla_noreply@novell.com
3
4### Comment #4 from Neil Brown <nfbrown@novell.com> 2008-10-08 17:34:49 MDT ---
5The md code was written with the expectation that the chunk size would
6always be at least one page. This may not always be a strict requirement,
7but I guess that test protects against untested code.
8
9For raid4/5/6, the stripe-cache is stored as pages so a chunk size
10less than one page would certainly cause problems with the current code.
11
12For raid0, I think a smaller chunk size should work.
13The filesystem is always allowed to send down one-page requests, and
14if the chunk size is less than that page size, these requests will have
15to be split up, possibly multiple times. However I think the code will
16get this right - it has only actually be used for page-sized requests
17that are not page-aligned.
18
19You could try changing the test to
20
21 if (chunk_size < PAGE_SIZE && mddev->level != 0) {
22
23and see how that works.
24
25Signed-off-by: Olaf Hering <olh@suse.de>
26
27---
28 drivers/md/md.c | 5 +++++
29 1 file changed, 5 insertions(+)
30
31--- a/drivers/md/md.c
32+++ b/drivers/md/md.c
33@@ -3585,9 +3585,14 @@ static int do_md_run(mddev_t * mddev)
34 return -EINVAL;
35 }
36 if (chunk_size < PAGE_SIZE) {
37+ if (mddev->level) {
38 printk(KERN_ERR "too small chunk_size: %d < %ld\n",
39 chunk_size, PAGE_SIZE);
40 return -EINVAL;
41+ } else {
42+ printk(KERN_ERR "too small chunk_size: %d < %ld, but continuing anyway on raid0. Good luck!\n",
43+ chunk_size, PAGE_SIZE);
44+ }
45 }
46
47 /* devices must have minimum size of one chunk */