Re: [PATCH 3.16 106/217] sd: disable discard_zeroes_data for UNMAP
From: Paolo Bonzini
Date: Mon May 09 2016 - 10:17:24 EST
On 29/04/2016 06:00, Rafael David Tinoco wrote:
> Actually, It was an objection.
>
> Knowing that WRITESAME(16), used as the discard mechanism, can cause
> storage servers to misbehave (like QEMU's SCSI WRITESAME
> implementation, workaround-ed by commit e461338b6cd4) and those
> storage servers can't rely on LBPRZ flag to opt out from WRITESAME as
> discard mechanism (like QEMU does) since it is out of spec...
I think e461338b6cd4 is a perfectly fine change---independent of whether
it's a workaround for QEMU---and should be backported to stable kernels too.
Is there a reason to use WRITE SAME if LBPRZ=0? You risk doing a real
write which breaks thin provisioning and will probably take a huge time too.
Paolo