Fix livelock that could occur when snapshoting UFS with quotas, where
some quota limit was exceeded. Sequence of UFS_VALLOC()/UFS_VFREE() call there could cause inodeblock to have both freefile and inodedep dependencies without any inode in the block being marked for write. Then, softdep_check_suspend() would return EAGAIN forewer. Force write of inodeblock with allocated freefile softdependency by setting IN_MODIFIED flag in softdep_freefile and unconditionally calling UFS_UPDATE() in ufs_reclaim. Reported by: kris Debug help and tested by: Peter Holm Approved by: re (kensmith) MFC after: 3 weeks
This commit is contained in:
parent
68c35072f9
commit
d66ba37013
@ -2603,6 +2603,7 @@ softdep_freefile(pvp, ino, mode)
|
||||
}
|
||||
WORKLIST_INSERT(&inodedep->id_inowait, &freefile->fx_list);
|
||||
FREE_LOCK(&lk);
|
||||
ip->i_flag |= IN_MODIFIED;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -194,10 +194,9 @@ ufs_reclaim(ap)
|
||||
* Destroy the vm object and flush associated pages.
|
||||
*/
|
||||
vnode_destroy_vobject(vp);
|
||||
if (ip->i_flag & IN_LAZYMOD) {
|
||||
if (ip->i_flag & IN_LAZYMOD)
|
||||
ip->i_flag |= IN_MODIFIED;
|
||||
UFS_UPDATE(vp, 0);
|
||||
}
|
||||
UFS_UPDATE(vp, 0);
|
||||
/*
|
||||
* Remove the inode from its hash chain.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user