lkml.org 
[lkml]   [2000]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] md.c fix

fixes a md.c compile bug and two warnings, intoduced in pre6-test7.

Ingo
--- linux/drivers/block/md.c.orig2 Tue Aug 22 14:44:20 2000
+++ linux/drivers/block/md.c Tue Aug 22 14:46:04 2000
@@ -1520,21 +1520,21 @@
md_size[mdidx(mddev)] = sb->size * data_disks;

readahead = MD_READAHEAD;
- if ((sb->level == 0) || (sb->level == 4) || (sb->level == 5))
+ if ((sb->level == 0) || (sb->level == 4) || (sb->level == 5)) {
readahead = (mddev->sb->chunk_size>>PAGE_SHIFT) * 4 * data_disks;
if (readahead < data_disks * (MAX_SECTORS>>(PAGE_SHIFT-9))*2)
- readahead = data_disks * (MAX_SECTORS>>(PAGE_SHIFT-9)*2;
- else {
+ readahead = data_disks * (MAX_SECTORS>>(PAGE_SHIFT-9))*2;
+ } else {
if (sb->level == -3)
readahead = 0;
}
md_maxreadahead[mdidx(mddev)] = readahead;

- printk(KERN_INFO "md%d: max total readahead window set to %dk\n",
+ printk(KERN_INFO "md%d: max total readahead window set to %ldk\n",
mdidx(mddev), readahead*(PAGE_SIZE/1024));

printk(KERN_INFO
- "md%d: %d data-disks, max readahead per data-disk: %dk\n",
+ "md%d: %d data-disks, max readahead per data-disk: %ldk\n",
mdidx(mddev), data_disks, readahead/data_disks*(PAGE_SIZE/1024));
return 0;
abort:
\
 
 \ /
  Last update: 2005-03-22 12:37    [W:0.026 / U:10.820 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site