From patchwork Tue Aug 8 05:49:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 9886621 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B534D60384 for ; Tue, 8 Aug 2017 05:50:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F31E28746 for ; Tue, 8 Aug 2017 05:50:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93D72287A2; Tue, 8 Aug 2017 05:50:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C90C28746 for ; Tue, 8 Aug 2017 05:50:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751891AbdHHFuL (ORCPT ); Tue, 8 Aug 2017 01:50:11 -0400 Received: from mx2.suse.de ([195.135.220.15]:41808 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750736AbdHHFuK (ORCPT ); Tue, 8 Aug 2017 01:50:10 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "Cc" Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 33509ADCB; Tue, 8 Aug 2017 05:50:09 +0000 (UTC) From: NeilBrown To: mtk.manpages@gmail.com Date: Tue, 08 Aug 2017 15:49:58 +1000 Cc: systemd-devel@freedesktop.org Subject: [PATCH manpages] umount.2: revise MNT_FORCE description. cc: linux-man@vger.kernel.org, linux-fsdevel@vger.kernel.org Message-ID: <87mv7asj5l.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP MNT_FORCE does not allow a busy filesystem to be unmounted. Only MNT_DETACH allows that. MNT_FORCE only tries to abort pending transactions, in the hope that might help umount not to block, Also, other filesystems than NFS support MNT_FORCE. Signed-off-by: NeilBrown --- Explanation derived from examination of source code. Cc to systemd devel in relation to comment I just posted: https://github.com/systemd/systemd/commit/0c08f5cde749bd2818475e487109cd0d413452df You may want to move the "linux version when support was added" to a comment, or discard it. man2/umount.2 | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/man2/umount.2 b/man2/umount.2 index 68f76b7c6352..ccd1d07afe88 100644 --- a/man2/umount.2 +++ b/man2/umount.2 @@ -61,9 +61,17 @@ unmounts a target, but allows additional controlling the behavior of the operation: .TP .BR MNT_FORCE " (since Linux 2.1.116)" -Force unmount even if busy. -This can cause data loss. -(Only for NFS mounts.) +Ask the filesystem to abort pending requests before attempting the +unmount. This may allow the unmount to complete without waiting +for an inaccessible server. If, after aborting requests, some +processes still have active references to the filesystem, the +unmount will still fail. In Linux 4.12, only the filesystems +9p (2.6.16), +ceph (2.6.34), +cifs (2.6.12), +fuse (2.6.16), +lustre (3.11), +and NFS (2.1.116) respond to MNT_FORCE. .TP .BR MNT_DETACH " (since Linux 2.4.11)" Perform a lazy unmount: make the mount point unavailable for new