bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #30221] Disk cache is not working properly


From: Ales Nesrsta
Subject: [bug #30221] Disk cache is not working properly
Date: Fri, 25 Jun 2010 21:22:54 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; cs-CZ; rv:1.9.0.19) Gecko/2010033100 Iceweasel/3.0.6 (Debian-3.0.6-3)

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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]