From owner-freebsd-fs@FreeBSD.ORG Thu Sep 29 15:39: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 E4F7E106564A; Thu, 29 Sep 2011 15:39:00 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7AF2B8FC08; Thu, 29 Sep 2011 15:39:00 +0000 (UTC) Received: by qyk4 with SMTP id 4so1074208qyk.13 for ; Thu, 29 Sep 2011 08:38:59 -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=sGLdW508RBabRkHp4rwYAs0pkFQfvlgshmMuQTBoG/0=; b=rkDnuyuE93Dbuq7c+8Rl227zFi1VuM4gvGRnAbXo+4LffgtTbqFaUQvwnnVDB6NWx6 M01UM3s2fnYVzUXA9Hkv3NpFPIvP2258CQ03aFNEA+OStlDf2PfhEC8NuY9Mb8B29h7P kJI/MDOvOk+VH+wv2Gwl4zG5R+64LJF/NTkeA= MIME-Version: 1.0 Received: by 10.224.217.137 with SMTP id hm9mr8098428qab.124.1317310739648; Thu, 29 Sep 2011 08:38:59 -0700 (PDT) Received: by 10.224.74.82 with HTTP; Thu, 29 Sep 2011 08:38:59 -0700 (PDT) In-Reply-To: <201109291531.p8TFVRka077669@chez.mckusick.com> References: <201109291531.p8TFVRka077669@chez.mckusick.com> Date: Thu, 29 Sep 2011 08:38:59 -0700 Message-ID: From: Garrett Cooper To: Kirk McKusick Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Attilio Rao , freebsd-fs@freebsd.org, Xin LI 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: Thu, 29 Sep 2011 15:39:01 -0000 On Thu, Sep 29, 2011 at 8:31 AM, Kirk McKusick wrot= e: >> Date: Thu, 29 Sep 2011 12:04:24 +0200 >> From: Attilio Rao >> To: Kirk McKusick >> Cc: Garrett Cooper , freebsd-fs@freebsd.org, >> =A0 =A0 =A0 =A0 Xin LI >> Subject: Re: Need to force sync(2) before umounting UFS1 filesystems? >> >> 2011/9/29 Kirk McKusick : >> > Hi Attilio, >> > >> > I have been looking into the problem described below and since you >> > appear to be the person that put in the change in question, I would >> > like to get you opinion on what (if anything) should be changed here. >> >> Kirk, >> please note that I didn't add/change anything wrt. that codepath. >> >> In the old code it was present a lockmgr() acquisition with LK_DRAIN >> and LK_NOWAIT. This means that if the lockmgr() lock on the struct >> mount was already held by any other consumer it was going to fallback >> in the codepath you outlined in the patch immediately, rather than >> just sleeping (and note that LK_NOWAIT was just passed in the case of >> a non-forced unmount). >> >> Said that, I don't really have an objection with making the forced >> unmount case as the default, but I still didn't go through the whole >> thread you outlined and I don't have any context on it, thus I'm not >> sure if this is the right approach or not. >> >> If you want to share more context on the problem you are trying to >> solve by switching that policy we may discuss this too, but in general >> I don't have a problem about adopting forced unmount policy on unmount >> for all the cases. >> >> Attilio >> -- >> Peace can only be achieved by understanding - A. Einstein > > Thanks for providing a bit more of the history on this codepath. > > Since 9-stable has now been branched, I believe that the best path > forward is to check this change into head and let it sit there for > several months so that we can get some experience with it. If it > causes folks problems we can back it out. If it does not cause > problems, then we can MFC it to 9-stable. > > Does this seem like a reasonable approach? I'll give it a quick run through first on some machines this weekend, with NFS, UFS, and ZFS. It seems like this could negatively affect a number of users, so I want to make sure that it passes a smoke test before committing directly to HEAD. Thanks! -Garrett