In sd_sync_cache: rq->timeout *= SD_FLUSH_TIMEOUT_MULTIPLIER; Regardless of the baseline for the multiplication, a magic number of 2 is too arbitrary. That might work for an individual drive, but could be far too short for a RAID controller that runs into worst case error handling for the drives to which it is flushing (e.g., if its cache is volatile and the drives all have recoverable errors during writes). That time goes up with a bigger cache and with more fragmented write data in the cache requiring more individual WRITE commands. A better value would be the Recommended Command Timeout field value reported in the REPORT SUPPORTED OPERATION CODES command, if reported by the device server. That is supposed to account for the worst case. For cases where that is not reported, exposing the multiplier in sysfs would let the timeout for simple devices be set to smaller values than complex devices. Also, in both sd_setup_flush_cmnd and sd_sync_cache: cmd->cmnd[0] = SYNCHRONIZE_CACHE; cmd->cmd_len = 10; SYNCHRONIZE CACHE (16) should be favored over SYNCHRONIZE CACHE (10) unless SYNCHRONIZE CACHE (10) is not supported. --- Rob Elliott HP Server Storage _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel