Re: [PATCH] block: stack max_user_discard_sectors

From: Benjamin Marzinski

Date: Fri Nov 20 2026 - 14:44:18 EST


On Fri, Nov 20, 2026 at 04:40:40PM +0100, Christoph Hellwig wrote:
> On Mon, Nov 09, 2026 at 02:39:27PM -0500, Benjamin Marzinski wrote:
> > t->max_discard_sectors = min_not_zero(t->max_discard_sectors,
> > b->max_discard_sectors);
> > + t->max_user_discard_sectors = min_not_zero(t->max_user_discard_sectors,
> > + b->max_user_discard_sectors);
>
> I don't think we should take the underlying max_user_discard_sectors
> into account here, just max_discard_sectors.

Is that to handle devices that call blk_queue_disable_discard()? I
didn't think about that. Makes sense.

> But otherwise yes, this
> should be stacked.
>
> Please avoid the overly long lines, though.

Sure.

-Ben