Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 May 2016 21:28:28 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300082 - head/sys/ufs/ufs
Message-ID:  <201605172128.u4HLSSYe093263@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Tue May 17 21:28:28 2016
New Revision: 300082
URL: https://svnweb.freebsd.org/changeset/base/300082

Log:
  For async UFS mounts, shrink the directory asynchronously, at least do
  not pass IO_SYNC to ffs_truncate() unneccessary.
  
  Submitted by:	bde
  MFC after:	1 week

Modified:
  head/sys/ufs/ufs/ufs_lookup.c

Modified: head/sys/ufs/ufs/ufs_lookup.c
==============================================================================
--- head/sys/ufs/ufs/ufs_lookup.c	Tue May 17 21:25:20 2016	(r300081)
+++ head/sys/ufs/ufs/ufs_lookup.c	Tue May 17 21:28:28 2016	(r300082)
@@ -1131,7 +1131,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir
 		if (tvp != NULL)
 			VOP_UNLOCK(tvp, 0);
 		error = UFS_TRUNCATE(dvp, (off_t)dp->i_endoff,
-		    IO_NORMAL | IO_SYNC, cr);
+		    IO_NORMAL | (DOINGASYNC(dvp) ? 0 : IO_SYNC), cr);
 		if (error != 0)
 			vprint("ufs_direnter: failed to truncate", dvp);
 #ifdef UFS_DIRHASH



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605172128.u4HLSSYe093263>