[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220721154339.GV13489@twin.jikos.cz>
Date: Thu, 21 Jul 2022 17:43:39 +0200
From: David Sterba <dsterba@...e.cz>
To: David Sterba <dsterba@...e.cz>
Cc: Matthew Wilcox <willy@...radead.org>,
David Sterba <dsterba@...e.com>, torvalds@...ux-foundation.org,
linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [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.
Powered by blists - more mailing lists