From: Dave Chinner <david@fromorbit.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Byungchul Park <byungchul.park@lge.com>,
Theodore Ts'o <tytso@mit.edu>, fstests <fstests@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
mingo@redhat.com, kernel-team@lge.com
Subject: Re: False lockdep completion splats with loop device
Date: Fri, 8 Dec 2017 10:59:22 +1100 [thread overview]
Message-ID: <20171207235922.GJ5858@dastard> (raw)
In-Reply-To: <CAOQ4uxg8+P1r_z_9DGYCJivBY5EPpVNnDRKxqPoph_J41JrOmQ@mail.gmail.com>
On Thu, Dec 07, 2017 at 04:46:52AM +0200, Amir Goldstein wrote:
> >> For the second order of resolution it may be desired to assign a different
> >> key/class to an instance of loop devices and other stackable block devices
> >> (e.g. dm, nbd) to cover the case of a deeper nested blockdev stack,
> >> such as: ext4 over loop inside ext4 over loop inside ext4 over real disk.
> >
> >
> > This is what I should do.
> >
>
> But that won't help Ted. The test use case doesn't include doubly nested loop,
> very few setups will do that. Maybe xfstests running within a container over
> loop image. I doubt it that setup is common, so until there are nested container
> implementations out there that are using loop image mount, this use case
> is not very interesting.
xfs/073 nests xfs/loop/xfs/loop/xfs/scratchdev
And I know that people are running with loop devices on XFS as their
test/scratch devices. That gives us filesystems nested 4 layers deep
before we even consider what block device the host filesystem is
sitting on top of.
> The lockdep chain is: ext4/loop -> loop completion -> ext4/real
> but all the internal ext4 locks (i.e. &meta_group_info[i]->alloc_sem) are
> annotated statically for the ext4 fs type, so to fix that need:
> 1. ext4 to know it is mounted over loop/nbd
> 2. ext4 to annotate all internal locks that surround blockdev I/O as
> "loop nested"/"not loop nested" like overlayfs does with the vfs locks
*cough*
And so every filesystem would need to do this annotation, because
they can all sit above/below a loop device. Essentially you are
suggesting we use superblock-private lockdep class keys rather
than static global maps as we use now.
That's possible, but it could be messy and we'd have to change all
the internal locking setup in every filesystem to do this.
And we'd have to do the same thing for all the block devices that
use completions internally, too because they can also get stacked
above/below other block devices.
> 3. if multi nested looped fs is important (not really) then loop/nbd will
> need to know if its file is on a looped fs and propagate nesting level
> to ext4
This functionality is definitely used and needs to be supported by
the annotations.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2017-12-07 23:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-05 3:03 False lockdep completion splats with loop device Theodore Ts'o
2017-12-05 5:16 ` Byungchul Park
2017-12-05 15:07 ` Theodore Ts'o
2017-12-05 21:09 ` Dave Chinner
2017-12-06 5:01 ` Byungchul Park
2017-12-06 6:08 ` Dave Chinner
2017-12-06 6:31 ` Amir Goldstein
2017-12-06 7:01 ` Byungchul Park
2017-12-07 2:46 ` Amir Goldstein
2017-12-07 4:18 ` Amir Goldstein
2017-12-07 14:33 ` Theodore Ts'o
2017-12-07 14:53 ` Peter Zijlstra
2017-12-08 1:51 ` Byungchul Park
2017-12-07 23:59 ` Dave Chinner [this message]
2017-12-08 0:13 ` Al Viro
2017-12-08 8:15 ` Amir Goldstein
2017-12-08 22:57 ` Dave Chinner
2017-12-09 8:44 ` Amir Goldstein
2017-12-09 16:02 ` Theodore Ts'o
2017-12-09 20:08 ` Amir Goldstein
2017-12-06 6:23 ` Byungchul Park
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=20171207235922.GJ5858@dastard \
--to=david@fromorbit.com \
--cc=amir73il@gmail.com \
--cc=byungchul.park@lge.com \
--cc=fstests@vger.kernel.org \
--cc=kernel-team@lge.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tytso@mit.edu \
/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;
as well as URLs for NNTP newsgroup(s).