From: Al Viro <viro@ZenIV.linux.org.uk>
To: Mike Marshall <hubcap@omnibond.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Martin Brandenburg <martin@omnibond.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: Orangefs, v4.5 and the merge window...
Date: Sat, 26 Mar 2016 04:30:41 +0000 [thread overview]
Message-ID: <20160326043041.GO17997@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CAOg9mSS9+yDy-+hyjbbiS0KwuU-pwa5kdn_Bu-OAJ+i4WiF3Dg@mail.gmail.com>
On Fri, Mar 25, 2016 at 11:55:31PM -0400, Mike Marshall wrote:
> I'll look to see if I can see it, I guess it has something to
> do with Al's superblock re-do...
It does; with this approach you would need to add ORANGEFS_VFS_OP_FS_UNMOUNT
to the whitelist in orangefs_devreq_read() - the
!(op->upcall.type ==
ORANGEFS_VFS_OP_FS_MOUNT ||
op->upcall.type ==
ORANGEFS_VFS_OP_GETATTR)) {
thing. Sorry, should've thought about that...
Alternatively, we could do orangefs_unmount_sb(sb) before removing from
the list, and add mutex_lock/mutex_unlock of request_mutex right before
that kfree() in the very end. Same effect in terms of list protection and
closer to your current logics.
Try this incremental (to be folded into "fix orangefs_superblock locking"):
diff --git a/fs/orangefs/super.c b/fs/orangefs/super.c
index bf78870..bb3dc14 100644
--- a/fs/orangefs/super.c
+++ b/fs/orangefs/super.c
@@ -514,6 +514,12 @@ void orangefs_kill_sb(struct super_block *sb)
/* provided sb cleanup */
kill_anon_super(sb);
+ /*
+ * issue the unmount to userspace to tell it to remove the
+ * dynamic mount info it has for this superblock
+ */
+ orangefs_unmount_sb(sb);
+
/* remove the sb from our list of orangefs specific sb's */
spin_lock(&orangefs_superblocks_lock);
@@ -522,10 +528,11 @@ void orangefs_kill_sb(struct super_block *sb)
spin_unlock(&orangefs_superblocks_lock);
/*
- * issue the unmount to userspace to tell it to remove the
- * dynamic mount info it has for this superblock
+ * make sure that ORANGEFS_DEV_REMOUNT_ALL loop that might've seen us
+ * gets completed before we free the damn thing.
*/
- orangefs_unmount_sb(sb);
+ mutex_lock(&request_mutex);
+ mutex_unlock(&request_mutex);
/* free the orangefs superblock private data */
kfree(ORANGEFS_SB(sb));
next prev parent reply other threads:[~2016-03-26 4:30 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-11 20:18 Orangefs, v4.5 and the merge window Mike Marshall
2016-03-11 21:47 ` Al Viro
2016-03-11 22:35 ` Mike Marshall
2016-03-14 21:03 ` Mike Marshall
2016-03-26 0:21 ` Al Viro
2016-03-26 1:00 ` Mike Marshall
[not found] ` <CA+55aFzLC_pdj_ds82YYab5D7jpYMj26s0Frofxxhk=j7SqnjA@mail.gmail.com>
2016-03-26 1:01 ` Al Viro
2016-03-26 1:07 ` Mike Marshall
[not found] ` <CA+55aFysWS9mP+QgfAR6LZpEbkp61MUPQu0zDoq7cafmr3M8SA@mail.gmail.com>
2016-03-26 3:55 ` Mike Marshall
2016-03-26 4:30 ` Al Viro [this message]
2016-03-26 12:07 ` Mike Marshall
2016-03-26 14:47 ` Al Viro
2016-03-26 15:34 ` Mike Marshall
2016-03-26 15:50 ` Al Viro
2016-03-26 17:36 ` Mike Marshall
2016-03-26 18:28 ` Al Viro
2016-03-26 18:37 ` Al Viro
2016-03-26 19:00 ` Mike Marshall
2016-03-26 19:51 ` Linus Torvalds
2016-03-26 20:47 ` Mike Marshall
2016-03-26 21:00 ` Linus Torvalds
2016-03-26 1:02 ` Mike Marshall
2016-03-15 4:04 ` Martin Brandenburg
2016-03-15 16:45 ` Martin Brandenburg
2016-03-17 20:45 ` [PATCH] orangefs: getattr work (was: Re: Orangefs, v4.5 and the merge window...) Martin Brandenburg
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=20160326043041.GO17997@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=hubcap@omnibond.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=martin@omnibond.com \
--cc=torvalds@linux-foundation.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).