Follow-up Comment #1, bug #30221 (project grub):

Hi,

I probably found why disk cache is not working properly.
It seems to be related to scsi.c module - it does not set disk->id to be
unique for each scsi disk.

This patch

diff -urB ./usb/disk/scsi.c ./usb_patched/disk/scsi.c
--- ./usb/disk/scsi.c   2010-06-25 23:06:58.000000000 +0200
+++ ./usb_patched/disk/scsi.c   2010-06-25 22:59:46.000000000 +0200
@@ -379,7 +379,7 @@
       if (p->open (name, scsi))
        continue;
 
-      disk->id = (unsigned long) "scsi"; /* XXX */
+      disk->id = *((unsigned long*)&name[len-4]); /* XXX: Must be unique for
each disk for disk cache ! */
       disk->data = scsi;
       scsi->dev = p;
       scsi->lun = lun;

should simply correct this problem.

Does anybody have also this problem and can test this patch ?
Or does anybody some better idea how to set disk->id ?

Regards
Ales


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?30221>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-grub mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-grub

Reply via email to