From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: axboe@kernel.dk, anand.jain@oracle.com,
martin.petersen@oracle.com, linux-block@vger.kernel.org
Subject: Re: [PATCH] block: ensure discard_granularity is zero when discard is not supported
Date: Thu, 31 Jul 2025 11:46:43 -0400 [thread overview]
Message-ID: <yq1o6t0fjoy.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20250731152228.873923-1-hch@lst.de> (Christoph Hellwig's message of "Thu, 31 Jul 2025 08:22:28 -0700")
Christoph,
> + /*
> + * When discard is not supported, discard_granularity should be reported
> + * as 0 to userspace.
> + */
> + if (lim->max_discard_sectors)
> + lim->discard_granularity =
> + max(lim->discard_granularity, lim->physical_block_size);
> + else
> + lim->discard_granularity = 0;
> +
Looks good to me!
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
--
Martin K. Petersen
next prev parent reply other threads:[~2025-07-31 15:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-31 15:22 [PATCH] block: ensure discard_granularity is zero when discard is not supported Christoph Hellwig
2025-07-31 15:46 ` Martin K. Petersen [this message]
2025-07-31 21:02 ` 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=yq1o6t0fjoy.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=anand.jain@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox