scsi_synchronize_cache - timeout
Serge Negodyuck
petr at petrovich.kiev.ua
Mon Sep 29 00:56:08 PDT 2003
System:
FreeBSD 4.9-PRERELEASE #5: Sun Sep 28 13:06:43 EEST 2003
trm0: <Tekram DC395U/UW/F DC315/U Fast20 Wide SCSI Adapter> port 0xb400-0xb4ff
mem 0xfeafe000-0xfeafefff irq 10 at device 1.0 on pci3
da0 at trm0 bus 0 target 1 lun 0
da0: <FUJITSU MAP3367NP 0108> Fixed Direct Access SCSI-3 device
da0: 40.000MB/s transfers (20.000MHz, offset 15, 16bit), Tagged Queueing
Enabled
da0: 35046MB (71775284 512 byte sectors: 255H 63S/T 4467C)
I have a problem with a delay of 5 minutes after command "shutdown -r now"
# shutdown -r now:
Waiting (max 60 seconds) for system process `vnlru' to stop...stopped
Waiting (max 60 seconds) for system process `bufdaemon' to stop...stopped
Waiting (max 60 seconds) for system process `syncer' to stop...stopped
syncing disks... 7
done
Uptime: 42s
// There is delay of exactly 5 minutes at this stage.
Rebooting...
I did some research using DDB.
During reboot function dashutdown() ( sys/cam/scsi/scsi_da.c:1894 ) is called.
There are the following code:
scsi_synchronize_cache(&ccb.csio,
/*retries*/1,
/*cbfcnp*/dadone,
MSG_SIMPLE_Q_TAG,
/*begin_lba*/0, /* whole disk */
/*lb_count*/0,
SSD_FULL_SIZE,
5 * 60 * 1000);
xpt_polled_action(&ccb);
The problem is that xpt_polled_action() waits 5 minutes. And never returns
before 5 minutes elapsed.
So, questions are:
- Is this a problem of SCSI controller or hard drive?
- Is it a good idea to make this delay tunable in kernel config?
- Will I have troubles if I change this delay to 20 seconds for example?
- How can I help to fix this problem?
More information about the freebsd-scsi
mailing list