Kernel Patch for Intel S3700, Intel 530...
diff --git a/drivers/scsi/sd.c b/drivers//scsi/sd.c
--- a/drivers/scsi/sd.c 2013-09-14 12:53:21.000000000 +0400
+++ b/drivers//scsi/sd.c 2013-12-19 21:43:29.000000000 +0400
@@ -137,6 +137,7 @@
char *buffer_data;
struct scsi_mode_data data;
struct scsi_sense_hdr sshdr;
+ static const char temp[] = "temporary ";
int len;
if (sdp->type != TYPE_DISK)
@@ -144,6 +145,13 @@
* can do it, but there's probably so many exceptions
* it's not worth the risk */
return -EINVAL;
+
+ if(strncmp(buf,temp,sizeof(temp) - 1 ) == 0) {
+ buf += sizeof(temp) - 1;
+ sdkp->cache_override = 1;
+ } else {
+ sdkp->cache_override = 0;
+ }
for (i = 0; i < ARRAY_SIZE(sd_cache_types); i++) {
const int len = strlen(sd_cache_types[i]);
@@ -157,6 +165,13 @@
return -EINVAL;
rcd = ct & 0x01 ? 1 : 0;
wce = ct & 0x02 ? 1 : 0;
+
+ if(sdkp->cache_override){
+ sdkp->WCE = wce;
+ sdkp->RCD = rcd;
+ goto out;
+ }
+
if (scsi_mode_sense(sdp, 0x08, 8, buffer, sizeof(buffer), SD_TIMEOUT,
SD_MAX_RETRIES, &data, NULL))
return -EINVAL;
@@ -174,6 +189,7 @@
sd_print_sense_hdr(sdkp, &sshdr);
return -EINVAL;
}
+out:
revalidate_disk(sdkp->disk);
return count;
}
@@ -1995,6 +2011,9 @@
int old_wce = sdkp->WCE;
int old_rcd = sdkp->RCD;
int old_dpofua = sdkp->DPOFUA;
+
+ if(sdkp->cache_override)
+ return;
if (sdp->skip_ms_page_8)
goto defaults;
@@ -2416,6 +2435,7 @@
sdkp->capacity = 0;
sdkp->media_present = 1;
sdkp->write_prot = 0;
+ sdkp->cache_override = 0;
sdkp->WCE = 0;
sdkp->RCD = 0;
sdkp->ATO = 0;
diff -u a/drivers/scsi/sd.h b/drivers//scsi/sd.h
--- a/drivers/scsi/sd.h 2013-09-14 12:52:43.000000000 +0400
+++ b/drivers//scsi/sd.h 2013-12-19 16:52:25.000000000 +0400
@@ -71,6 +71,7 @@
u8 provisioning_mode;
unsigned previous_state : 1;
unsigned ATO : 1; /* state of disk ATO bit */
+ unsigned cache_override : 1; /* temp override of WCE,RCD*/
unsigned WCE : 1; /* state of disk WCE bit */
unsigned RCD : 1; /* state of disk RCD bit, unused */
unsigned DPOFUA : 1; /* state of disk DPOFUA bit */
2014/1/15 Mark Nelson <[email protected]>
> On 01/15/2014 08:03 AM, Robert van Leeuwen wrote:
>
>> Power-Loss Protection: In the rare event that power fails while the
>>> drive is operating, power-loss protection helps ensure that data isn’t
>>> corrupted.
>>>
>>
>> Seems that not all power protected SSDs are created equal:
>> http://lkcl.net/reports/ssd_analysis.html
>>
>> The m500 is not tested but the m4 is.
>>
>> Up to now it seems that only Intel seems to have done his homework.
>> In general they *seem* to be the most reliable SSD provider.
>>
>
> Even at that, there has been some concern on the list (and lkml) that
> certain older Intel drives without super-capacitors are ignoring
> ATA_CMD_FLUSH, making them very fast (which I like!) but potentially
> dangerous (boo!). The 520 in particular is a drive I've used for a lot of
> Ceph performance testing but I'm afraid that if it's not properly handling
> CMD FLUSH requests, it may not be indicative of the performance folks would
> see on other drives that do.
>
> On the third hand, if drives with supercaps like the Intel DC S3700 can
> safely ignore CMD_FLUSH and maintain high performance (even when there are
> a lot of O_DSYNC calls, ala the journal), that potentially makes them even
> more attractive (and that drive already has relatively high sequential
> write performance and high write endurance).
>
>
>
>> Cheers,
>> Robert van Leeuwen
>>
>> _______________________________________________
>> ceph-users mailing list
>> [email protected]
>> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>>
>>
> _______________________________________________
> ceph-users mailing list
> [email protected]
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>
--
С уважением, Фасихов Ирек Нургаязович
Моб.: +79229045757
_______________________________________________
ceph-users mailing list
[email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com