diff options
author | jeff <jeff@FreeBSD.org> | 2005-02-09 23:05:20 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2005-02-09 23:05:20 +0000 |
commit | 89a577e7b418e8029e0ca74c20fd14276cc79e61 (patch) | |
tree | e27d16b2e78cb0719edc7dcc3b84f480248b14ea | |
parent | 41cf4e19b2dc88a4f8c2be0d404c1d83f94f03fd (diff) | |
download | FreeBSD-src-89a577e7b418e8029e0ca74c20fd14276cc79e61.zip FreeBSD-src-89a577e7b418e8029e0ca74c20fd14276cc79e61.tar.gz |
- 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
-rw-r--r-- | sys/ufs/ffs/ffs_inode.c | 1 |
1 files changed, 1 insertions, 0 deletions
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)); } |