From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f42.google.com ([209.85.215.42]:34037 "EHLO mail-lf0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751380AbcCZMIA (ORCPT ); Sat, 26 Mar 2016 08:08:00 -0400 Received: by mail-lf0-f42.google.com with SMTP id c62so64864956lfc.1 for ; Sat, 26 Mar 2016 05:07:59 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20160326043041.GO17997@ZenIV.linux.org.uk> References: <20160311214745.GT17997@ZenIV.linux.org.uk> <20160326002116.GK17997@ZenIV.linux.org.uk> <20160326010140.GN17997@ZenIV.linux.org.uk> <20160326043041.GO17997@ZenIV.linux.org.uk> Date: Sat, 26 Mar 2016 08:07:58 -0400 Message-ID: Subject: Re: Orangefs, v4.5 and the merge window... From: Mike Marshall To: Al Viro Cc: Linus Torvalds , Martin Brandenburg , linux-fsdevel , Mike Marshall Content-Type: text/plain; charset=UTF-8 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Yay, Al, that did it, thanks! I've tested, and updated the for-next branch at kernel.org... Linus, if it is not too late, can you pull from: git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux.git for-next -Mike On Sat, Mar 26, 2016 at 12:30 AM, Al Viro wrote: > 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));