Re: [GIT PULL] Btrfs fixes for 5.19-rc7

From: Matthew Wilcox
Date: Sat Jul 16 2022 - 11:34:22 EST


On Sat, Jul 16, 2022 at 04:06:20PM +0200, David Sterba wrote:
> Note about the xarray API:
>
> The possible sleeping is documented next to xa_insert, however there's
> no runtime check for that, like is eg. in radix_tree_preload. The
> context does not need to be atomic so it's not as simple as
>
> might_sleep_if(gfpflags_allow_blocking(gfp));
>
> or
>
> WARN_ON_ONCE(gfpflags_allow_blocking(gfp));
>
> Some kind of development time debugging/assertion aid would be nice.

Are you saying that
https://git.infradead.org/users/willy/xarray.git/commitdiff/c195d497ca1ff673c2e6935152a0a5b6be2efdc9

is wrong? It's been in linux-next for the last week since you drew it
to my attention that this would be useful.