From: Kent Overstreet <kent.overstreet@linux.dev>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Josef Bacik <josef@toxicpanda.com>,
torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-bcachefs@vger.kernel.org,
dchinner@redhat.com, sandeen@redhat.com, willy@infradead.org,
tytso@mit.edu, bfoster@redhat.com, jack@suse.cz,
andreas.gruenbacher@gmail.com, brauner@kernel.org,
peterz@infradead.org, akpm@linux-foundation.org,
dhowells@redhat.com
Subject: Re: [GIT PULL] bcachefs
Date: Thu, 6 Jul 2023 18:43:14 -0400 [thread overview]
Message-ID: <20230706224314.u5zbeld23uqur2ct@moria.home.lan> (raw)
In-Reply-To: <20230706211914.GB11476@frogsfrogsfrogs>
On Thu, Jul 06, 2023 at 02:19:14PM -0700, Darrick J. Wong wrote:
> TBH, so long as bcachefs is the only user of sixlocks and mean/variance,
> I don't really care what's in them, though they probably ought to live
> in fs/bcachefs/ until a second user arises.
I've been waiting for Linus to weigh in on those (and the rest of the
merge) since he had opinions a few weeks ago, but I have no real
objection there. I'd need to add an export for osq_lock, that's all.
> > - d_mark_tmpfile(): trivial new helper, from pulling out part of
> > d_tmpfile(). We need this because bcachefs handles the nlink count
> > for tmpfiles earlier, in the btree transaction.
>
> XFS might want this too, we also handle the nlink count for tmpfiles
> earlier, in a transaction, and end up playing stupid games with the
> refcount to fit the vfs function:
>
> if (tmpfile) {
> /*
> * The VFS requires that any inode fed to d_tmpfile must
> * have nlink == 1 so that it can decrement the nlink in
> * d_tmpfile. However, we created the temp file with
> * nlink == 0 because we're not allowed to put an inode
> * with nlink > 0 on the unlinked list. Therefore we
> * have to set nlink to 1 so that d_tmpfile can
> * immediately set it back to zero.
> */
> set_nlink(inode, 1);
> d_tmpfile(tmpfile, inode);
> }
Yeah, that same game would technically work for bcachefs - but I'm
hoping we can just do the right thing here :)
> > - Don't block on s_umount from __invalidate_super: this is a bugfix
> > for a deadlock in generic/042 because of how we use sget(), the
> > commit message goes into more detail.
>
> If this is in reference to the earlier subthread about some io_uring
> thing causing unmount to hang -- my impressions of that were that yes,
> it's a bug, but no, it's not a bug in bcachefs itself. I also wondered
> why (a) that hadn't split out as its own thread; and (b) is this really
> a bcachefs blocker?
No, this is completely unrelated. The io_uring thing hits on
generic/388 (and others) and just causes umount to fail with -EBUSY.
This one is an actual deadlock and it hits every time in generic/042.
It's specific to the loopback device and when it emits certain events,
and it hits every time so I really do need this fix included.
> /me shrugs, been on vacation and in hospitals for the last month or so.
>
> > bcachefs doesn't use sget() for mutual exclusion because a) sget()
> > is insane, what we really want is the _block device_ to be opened
> > exclusively (which we do), and we have our own block device opening
> > path - which we need to, as we're a multi device filesystem.
>
> ...and isn't jan kara already messing with this anyway?
The blkdev_get_handle() patchset? I like that, but I don't think that's
related - if there's something more related to sget() I haven't seen it
yet
> OTOH there's so many layers of tiny helper functions and macros that I
> have a really hard time making sense of all those pre-bcachefs changes.
> That's why I haven't weighed in. Given all the weird problems we've had
> recently with new code colliding badly with under-documented optimized
> core code, I'm fearful of touching anything.
??? not sure what you're referring to here, are there specific patches
or recent issues you're thinking of?
I don't think any of the non-fs/bcachefs/ patches are remotely tricky
enough for any of this to be a concern.
> > You, the btrfs developers, got started when Linux filesystem teams were
> > quite a bit bigger than they are now: I was at Google when Google had a
> > bunch of people working on ext4, and that was when ZFS had recently come
> > out and there was recognition that Linux needed an answer to ZFS and you
> > were able to ride that excitement. It's been a bit harder for me to get
> > something equally ambitions going, to be honest.
> >
> > But years ago when I realized I was onto something, I decided this
> > project was only going to fail if I let it fail - so I'm in it for the
> > long haul.
> >
> > Right now what I'm hearing, in particular from Redhat, is that they want
> > it upstream in order to commit more resources. Which, I know, is not
> > what kernel people want to hear, but it's the chicken-and-the-egg
> > situation I'm in.
>
> /me suspects mainline merging is necessary but not sufficient -- few
> non-developers want to deal with merging an out of tree filesystem, but
> that still doesn't mean anyone will commit real engineering resources.
Yeah, no doubt it will continue to be an uphill battle. But it's a
necessary step in the right direction, for sure.
> > > I am really, really wanting you to succeed here Kent. If the general consensus
> > > is you need to have some idiot review fs/bcachefs I will happily carve out some
> > > time and dig in.
> >
> > That would be much appreciated - I'll owe you some beers next time I see
> > you. But before jumping in, let's see if we can get people who have
> > already worked with the code to say something.
> >
> > Something I've done in the past that might be helpful - instead (or in
> > addition to) having people read code in isolation, perhaps we could do a
> > group call/meeting where people can ask questions about the code, bring
> > up design issues they've seen in other filesystems, etc. - I've also
> > found that kind of setup great for identifying places in the code where
> > additional documentation would be useful.
>
> "At this point I think Kent's QA efforts are at least as good as XFS's,
> just merge it and let's move on to the next thing."
high praise :)
next prev parent reply other threads:[~2023-07-06 22:43 UTC|newest]
Thread overview: 142+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-26 21:46 [GIT PULL] bcachefs Kent Overstreet
2023-06-26 23:11 ` Jens Axboe
2023-06-27 0:06 ` Kent Overstreet
2023-06-27 1:13 ` Jens Axboe
2023-06-27 2:05 ` Kent Overstreet
2023-06-27 2:59 ` Jens Axboe
2023-06-27 3:10 ` Kent Overstreet
2023-06-27 17:16 ` Jens Axboe
2023-06-27 20:15 ` Kent Overstreet
2023-06-27 22:05 ` Dave Chinner
2023-06-27 22:41 ` Kent Overstreet
2023-06-28 14:40 ` Jens Axboe
2023-06-28 14:48 ` Thomas Weißschuh
2023-06-28 14:58 ` Jens Axboe
2023-06-28 3:16 ` Jens Axboe
2023-06-28 4:01 ` Kent Overstreet
2023-06-28 14:58 ` Jens Axboe
2023-06-28 15:22 ` Jens Axboe
2023-06-28 17:56 ` Kent Overstreet
2023-06-28 20:45 ` Jens Axboe
2023-06-28 16:57 ` Jens Axboe
2023-06-28 17:33 ` Christian Brauner
2023-06-28 17:52 ` Kent Overstreet
2023-06-28 20:44 ` Jens Axboe
2023-06-28 21:17 ` Jens Axboe
2023-06-28 22:13 ` Kent Overstreet
2023-06-28 22:33 ` Jens Axboe
2023-06-28 22:55 ` Kent Overstreet
2023-06-28 23:14 ` Jens Axboe
2023-06-28 23:50 ` Kent Overstreet
2023-06-29 1:00 ` Dave Chinner
2023-06-29 1:33 ` Jens Axboe
2023-06-29 11:18 ` Christian Brauner
2023-06-29 14:17 ` Kent Overstreet
2023-06-29 15:31 ` Kent Overstreet
2023-06-30 9:40 ` Christian Brauner
2023-07-06 15:20 ` Kent Overstreet
2023-07-06 16:26 ` Jens Axboe
2023-07-06 16:34 ` Kent Overstreet
2023-06-29 1:29 ` Jens Axboe
2023-07-06 20:15 ` Kent Overstreet
2023-06-28 17:54 ` Kent Overstreet
2023-06-28 20:54 ` Jens Axboe
2023-06-28 22:14 ` Jens Axboe
2023-06-28 23:04 ` Kent Overstreet
2023-06-28 23:11 ` Jens Axboe
2023-06-27 2:33 ` Kent Overstreet
2023-06-27 2:59 ` Jens Axboe
2023-06-27 3:19 ` Matthew Wilcox
2023-06-27 3:22 ` Kent Overstreet
2023-06-27 3:52 ` Christoph Hellwig
2023-06-27 4:36 ` Kent Overstreet
2023-07-06 15:56 ` Kent Overstreet
2023-07-06 16:40 ` Josef Bacik
2023-07-06 17:38 ` Kent Overstreet
2023-07-06 19:17 ` Eric Sandeen
2023-07-06 19:31 ` Kent Overstreet
2023-07-06 21:19 ` Darrick J. Wong
2023-07-06 22:43 ` Kent Overstreet [this message]
2023-07-07 13:13 ` Jan Kara
2023-07-07 13:52 ` Kent Overstreet
2023-07-07 8:48 ` Christian Brauner
2023-07-07 9:18 ` Kent Overstreet
2023-07-07 16:26 ` James Bottomley
2023-07-07 16:48 ` Kent Overstreet
2023-07-07 17:04 ` James Bottomley
2023-07-07 17:26 ` Kent Overstreet
2023-07-08 3:54 ` Matthew Wilcox
2023-07-08 4:10 ` Kent Overstreet
2023-07-08 4:31 ` Kent Overstreet
2023-07-08 15:02 ` Theodore Ts'o
2023-07-08 15:23 ` Kent Overstreet
2023-07-08 16:42 ` James Bottomley
2023-07-09 1:16 ` Kent Overstreet
2023-07-07 9:35 ` Kent Overstreet
2023-07-07 2:04 ` Theodore Ts'o
2023-07-07 12:18 ` Brian Foster
2023-07-07 14:49 ` Kent Overstreet
2023-07-12 2:54 ` Kent Overstreet
2023-07-12 19:48 ` Kees Cook
2023-07-12 19:57 ` Kent Overstreet
2023-07-12 22:10 ` Darrick J. Wong
2023-07-12 23:57 ` Kent Overstreet
2023-08-09 1:27 ` Linus Torvalds
2023-08-10 15:54 ` Kent Overstreet
2023-08-10 16:40 ` Linus Torvalds
2023-08-10 18:02 ` Kent Overstreet
2023-08-10 18:09 ` Linus Torvalds
2023-08-10 17:52 ` Jan Kara
2023-08-11 2:47 ` Kent Overstreet
2023-08-11 8:10 ` Jan Kara
2023-08-11 8:13 ` Christian Brauner
2023-08-10 22:39 ` Darrick J. Wong
2023-08-10 23:47 ` Linus Torvalds
2023-08-11 2:40 ` Jens Axboe
2023-08-11 4:03 ` Kent Overstreet
2023-08-11 5:20 ` Linus Torvalds
2023-08-11 5:29 ` Kent Overstreet
2023-08-11 5:53 ` Linus Torvalds
2023-08-11 7:52 ` Christian Brauner
2023-08-11 14:31 ` Jens Axboe
2023-08-11 3:45 ` Kent Overstreet
2023-08-21 0:09 ` Dave Chinner
2023-08-10 23:07 ` Matthew Wilcox
2023-08-11 10:54 ` Christian Brauner
2023-08-11 12:58 ` Kent Overstreet
2023-08-14 7:25 ` Christian Brauner
2023-08-14 15:23 ` Kent Overstreet
2023-08-11 13:21 ` Kent Overstreet
2023-08-11 22:56 ` Darrick J. Wong
2023-08-14 7:21 ` Christian Brauner
2023-08-14 15:27 ` Kent Overstreet
-- strict thread matches above, loose matches on Subject: below --
2023-09-03 3:25 Kent Overstreet
2023-09-05 13:24 ` Christoph Hellwig
2023-09-06 0:00 ` Kent Overstreet
2023-09-06 0:41 ` Matthew Wilcox
2023-09-06 16:10 ` Kent Overstreet
2023-09-06 17:57 ` Darrick J. Wong
2023-09-08 9:37 ` Christoph Hellwig
2023-09-06 19:36 ` Linus Torvalds
2023-09-06 20:02 ` Linus Torvalds
2023-09-06 20:20 ` Linus Torvalds
2023-09-06 21:55 ` Arnaldo Carvalho de Melo
2023-09-06 23:13 ` David Sterba
2023-09-06 23:34 ` Linus Torvalds
2023-09-06 23:46 ` Arnaldo Carvalho de Melo
2023-09-06 23:53 ` Arnaldo Carvalho de Melo
2023-09-06 23:16 ` Linus Torvalds
2023-09-10 0:53 ` Kent Overstreet
2023-09-07 20:37 ` Kent Overstreet
2023-09-07 20:51 ` Linus Torvalds
2023-09-07 23:40 ` Kent Overstreet
2023-09-08 6:29 ` Martin Steigerwald
2023-09-08 9:11 ` Joshua Ashton
2023-09-06 22:28 ` Nathan Chancellor
2023-09-07 0:03 ` Kees Cook
2023-09-07 14:29 ` Chris Mason
2023-09-07 20:39 ` Kent Overstreet
2023-09-08 10:50 ` Brian Foster
2023-09-08 23:05 ` Dave Chinner
2024-11-15 20:35 Kent Overstreet
2024-11-18 0:54 ` Nathan Chancellor
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=20230706224314.u5zbeld23uqur2ct@moria.home.lan \
--to=kent.overstreet@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=andreas.gruenbacher@gmail.com \
--cc=bfoster@redhat.com \
--cc=brauner@kernel.org \
--cc=dchinner@redhat.com \
--cc=dhowells@redhat.com \
--cc=djwong@kernel.org \
--cc=jack@suse.cz \
--cc=josef@toxicpanda.com \
--cc=linux-bcachefs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=sandeen@redhat.com \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
--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;
as well as URLs for NNTP newsgroup(s).