Skip to contentSkip to conversation

i2o_block struct gendisk misinitialization (2.4.3)

PATCH Alvaro Lopes 2 participants 2 messages Apr 27, 2001 – Apr 30, 2001

lore
Share & tools
lore
#0 lore raw

Hi

i2o_block is not properly initializing its gendisk structure (i2o_gendisk) and someone forgot to link it to the gendisk linked list, causing i2o hard drives and partitions not to show in /proc/partitions (debian installer relies on this to find fdisk'able drives).

I attached a simple patch to fix it.

Álvaro Lopes

drivers/i2o/i2o_block.c +6 -0
@@ -15,6 +15,8 @@
  * from loop.c. Isn't free software great for reusability 8)
  *
  * Fixes/additions:
+ *      Alvaro Lopes:
+ *              Fixed misc gendisk misinitialization
  *	Steve Ralston:	
  *		Multiple device handling error fixes,
  *		Added a queue depth.
@@ -1675,6 +1677,10 @@
 		i2o_remove_handler(&i2o_block_handler);
 		return 0;
 	}
+
+	i2ob_gendisk.next = gendisk_head;
+	gendisk_head = &i2ob_gendisk;
+	i2ob_gendisk.nr_real = MAX_I2OB;
 
 	/*
 	 *	Finally see what is actually plugged in to our controllers
#1 lore raw
Quoted 4 lines

i2o_block is not properly initializing its gendisk structure (i2o_gendisk) and someone forgot to link it to the gendisk linked list, causing i2o hard drives and partitions not to show in /proc/partitions (debian installer relies on this to find fdisk'able drives).

This is the least of your worries. If you are using i2o use a -ac kernel tree. There are a _lot_ of other things wrong with the base 2.4 tree and I've not yet merged the fixes back. Many cards won't even work with the base 2.4 i2o