From owner-freebsd-fs@FreeBSD.ORG Tue Oct 11 02:13:01 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 D17E6106566B; Tue, 11 Oct 2011 02:13:01 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 59E238FC15; Tue, 11 Oct 2011 02:13:01 +0000 (UTC) Received: by qadz30 with SMTP id z30so5814432qad.13 for ; Mon, 10 Oct 2011 19:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=JZWmbECoIkXLEDS3bE4fyMD1sG50GLC7KIb+Ebyqka8=; b=NgIzUjTsrK48S9n5JtMMpjA3a3ZE6rgH+3IOPnxngzCyX7So+5+IdBFZscI8yTEmN3 tugQKMAx6jfvw7usrSA5P4+rTrId93B0wlQrRZ0Y+1EwPbj3lvd93kAN1OkwmdT52sax XeY/EsfwtnwxOolYrCSUzf4oTYRB33RC2c8SU= MIME-Version: 1.0 Received: by 10.224.213.2 with SMTP id gu2mr8661079qab.85.1318299180454; Mon, 10 Oct 2011 19:13:00 -0700 (PDT) Received: by 10.224.74.82 with HTTP; Mon, 10 Oct 2011 19:12:59 -0700 (PDT) In-Reply-To: <20111010093543.GV1511@deviant.kiev.zoral.com.ua> References: <201110012137.p91Lb6FI093841@chez.mckusick.com> <20111010093543.GV1511@deviant.kiev.zoral.com.ua> Date: Mon, 10 Oct 2011 19:12:59 -0700 Message-ID: From: Garrett Cooper To: Kostik Belousov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Kirk McKusick , 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 02:13:02 -0000 2011/10/10 Kostik Belousov : > On Sun, Oct 09, 2011 at 03:37:22PM -0700, Garrett Cooper wrote: >> On Sun, Oct 9, 2011 at 3:22 PM, Garrett Cooper wrot= e: >> > On Sat, Oct 1, 2011 at 2:37 PM, Kirk McKusick = wrote: >> >>> Date: Sat, 1 Oct 2011 12:44:04 -0700 >> >>> Subject: Re: Need to force sync(2) before umounting UFS1 filesystems= ? >> >>> From: Garrett Cooper >> >>> To: Attilio Rao >> >>> Cc: Kostik Belousov , >> >>> =A0 =A0 =A0 =A0 Kirk McKusick , freebsd-fs@fr= eebsd.org, >> >>> =A0 =A0 =A0 =A0 Xin LI >> >>> >> >>> Ok. Now that I know this is the direction you guys want to go, I'll >> >>> start testing the change. >> >> >> >> Thanks for throwing some testing at this. Please test my latest >> >> proposed change (included below so you do not have to dig through >> >> earlier email) as I believe that it has the least likelyhood of >> >> problems and is what I am currently proposing to put in. >> > >> > I apologize for not getting this done sooner. It passes a smoke test >> > with the following filesystems: >> > >> > nfs >> > nullfs >> > smbfs >> > unionfs >> > ufs >> > zfs >> > >> > I'll be running more extensive stress tests soon, but it looks like a >> > good step forward. >> >> Forgot to note: my FreeNAS builds nanobsd no longer fail with the >> attached patch after I remove my sync hacks :). > > 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 (block= ed). 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