On 3/19/20 10:34 AM, David Sterba wrote:
On Thu, Mar 19, 2020 at 10:11:32AM -0400, Josef Bacik wrote:
This is because we hold that delayed node's mutex while doing tree
operations. Fix this by just wrapping the searches in nofs.
For the time being we have to do the explicit NOFS so in the code it's
a bit awkward. The hint is a function that takes transaction as
argument.
I'm working on the scope NOFS (marked by the transaction start/end), it's
intrusive, all over the code and there are some cases when I want to add
assertions that turns out to be tricky for some functions.
That could be cleaner, do you want me to drop this and just add a
if (trans)
memalloc_nofs_save()
memalloc_nofs_restore()
in btrfs_search_slot? That'll catch all of these usages. I'm not married to
any particular approach. Thanks,
Josef