All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Garry <john.g.garry@oracle.com>
To: axboe@kernel.dk, hch@lst.de
Cc: linux-block@vger.kernel.org
Subject: Re: [PATCH] block: Drop granularity check in queue_limit_discard_alignment()
Date: Tue, 19 Nov 2024 16:05:59 +0000	[thread overview]
Message-ID: <349740ff-fe25-4ef8-a09b-e72556ab83ee@oracle.com> (raw)
In-Reply-To: <20241112092144.4059847-1-john.g.garry@oracle.com>

On 12/11/2024 09:21, John Garry wrote:
> lim->discard_granularity is always at least SECTOR_SIZE, so drop the
> pointless check for granularity less than SECTOR_SIZE.
> 
> Signed-off-by: John Garry <john.g.garry@oracle.com>

Just a reminder in case this can still make v6.13

I wouldn't say that it is a fix.

Thanks,
John

> 
> diff --git a/block/blk-settings.c b/block/blk-settings.c
> index 7d6b296997c2..4091794c5a1c 100644
> --- a/block/blk-settings.c
> +++ b/block/blk-settings.c
> @@ -457,8 +457,6 @@ static unsigned int queue_limit_discard_alignment(
>   	/* Why are these in bytes, not sectors? */
>   	alignment = lim->discard_alignment >> SECTOR_SHIFT;
>   	granularity = lim->discard_granularity >> SECTOR_SHIFT;
> -	if (!granularity)
> -		return 0;
>   
>   	/* Offset of the partition start in 'granularity' sectors */
>   	offset = sector_div(sector, granularity);


  parent reply	other threads:[~2024-11-19 16:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-12  9:21 [PATCH] block: Drop granularity check in queue_limit_discard_alignment() John Garry
2024-11-12 17:22 ` Christoph Hellwig
2024-11-19 16:05 ` John Garry [this message]
2024-11-19 16:10 ` Jens Axboe

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=349740ff-fe25-4ef8-a09b-e72556ab83ee@oracle.com \
    --to=john.g.garry@oracle.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    /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.