lkml.org 
[lkml]   [2022]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT PULL] Btrfs fixes for 5.19-rc7
On Thu, Jul 21, 2022 at 04:45:08PM +0200, David Sterba wrote:
> On Sat, Jul 16, 2022 at 04:34:12PM +0100, Matthew Wilcox wrote:
> > 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.
>
> I have misinterpreted what might_sleep_if does in case it's under mutex,
> it won't warn so the linked commit (adding might_alloc) should be
> enough, thanks.

I did a quick test, with spin locks it's detected right away, with
mutexes no warnings as expected.

\
 
 \ /
  Last update: 2022-07-21 17:50    [W:0.042 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site