From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751885AbdIUOub (ORCPT ); Thu, 21 Sep 2017 10:50:31 -0400 Received: from imap.thunk.org ([74.207.234.97]:39038 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751669AbdIUOua (ORCPT ); Thu, 21 Sep 2017 10:50:30 -0400 Date: Thu, 21 Sep 2017 10:48:09 -0400 From: "Theodore Ts'o" To: Jaegeuk Kim Cc: Al Viro , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [PATCH v2] vfs: introduce UMOUNT_WAIT which waits for umount completion Message-ID: <20170921144809.wv6546fqtentm7vv@thunk.org> Mail-Followup-To: Theodore Ts'o , Jaegeuk Kim , Al Viro , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net References: <20170913200941.39420-1-jaegeuk@kernel.org> <20170920173831.GA7151@jaegeuk-macbookpro.roam.corp.google.com> <20170920183825.GD32076@ZenIV.linux.org.uk> <20170921003409.GA11365@jaegeuk-macbookpro.roam.corp.google.com> <20170921024251.GE32076@ZenIV.linux.org.uk> <20170921050237.GA28821@jaegeuk-macbookpro.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170921050237.GA28821@jaegeuk-macbookpro.roam.corp.google.com> User-Agent: NeoMutt/20170609 (1.8.3) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 20, 2017 at 10:02:37PM -0700, Jaegeuk Kim wrote: > > Yes, and actually, android retries umount(2) for several seconds, if it gets > failure. So, first I thought it'd be better to make umount() more deterministic. > > I'm not sure how many times we can retry and wait for this. IMHO, it'd be better > to use this together with the new flag, since this can detect unclosed namespace > given successful umount(2). Even if you could make umount wait for the binder deferred workqueue to exit, if it takes time, it takes time. And that's not the core VFS's fault. It's binder's. So... why not fix this by adding a binder ioctl which forces its workqueue to be flushed, and use that *before* you try calling mount? If that binder ioctl takes minutes or hours to complete, then that's a binder bug, and needs to be fixed in binder. - Ted