This is a note to let you know that I've just added the patch titled sd: Fix discard granularity when LBPRZ=1 to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: sd-fix-discard-granularity-when-lbprz-1.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 6540a65da90c09590897310e31993b1f6e28485a Mon Sep 17 00:00:00 2001 From: "Martin K. Petersen" <martin.petersen@xxxxxxxxxx> Date: Sat, 5 Mar 2016 17:52:02 -0500 Subject: sd: Fix discard granularity when LBPRZ=1 From: Martin K. Petersen <martin.petersen@xxxxxxxxxx> commit 6540a65da90c09590897310e31993b1f6e28485a upstream. 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@xxxxxxxxxx> Reported-by: Mike Snitzer <snitzer@xxxxxxxxxx> Reviewed-by: Ewan Milne <emilne@xxxxxxxxxx> Reviewed-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx> Fixes: 397737223c59e89dca7305feb6528caef8fbef84 Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/scsi/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -648,7 +648,7 @@ static void sd_config_discard(struct scs */ if (sdkp->lbprz) { q->limits.discard_alignment = 0; - q->limits.discard_granularity = 1; + q->limits.discard_granularity = logical_block_size; } else { q->limits.discard_alignment = sdkp->unmap_alignment * logical_block_size; Patches currently in stable-queue which might be from martin.petersen@xxxxxxxxxx are queue-4.4/be2iscsi-set-the-boot_kset-pointer-to-null-in-case-of-failure.patch queue-4.4/sg-fix-dxferp-in-from_to-case.patch queue-4.4/aacraid-fix-memory-leak-in-aac_fib_map_free.patch queue-4.4/scsi-storvsc-fix-srb_status_aborted-handling.patch queue-4.4/aacraid-fix-rrq-overload.patch queue-4.4/aacraid-set-correct-msix-count-for-eeh-recovery.patch queue-4.4/aic7xxx-fix-queue-depth-handling.patch queue-4.4/sd-fix-discard-granularity-when-lbprz-1.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html