Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: dsterba@suse.cz, Nikolay Borisov <nborisov@suse.com>,
	Chris Murphy <lists@colorremedies.com>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>,
	mingo@redhat.com, will@kernel.org, longman@redhat.com,
	boqun.feng@gmail.com, Thomas Gleixner <tglx@linutronix.de>,
	willy@infradead.org
Subject: Re: 5.14-0-rc5, splat in block_group_cache_tree_search while __btrfs_unlink_inode
Date: Tue, 17 Aug 2021 10:46:42 +0200	[thread overview]
Message-ID: <YRt3cnhgP+AcwK92@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20210816204354.GI5047@twin.jikos.cz>

On Mon, Aug 16, 2021 at 10:43:54PM +0200, David Sterba wrote:
> On Mon, Aug 16, 2021 at 05:11:55PM +0200, Peter Zijlstra wrote:
> > Something a little like the *completely* untested below....
> > 
> > Then I imagine someone could do something like:
> > 
> > struct my_tree_node {
> > 	...
> > 	spinlock_t lock;
> 
> Is this meant to work only for spinlocks or does it work for rwsem too?
> I guess with lockdep it does not matter but we use rwsem for tree locks.

Anything with a ->dep_map member works; courtesy of macros :-) That very
much includes rwsems.

> > @@ -4920,6 +4962,15 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
> >  
> >  	class_idx = class - lock_classes;
> >  
> > +	if (nest_lock) {
> > +		if (!__lock_is_held(nest_lock, -1)) {
> > +			print_lock_nested_lock_not_held(curr, hlock, ip);
> > +			return 0;
> > +		}
> > +		if (nest_lock->type == LD_LOCK_NEST_FUNC)
> 
> That's probably nest_lock->lock_type, does not compile otherwise.

Yes, sorry, typing so hard :-)

      reply	other threads:[~2021-08-17  8:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-14  4:33 5.14-0-rc5, splat in block_group_cache_tree_search while __btrfs_unlink_inode Chris Murphy
2021-08-16  7:17 ` Johannes Thumshirn
2021-08-17  3:21   ` Chris Murphy
2021-08-16 10:20 ` David Sterba
2021-08-16 10:27   ` Nikolay Borisov
2021-08-16 10:52     ` David Sterba
2021-08-16 15:11     ` Peter Zijlstra
2021-08-16 15:40       ` Matthew Wilcox
2021-08-16 20:43       ` David Sterba
2021-08-17  8:46         ` Peter Zijlstra [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YRt3cnhgP+AcwK92@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=boqun.feng@gmail.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.com \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=nborisov@suse.com \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox