Re: [PATCH v3 2/3] btrfs: Split remaining space to discard in chunks
From: Christoph Hellwig
Date: Wed Sep 04 2024 - 00:13:28 EST
On Tue, Sep 03, 2024 at 07:13:29PM +0930, Qu Wenruo wrote:
>
>
> 在 2024/9/3 16:57, Christoph Hellwig 写道:
> > You'll also need add a EXPORT_SYMBOL_GPL for blk_alloc_discard_bio.
>
> Just curious, shouldn't blk_ioctl_discard() also check frozen status to
> prevent block device trim from block suspension?
Someone needs to explain what 'block suspension' is for that first.
> And if that's the case, would it make more sense to move the signal and
> freezing checks into blk_alloc_discard_bio()?
No. Look at that the recent history of the dicard support. We tried
that and it badly breaks callers not expecting the signal handling.