From: Aleksa Sarai <asarai@suse.de>
To: Theodore Ts'o <tytso@mit.edu>,
"Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>,
"Dave Chinner" <david@fromorbit.com>,
"Михаил Гаврилов" <mikhail.v.gavrilov@gmail.com>,
"Christoph Hellwig" <hch@infradead.org>,
"Jan Blunck" <jblunck@infradead.org>,
linux-mm@kvack.org, "Oscar Salvador" <osalvador@suse.com>,
"Jan Kara" <jack@suse.cz>, "Hannes Reinecke" <hare@suse.de>,
linux-xfs@vger.kernel.org
Subject: Re: kernel BUG at fs/xfs/xfs_aops.c:853! in kernel 4.13 rc6
Date: Tue, 17 Oct 2017 11:59:50 +1100 [thread overview]
Message-ID: <c5bb6c1b-90c9-f50e-7283-af7e0de67caa@suse.de> (raw)
In-Reply-To: <20171016011301.dcam44qylno7rm6a@thunk.org>
>> Looking at the code it appears ext4, f2fs, and xfs shutdown path
>> implements revoking a bdev from a filesystem. Further if the ext4
>> implementation is anything to go by it looks like something we could
>> generalize into the vfs.
>
> There are two things which the current file system shutdown paths do.
> The first is that they prevent the file system from attempting to
> write to the bdev. That's all very file system specific, and can't be
> generalized into the VFS.
>
> The second thing they do is they cause system calls which might modify
> the file system to return an error. Currently operations that might
> result in _reads_ are not shutdown, so it's not a true revoke(2)
> functionality ala *BSD. I assume that's what you are talking about
> generalizing into the VFS. Personally, I would prefer to see us
> generalize something like vhangup() but which works on a file
> descriptor, not just a TTY. That it is, it disconnects the file
> descriptor entirely from the hardware / file system so in the case of
> the tty, it can be used by other login session, and in the case of the
> file descriptor belonging to a file system, it stops the file system
> from being unmounted
Presumably the fd would just be used to specify the backing store? I was
imagining doing it through an additional umount(2) flag but I guess that
having an fd open is probably better form.
I'm a little confused about whether this actually will solve the
original problem though, because it still requires the iteration over
/proc/**/mounts in order for userspace to finish the unmounts. I feel
like this is trying to generalise the idea behind luksSuspend -- am I
misunderstanding how this would solve the original issue? Is it the case
that if we "disconnect" at the file descriptor level, then the bdev is
no longer considered "used" and it can be operated on safely?
>> Ted, Aleksa would either of you be interested in generalizing what ext4,
>> f2fs, and xfs does now and working to put a good interface on it? I can
>> help especially with review but for the short term I am rather booked.
>
> Unfortunately, I have way too much travel coming up in the short term,
> so I probably won't have to take on a new project until at least
> mid-to-late-November at the earliest. Aleska, do you have time? I
> can consult on a design, but I have zero coding time for the next
> couple of weeks.
I can give it a shot, but a quick disclaimer that I'm not very familiar
with the VFS codebase so the review cycle will probably take a while. Oh
well, it's a good opportunity for me to learn more about it. :D
--
Aleksa Sarai
Snr. Software Engineer (Containers)
SUSE Linux GmbH
https://www.cyphar.com/
next prev parent reply other threads:[~2017-10-17 1:00 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-03 4:22 kernel BUG at fs/xfs/xfs_aops.c:853! in kernel 4.13 rc6 Михаил Гаврилов
2017-09-03 7:43 ` Christoph Hellwig
2017-09-03 14:08 ` Михаил Гаврилов
2017-09-04 12:30 ` Jan Kara
2017-10-07 8:10 ` Михаил Гаврилов
2017-10-07 9:22 ` Михаил Гаврилов
2017-10-09 0:05 ` Dave Chinner
2017-10-09 18:31 ` Luis R. Rodriguez
2017-10-09 19:02 ` Eric W. Biederman
2017-10-15 8:53 ` Aleksa Sarai
2017-10-15 13:06 ` Theodore Ts'o
2017-10-15 22:14 ` Eric W. Biederman
2017-10-15 23:22 ` Dave Chinner
2017-10-16 17:44 ` Eric W. Biederman
2017-10-16 21:38 ` Dave Chinner
2017-10-16 1:13 ` Theodore Ts'o
2017-10-16 17:53 ` Eric W. Biederman
2017-10-16 18:50 ` Theodore Ts'o
2017-10-16 22:00 ` Dave Chinner
2017-10-17 1:34 ` Theodore Ts'o
2017-10-17 0:59 ` Aleksa Sarai [this message]
2017-10-17 9:20 ` Jan Kara
2017-10-17 14:12 ` Theodore Ts'o
2017-11-06 19:25 ` Luis R. Rodriguez
2017-11-07 15:26 ` Jan Kara
2017-10-09 22:28 ` Dave Chinner
2017-10-10 7:57 ` Jan Kara
2017-09-04 1:43 ` Dave Chinner
2017-09-04 2:20 ` Darrick J. Wong
2017-09-04 12:14 ` Jan Kara
2017-09-04 22:36 ` Dave Chinner
2017-09-05 16:17 ` Jan Kara
2017-09-05 23:42 ` Dave Chinner
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=c5bb6c1b-90c9-f50e-7283-af7e0de67caa@suse.de \
--to=asarai@suse.de \
--cc=david@fromorbit.com \
--cc=ebiederm@xmission.com \
--cc=hare@suse.de \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=jblunck@infradead.org \
--cc=linux-mm@kvack.org \
--cc=linux-xfs@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=mikhail.v.gavrilov@gmail.com \
--cc=osalvador@suse.com \
--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).