[PATCH] scsi_ioctl HZ fixes
According to http://www.torque.net/sg/p/sg_v3_ho.html, SG HOWTO, SG_[GET|SET]_TIMEOUTs are measured in "jiffies," while timeout field of SG_IO structure - in milliseconds. Inconsistent? Yes. Yet it's no excuse to disregard the specification. "Jiffies" are USER_HZ, 10ms on IA-32 platforms and has to be scaled to kernel "jiffies," as suggested below. As for "(jiffies - start_time) * (1000 / HZ)" vs. "((jiffies - start_time) * 1000) / HZ." Just think that HZ is 1024 on some platforms...
Showing
Please register or sign in to comment