From 89a577e7b418e8029e0ca74c20fd14276cc79e61 Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 9 Feb 2005 23:05:20 +0000 Subject: - In the softupdates case for ffs_truncate() we use vinvalbuf() to invalidate pending io and dependencies. However, vinvalbuf() rightfully does not call vnode_pager_setsize() for us. We must do this here. This could potentially have caused numerous kinds of bugs, but it was specifically causing msync() deadlocks because msync() was writing flushing pages that should not have been valid. Sponsored by: Isilon Systems, Inc. Reported by: kkenn --- sys/ufs/ffs/ffs_inode.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/ufs') diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index b2045ed..50c20ca 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -278,6 +278,7 @@ ffs_truncate(vp, length, flags, cred, td) softdep_setup_freeblocks(oip, length, needextclean ? IO_EXT | IO_NORMAL : IO_NORMAL); vinvalbuf(ovp, needextclean ? 0 : V_NORMAL, td, 0, 0); + vnode_pager_setsize(vp, 0); oip->i_flag |= IN_CHANGE | IN_UPDATE; return (ffs_update(ovp, 0)); } -- cgit v1.1