patch-2.3.40 linux/drivers/block/md.c
Next file: linux/drivers/block/nbd.c
Previous file: linux/drivers/block/loop.c
Back to the patch index
Back to the overall index
- Lines: 52
- Date:
Tue Jan 18 18:54:21 2000
- Orig file:
v2.3.39/linux/drivers/block/md.c
- Orig date:
Tue Jan 11 22:31:39 2000
diff -u --recursive --new-file v2.3.39/linux/drivers/block/md.c linux/drivers/block/md.c
@@ -77,16 +77,12 @@
int md_size[MAX_MD_DEV]={0, };
-static void md_geninit (struct gendisk *);
-
static struct gendisk md_gendisk=
{
MD_MAJOR,
"md",
0,
1,
- MAX_MD_DEV,
- md_geninit,
md_hd_struct,
md_size,
MAX_MD_DEV,
@@ -909,22 +905,20 @@
}
#endif
-static void md_geninit (struct gendisk *gdisk)
+static void md_geninit (void)
{
int i;
+ blksize_size[MD_MAJOR] = md_blocksizes;
+ max_readahead[MD_MAJOR] = md_maxreadahead;
for(i=0;i<MAX_MD_DEV;i++)
{
md_blocksizes[i] = 1024;
md_maxreadahead[i] = MD_DEFAULT_DISK_READAHEAD;
- md_gendisk.part[i].start_sect=-1; /* avoid partition check */
- md_gendisk.part[i].nr_sects=0;
md_dev[i].pers=NULL;
+ register_disk(&md_gendisk, MKDEV(MAJOR_NR,i), 1, &md_fops, 0);
}
- blksize_size[MD_MAJOR] = md_blocksizes;
- max_readahead[MD_MAJOR] = md_maxreadahead;
-
#ifdef CONFIG_PROC_FS
create_proc_read_entry("mdstat", 0, NULL, md_status_read_proc, NULL);
#endif
@@ -1265,6 +1259,7 @@
#ifdef CONFIG_MD_RAID5
raid5_init ();
#endif
+ md_geninit();
return (0);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)