mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-12 08:00:09 +00:00
[SCSI] sd: clearer output of disk cache state
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
parent
4f777ed260
commit
fd44bab5c7
@ -1467,7 +1467,6 @@ sd_read_cache_type(struct scsi_disk *sdkp, char *diskname,
|
|||||||
res = sd_do_mode_sense(sdp, dbd, modepage, buffer, len, &data, &sshdr);
|
res = sd_do_mode_sense(sdp, dbd, modepage, buffer, len, &data, &sshdr);
|
||||||
|
|
||||||
if (scsi_status_is_good(res)) {
|
if (scsi_status_is_good(res)) {
|
||||||
int ct = 0;
|
|
||||||
int offset = data.header_length + data.block_descriptor_length;
|
int offset = data.header_length + data.block_descriptor_length;
|
||||||
|
|
||||||
if (offset >= SD_BUF_SIZE - 2) {
|
if (offset >= SD_BUF_SIZE - 2) {
|
||||||
@ -1496,11 +1495,13 @@ sd_read_cache_type(struct scsi_disk *sdkp, char *diskname,
|
|||||||
sdkp->DPOFUA = 0;
|
sdkp->DPOFUA = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ct = sdkp->RCD + 2*sdkp->WCE;
|
printk(KERN_NOTICE "SCSI device %s: "
|
||||||
|
"write cache: %s, read cache: %s, %s\n",
|
||||||
printk(KERN_NOTICE "SCSI device %s: drive cache: %s%s\n",
|
diskname,
|
||||||
diskname, sd_cache_types[ct],
|
sdkp->WCE ? "enabled" : "disabled",
|
||||||
sdkp->DPOFUA ? " w/ FUA" : "");
|
sdkp->RCD ? "disabled" : "enabled",
|
||||||
|
sdkp->DPOFUA ? "supports DPO and FUA"
|
||||||
|
: "doesn't support DPO or FUA");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user