]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
sd: Fix discard granularity when LBPRZ=1
authorMartin K. Petersen <martin.petersen@oracle.com>
Sat, 5 Mar 2016 22:52:02 +0000 (17:52 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 9 Mar 2016 01:58:20 +0000 (20:58 -0500)
commit6540a65da90c09590897310e31993b1f6e28485a
tree5ade1ec30e7766f8cc37af3916caecd9a5c8c912
parent21b81716c6bff24cda52dc75588455f879ddbfe9
sd: Fix discard granularity when LBPRZ=1

Commit 397737223c59 ("sd: Make discard granularity match logical block
size when LBPRZ=1") accidentally set the granularity to one byte instead
of one logical block on devices that provide deterministic zeroes after
UNMAP.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reported-by: Mike Snitzer <snitzer@redhat.com>
Reviewed-by: Ewan Milne <emilne@redhat.com>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Fixes: 397737223c59e89dca7305feb6528caef8fbef84
Cc: <stable@vger.kernel.org> #v4.4+
drivers/scsi/sd.c