All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@kernel.org>
To: Matthew Sakai <msakai@redhat.com>
Cc: dm-devel@lists.linux.dev, Bruce Johnston <bjohnsto@redhat.com>
Subject: Re: dm vdo: replace max_discard_sectors with max_hw_discard_sectors
Date: Thu, 11 Jul 2024 10:08:04 -0400	[thread overview]
Message-ID: <Zo_nRLC_Xp9Z4vQl@kernel.org> (raw)
In-Reply-To: <a99e5c45b2c8f7e85e2cd25d02560deb2120c4a3.1720640089.git.msakai@redhat.com>

On Wed, Jul 10, 2024 at 03:37:30PM -0400, Matthew Sakai wrote:
> From: Bruce Johnston <bjohnsto@redhat.com>
> 
> Commit 4f563a64732d ("block: add a max_user_discard_sectors queue
> limit") changed block core to set max_discard_sectors to:
> min(lim->max_hw_discard_sectors, lim->max_user_discard_sectors)
> 
> Commit 825d8bbd2f32 ("dm: always manage discard support in terms
> of max_hw_discard_sectors") fixed most dm targetss to deal with
> this, by replacing max_discard_sectors with max_hw_discard_sectors.
> Unfortunately, dm-vdo did not get fixed at that time.
> 
> Fixes: 825d8bbd2f32 ("dm: always manage discard support in terms of max_hw_discard_sectors")
> Signed-off-by: Bruce Johnston <bjohnsto@redhat.com>
> Signed-off-by: Matthew Sakai <msakai@redhat.com>
> ---
>  drivers/md/dm-vdo/dm-vdo-target.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/md/dm-vdo/dm-vdo-target.c b/drivers/md/dm-vdo/dm-vdo-target.c
> index 5a4b0a927f56..af77084969e0 100644
> --- a/drivers/md/dm-vdo/dm-vdo-target.c
> +++ b/drivers/md/dm-vdo/dm-vdo-target.c
> @@ -945,7 +945,7 @@ static void vdo_io_hints(struct dm_target *ti, struct queue_limits *limits)
>  	 * The value is used by dm-thin to determine whether to pass down discards. The block layer
>  	 * splits large discards on this boundary when this is set.
>  	 */
> -	limits->max_discard_sectors =
> +	limits->max_hw_discard_sectors =
>  		(vdo->device_config->max_discard_blocks * VDO_SECTORS_PER_BLOCK);
>  
>  	/*
> -- 
> 2.45.2
> 
> 

Not sure why I missed vdo, sorry about that.

Reviewed-by: Mike Snitzer <snitzer@kernel.org>

      reply	other threads:[~2024-07-11 14:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-10 19:37 [PATCH] dm vdo: replace max_discard_sectors with max_hw_discard_sectors Matthew Sakai
2024-07-11 14:08 ` Mike Snitzer [this message]

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=Zo_nRLC_Xp9Z4vQl@kernel.org \
    --to=snitzer@kernel.org \
    --cc=bjohnsto@redhat.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=msakai@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.