From kostikbel@gmail.com  Thu Sep 29 02:03:56 2011
Return-Path: <kostikbel@gmail.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3982D1065785
	for <bug-followup@freebsd.org>; Thu, 29 Sep 2011 02:03:56 +0000 (UTC)
	(envelope-from kostikbel@gmail.com)
Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200])
	by mx1.freebsd.org (Postfix) with ESMTP id CBB4F8FC15
	for <bug-followup@freebsd.org>; Thu, 29 Sep 2011 02:03:55 +0000 (UTC)
Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p8T1aZVY088478
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 29 Sep 2011 04:36:35 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: from alf.home (kostik@localhost [127.0.0.1])
	by alf.home (8.14.5/8.14.5) with ESMTP id p8T1aZPm050811;
	Thu, 29 Sep 2011 04:36:35 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by alf.home (8.14.5/8.14.5/Submit) id p8T1aZUG050810;
	Thu, 29 Sep 2011 04:36:35 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Message-Id: <20110929013635.GG1511@deviant.kiev.zoral.com.ua>
Date: Thu, 29 Sep 2011 04:36:35 +0300
From: Kostik Belousov <kostikbel@gmail.com>
To: Kirk McKusick <mckusick@mckusick.com>
Cc: Garrett Cooper <yanegomi@gmail.com>, freebsd-fs@freebsd.org,
        Xin LI <delphij@freebsd.org>, bug-followup@freebsd.org
In-Reply-To: <201109280019.p8S0JVUW067163@chez.mckusick.com>
Subject: Re: PR kern/161016 Need to force sync(2) before umounting UFS1 filesystems?
References: <CAGH67wSvpmdmCFKxAsgLD5cGc=WcYpX=dXBkhqkePNxVNjR4=g@mail.gmail.com> <201109280019.p8S0JVUW067163@chez.mckusick.com>

>Number:         161115
>Category:       kern
>Synopsis:       Re: kern/161016: Need to force sync(2) before umounting UFS1 filesystems?
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 29 02:10:08 UTC 2011
>Closed-Date:    Wed Oct 05 05:02:11 UTC 2011
>Last-Modified:  Wed Oct 05 05:02:11 UTC 2011
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
 --ssSfcPohcXNs3135
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 >=20
 > The things to check for are:
 >=20
 > 1) That it fixes the EBUSY on unmount.
 >=20
 > 2) That it does not cause unmount to hang.
 >=20
 > I would appreciate feedback as to whether this fix helps.
 
 I think the item 2) should be tested mostly on the hung NFS server.
 
 I understand what you are doing, you do not want a transient mount point
 busy caller to fail the unmount. But my belief is that this is the
 intended mode of operation for non-forced unmounts.
 
 As I compare the original bug report and your change, the reason that
 UFS gives spurious EBUSY on soft unmounts is that SU code busies mp
 around some processing. Is my guess right ? Then, restoring some amount
 of sync(2) before the unmount would be useful, please see r222466 for
 the most likely reason why the issue appeared.
 
 Might be, the best route would be to add a kludge mnt_flag that request
 dounmount() to do a VFS_SYNC() before checking for the busy holder ?
 
 
 --ssSfcPohcXNs3135
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (FreeBSD)
 
 iEYEARECAAYFAk6Dy6MACgkQC3+MBN1Mb4hhwQCgzuj/4OgfYVYgROYIjridzOs5
 wooAnje938vnGjgW9UincSwhn0+Sj7Fq
 =4iJ6
 -----END PGP SIGNATURE-----
 
 --ssSfcPohcXNs3135--
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Wed Oct 5 05:00:03 UTC 2011 
State-Changed-Why:  
Misfiled followup to kern/161016; content migrated. 


Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Oct 5 05:00:03 UTC 2011 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=161115 
>Unformatted:
