From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:45330 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754245AbcDIXkl (ORCPT ); Sat, 9 Apr 2016 19:40:41 -0400 Subject: Patch "sd: Fix discard granularity when LBPRZ=1" has been added to the 4.4-stable tree To: martin.petersen@oracle.com, bart.vanassche@sandisk.com, emilne@redhat.com, gregkh@linuxfoundation.org, snitzer@redhat.com Cc: , From: Date: Sat, 09 Apr 2016 16:40:40 -0700 Message-ID: <146024524068216@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >>From 6540a65da90c09590897310e31993b1f6e28485a Mon Sep 17 00:00:00 2001 From: "Martin K. Petersen" Date: Sat, 5 Mar 2016 17:52:02 -0500 Subject: sd: Fix discard granularity when LBPRZ=1 From: Martin K. Petersen 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 Reported-by: Mike Snitzer Reviewed-by: Ewan Milne Reviewed-by: Bart Van Assche Fixes: 397737223c59e89dca7305feb6528caef8fbef84 Signed-off-by: Greg Kroah-Hartman --- 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@oracle.com 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