- 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
This commit is contained in:
jeff 2005-02-09 23:05:20 +00:00
parent 41cf4e19b2
commit 89a577e7b4

View File

@ -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));
}