[dm-devel] [PATCH] dm-raid.txt: document discard support
Martin K. Petersen
martin.petersen at oracle.com
Sat Aug 8 16:27:14 UTC 2015
>>>>> "Heinz" == heinzm <heinzm at redhat.com> writes:
Heinz,
> +Discard Support
> +---------------
> +The implementation of discard support amoung hardware vendors varies. When
> +a block is discarded, some storage devices will return zeros when it is
> +read. These devices set the 'discard_zeros_data' attribute. Other devices
> +will return random data. Confusingly, some devices will set
> +'discard_zeros_data', but will still not always return zeros when
> +discarded blocks are read!
This used to be correct but that's no longer the case. We only set
discard_zeroes_data when we have hard guarantees. We no longer
exclusively rely on what the device reports.
discard_zeroes_data is only set if the device reports LBPME/LBPRZ and
uses WRITE SAME 10 or 16 (SCSI) or if it reports DRAT/RZAT and is
explicitly whitelisted (ATA).
--
Martin K. Petersen Oracle Linux Engineering
More information about the dm-devel
mailing list