patch-pre2.0.7 linux/drivers/block/linear.c
Next file: linux/drivers/block/ll_rw_blk.c
Previous file: linux/drivers/block/floppy.c
Back to the patch index
Back to the overall index
- Lines: 58
- Date:
Mon May 20 07:50:46 1996
- Orig file:
pre2.0.6/linux/drivers/block/linear.c
- Orig date:
Fri May 17 15:32:13 1996
diff -u --recursive --new-file pre2.0.6/linux/drivers/block/linear.c linux/drivers/block/linear.c
@@ -33,7 +33,7 @@
struct linear_data *data;
MOD_INC_USE_COUNT;
-
+
mddev->private=kmalloc (sizeof (struct linear_data), GFP_KERNEL);
data=(struct linear_data *) mddev->private;
@@ -43,10 +43,10 @@
I moved it here... Any comment ? ;-)
*/
- data->smallest=devices[minor];
+ data->smallest=mddev->devices;
for (i=1; i<mddev->nb_dev; i++)
- if (data->smallest->size > devices[minor][i].size)
- data->smallest=devices[minor]+i;
+ if (data->smallest->size > mddev->devices[i].size)
+ data->smallest=mddev->devices+i;
nb_zone=data->nr_zones=
md_size[minor]/data->smallest->size +
@@ -54,12 +54,12 @@
data->hash_table=kmalloc (sizeof (struct linear_hash)*nb_zone, GFP_KERNEL);
- size=devices[minor][cur].size;
+ size=mddev->devices[cur].size;
i=0;
while (cur<mddev->nb_dev)
{
- data->hash_table[i].dev0=devices[minor]+cur;
+ data->hash_table[i].dev0=mddev->devices+cur;
if (size>=data->smallest->size) /* If we completely fill the slot */
{
@@ -69,7 +69,7 @@
if (!size)
{
if (++cur==mddev->nb_dev) continue;
- size=devices[minor][cur].size;
+ size=mddev->devices[cur].size;
}
continue;
@@ -82,8 +82,8 @@
}
dev0_size=size; /* Here, we use a 2nd dev to fill the slot */
- size=devices[minor][cur].size;
- data->hash_table[i++].dev1=devices[minor]+cur;
+ size=mddev->devices[cur].size;
+ data->hash_table[i++].dev1=mddev->devices+cur;
size-=(data->smallest->size - dev0_size);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this