All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bart.vanassche@sandisk.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org
Cc: snitzer@redhat.com
Subject: Re: [PATCH] sd: Fix discard granularity when LBPRZ=1
Date: Tue, 8 Mar 2016 09:02:58 -0800	[thread overview]
Message-ID: <56DF05C2.8000901@sandisk.com> (raw)
In-Reply-To: <1457219421-836-1-git-send-email-martin.petersen@oracle.com>

On 03/05/2016 03:10 PM, Martin K. Petersen wrote:
> 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 determistic zeroes after
> UNMAP.
>
> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
> Reported-by: Mike Snitzer <snitzer@redhat.com>
> Fixes: 397737223c59e89dca7305feb6528caef8fbef84
> Cc: <stable@vger.kernel.org> # 4.4+
> ---
>   drivers/scsi/sd.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index d749da765df1..5a5457ac9cdb 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -648,7 +648,7 @@ static void sd_config_discard(struct scsi_disk *sdkp, unsigned int mode)
>   	 */
>   	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;

Please fix the spelling of "deterministic" in the patch description. 
With or without that change:

Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>

  parent reply	other threads:[~2016-03-08 17:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-20 15:17 scsi-debug regression with 4.5-rc? Ewan Milne
2016-01-20 15:57 ` Martin K. Petersen
2016-03-04 15:24   ` Mike Snitzer
2016-03-05 22:44     ` Martin K. Petersen
2016-03-05 23:10     ` [PATCH] sd: Fix discard granularity when LBPRZ=1 Martin K. Petersen
2016-03-07 15:42       ` Ewan Milne
2016-03-08  2:21         ` Martin K. Petersen
2016-03-08 17:02       ` Bart Van Assche [this message]
2016-03-09  1:51         ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56DF05C2.8000901@sandisk.com \
    --to=bart.vanassche@sandisk.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=snitzer@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.