From yanegomi@gmail.com  Thu Sep 29 02:19:54 2011
Return-Path: <yanegomi@gmail.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 16A65106564A;
	Thu, 29 Sep 2011 02:19:54 +0000 (UTC)
	(envelope-from yanegomi@gmail.com)
Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175])
	by mx1.freebsd.org (Postfix) with ESMTP id 90BE48FC1A;
	Thu, 29 Sep 2011 02:19:53 +0000 (UTC)
Received: by qyk10 with SMTP id 10so3403735qyk.13
        for <multiple recipients>; Wed, 28 Sep 2011 19:19:52 -0700 (PDT)
Received: by 10.224.217.137 with SMTP id hm9mr7564312qab.124.1317262792677;
 Wed, 28 Sep 2011 19:19:52 -0700 (PDT)
Received: by 10.224.74.82 with HTTP; Wed, 28 Sep 2011 19:19:52 -0700 (PDT)
Message-Id: <CAGH67wR4CcOuM8xKZMAX6uaZyanTt726Z7uey_i7KM00EG++tA@mail.gmail.com>
Date: Wed, 28 Sep 2011 19:19:52 -0700
From: Garrett Cooper <yanegomi@gmail.com>
To: Kostik Belousov <kostikbel@gmail.com>
Cc: Kirk McKusick <mckusick@mckusick.com>, freebsd-fs@freebsd.org, 
	Xin LI <delphij@freebsd.org>, bug-followup@freebsd.org
In-Reply-To: <20110929013635.GG1511@deviant.kiev.zoral.com.ua>
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>
	<20110929013635.GG1511@deviant.kiev.zoral.com.ua>

>Number:         161116
>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:20:11 UTC 2011
>Closed-Date:    Wed Oct 05 05:03:13 UTC 2011
>Last-Modified:  Wed Oct 05 05:03:13 UTC 2011
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
 > 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 ?
 
 This would undo some of the changes attillio added for the locking
 stuff in r184554. Not sure what the prior behavior was because I only
 traced back the change a little bit.
 Thanks,
 -Garrett
 
 1. http://svnweb.freebsd.org/base/head/sys/kern/vfs_mount.c?revision=3D1845=
 54&view=3Dmarkup
>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=161116 
>Unformatted:
