Re: [PATCH v2 1/3] block: Export bio_discard_limit
From: Christoph Hellwig
Date: Tue Sep 03 2024 - 01:07:48 EST
On Mon, Sep 02, 2024 at 11:57:05PM +0200, David Sterba wrote:
> On Mon, Sep 02, 2024 at 10:56:10PM +0200, Luca Stefani wrote:
> > It can be used to calculate the sector size limit of each
> > discard call allowing filesystem to implement their own
> > chunked discard logic with customized behavior, for example
> > cancellation due to signals.
>
> Maybe to add context for block layer people why we want to export this:
>
> The fs trim loops over ranges and sends discard requests, some ranges
> can be large so it's all transparently handled by blkdev_issue_discard()
> and processed in smaller chunks.
Then don't use blkdev_issue_discard but use blk_alloc_discard_bio
directly.
NAK to the export of bio_discard_limit.