From b569050a78847d61f00b276e8f1bdb113eaef662 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Wed, 30 May 2012 16:45:41 +0000 Subject: [PATCH] Enable vn_io_fault() lock avoidance for UFS. Tested by: pho MFC after: 2 months --- sys/ufs/ffs/ffs_vfsops.c | 2 +- sys/ufs/ffs/ffs_vnops.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 9aff694e83fc..fee8012973f3 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -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 diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 0699eef37b8e..6259911b8392 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -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