[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160410183458.457045750@linuxfoundation.org>
Date: Sun, 10 Apr 2016 11:33:34 -0700
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Mike Snitzer <snitzer@...hat.com>,
Ewan Milne <emilne@...hat.com>,
Bart Van Assche <bart.vanassche@...disk.com>
Subject: [PATCH 4.5 037/238] sd: Fix discard granularity when LBPRZ=1
4.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Martin K. Petersen <martin.petersen@...cle.com>
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@...cle.com>
Reported-by: Mike Snitzer <snitzer@...hat.com>
Reviewed-by: Ewan Milne <emilne@...hat.com>
Reviewed-by: Bart Van Assche <bart.vanassche@...disk.com>
Fixes: 397737223c59e89dca7305feb6528caef8fbef84
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
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;
Powered by blists - more mailing lists