From owner-freebsd-fs@FreeBSD.ORG Tue Oct 11 07:56:49 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6970E1065676; Tue, 11 Oct 2011 07:56:49 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (chez.mckusick.com [70.36.157.235]) by mx1.freebsd.org (Postfix) with ESMTP id 2C3D88FC16; Tue, 11 Oct 2011 07:56:49 +0000 (UTC) Received: from chez.mckusick.com (localhost [127.0.0.1]) by chez.mckusick.com (8.14.3/8.14.3) with ESMTP id p9B7ul0g051037; Tue, 11 Oct 2011 00:56:47 -0700 (PDT) (envelope-from mckusick@chez.mckusick.com) Message-Id: <201110110756.p9B7ul0g051037@chez.mckusick.com> To: Garrett Cooper In-reply-to: Date: Tue, 11 Oct 2011 00:56:47 -0700 From: Kirk McKusick X-Spam-Status: No, score=0.0 required=5.0 tests=MISSING_MID, UNPARSEABLE_RELAY autolearn=failed version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on chez.mckusick.com Cc: Attilio Rao , Xin LI , freebsd-fs@freebsd.org Subject: Re: Need to force sync(2) before umounting UFS1 filesystems? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Oct 2011 07:56:49 -0000 > Date: Mon, 10 Oct 2011 19:12:59 -0700 > From: Garrett Cooper > To: Kostik Belousov > Cc: Kirk McKusick , Attilio Rao , > Xin LI , freebsd-fs@freebsd.org > Subject: Re: Need to force sync(2) before umounting UFS1 filesystems? > > 2011/10/10 Kostik Belousov : > > > The real case to test is the NFS mount which is wedged due to > > hung/unresponsive NFS server. I have high suspect that the patch > > could introduce the unkillable hung unmount process. > > It blocked, but I could ^C it perfectly fine. I tested it via: > > Setup: > 1. Started up FreeNAS 8.x image; it acquired an IP from my server with > dhcp-75.local. > > Test 1: > 1. mount -t nfs dhcp-75:/mnt/tank /mnt/nfs/ from my test workstation. > 2. Paused VM. > 3. umount /mnt/nfs (the command blocked). > 4. ^C. > 5. mount | grep /mnt/nfs showed nothing (it had unmounted). > > Test 2: > 1. mount -t nfs dhcp-75:/mnt/tank /mnt/nfs/ from my test workstation (blocked). > 2. Opened up another ssh session and cd'ed to /mnt/nfs . > 3. Paused VM. > 4. umount /mnt/nfs . It failed with EBUSY. > 5. mount | grep /mnt/nfs showed that it was still mounted, as expected. > > So unless there are buffers still waiting to be written out to an > NFS share, or other reasons that would prevent the NFS share from > being fully released, I doubt the proposed behavior is really > different from previous versions of FreeBSD. > Thanks, > -Garrett Given the testing that has been done and our discussion about deadlocks, I believe that I should proceed to check in my originally proposed change. Notably the one that simply deleted the != MNT_FORCE conditional. However, there is no harm in using my revised version that releases the covered vnode before draining vfs_busy, and there might be some future case where that would be a necessary thing to do. Speak up if you think I should not proceed to check in this change. Also, let me know if you have thoughts on which version I should use. Kirk McKusick