Re: T10 WCE interpretation in Linux & device level access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Il 24/04/2013 14:12, Hannes Reinecke ha scritto:
> On 04/24/2013 02:08 PM, Paolo Bonzini wrote:
>> Il 24/04/2013 14:07, Hannes Reinecke ha scritto:
>>> On 04/24/2013 01:17 PM, Paolo Bonzini wrote:
>>>> Il 23/04/2013 22:07, James Bottomley ha scritto:
>>>>> On Tue, 2013-04-23 at 15:41 -0400, Ric Wheeler wrote:
>>>>>> For many years, we have used WCE as an indication that a device has a volatile 
>>>>>> write cache (not just a write cache) and used this as a trigger to send down 
>>>>>> SYNCHRONIZE_CACHE commands as needed.
>>>>>>
>>>>>> Some arrays with non-volatile cache seem to have WCE set and simply ignore the 
>>>>>> command.
>>>>>
>>>>> I bet they don't; they probably obey the spec.  There's a SYNC_NV bit
>>>>> which if unset (which it is in our implementation) means only sync your
>>>>> non-NV cache.  For a device with all NV, that equates to nop.
>>>>
>>>> Isn't it the other way round?
>>>>
>>>> SYNC_NV = 0 means "sync all your caches to the medium", and it's what we do.
>>>>
>>>> SYNC_NV = 1 means "sync volatile to non-volatile", and it's what Ric wants.
>>>>
>>>> So we should set SYNC_NV=1 if NV_SUP is set, perhaps only if the medium
>>>> is non-removable just to err on the safe side.
>>>
>>> Or use 'WRITE_AND_VERIFY' here; that's guaranteed to hit the disk.
>>> Plus it even has a guarantee about data consistency on the disk,
>>> which the normal WRITE command has not.
>>
>> The point is to _avoid_ hitting the disk. :)
>>
> Ah. Really?
> 
> Why do we discuss SYNCHRONIZE CACHE then?

Because we do want the data to hit the non-volatile cache, just in case
the disk has both a volatile and a non-volatile cache.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux