Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 May 2012 16:45:41 +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: r236322 - head/sys/ufs/ffs
Message-ID:  <201205301645.q4UGjfwB063073@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Wed May 30 16:45:41 2012
New Revision: 236322
URL: http://svn.freebsd.org/changeset/base/236322

Log:
  Enable vn_io_fault() lock avoidance for UFS.
  
  Tested by:	pho
  MFC after:	2 months

Modified:
  head/sys/ufs/ffs/ffs_vfsops.c
  head/sys/ufs/ffs/ffs_vnops.c

Modified: head/sys/ufs/ffs/ffs_vfsops.c
==============================================================================
--- head/sys/ufs/ffs/ffs_vfsops.c	Wed May 30 16:42:08 2012	(r236321)
+++ head/sys/ufs/ffs/ffs_vfsops.c	Wed May 30 16:45:41 2012	(r236322)
@@ -1064,7 +1064,7 @@ ffs_mountfs(devvp, mp, td)
 	 */
 	MNT_ILOCK(mp);
 	mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED |
-	    MNTK_EXTENDED_SHARED;
+	    MNTK_EXTENDED_SHARED | MNTK_NO_IOPF;
 	MNT_IUNLOCK(mp);
 #ifdef UFS_EXTATTR
 #ifdef UFS_EXTATTR_AUTOSTART

Modified: head/sys/ufs/ffs/ffs_vnops.c
==============================================================================
--- head/sys/ufs/ffs/ffs_vnops.c	Wed May 30 16:42:08 2012	(r236321)
+++ head/sys/ufs/ffs/ffs_vnops.c	Wed May 30 16:45:41 2012	(r236322)
@@ -567,7 +567,7 @@ ffs_read(ap)
 			xfersize = size;
 		}
 
-		error = uiomove((char *)bp->b_data + blkoffset,
+		error = vn_io_fault_uiomove((char *)bp->b_data + blkoffset,
 		    (int)xfersize, uio);
 		if (error)
 			break;
@@ -738,8 +738,8 @@ ffs_write(ap)
 		if (size < xfersize)
 			xfersize = size;
 
-		error =
-		    uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio);
+		error = vn_io_fault_uiomove((char *)bp->b_data + blkoffset,
+		    (int)xfersize, uio);
 		/*
 		 * If the buffer is not already filled and we encounter an
 		 * error while trying to fill it, we have to clear out any



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