Submit #2469
closed[PATCH] kernel -- ffs: Soft updates getdirtybuf/flush_pagedep_deps panic fix
0%
Description
If getdirtybuf() was unable to lookup a dirty buffer from the
flush_pagedep_deps path, we need to retry the lookup, rather than
proceeding through processing the diradd.
Reported-by: marino@
---
sys/vfs/ufs/ffs_softdep.c | 3 ++
1 file changed, 3 insertions()
diff --git a/sys/vfs/ufs/ffs_softdep.c b/sys/vfs/ufs/ffs_softdep.c
index b6a8cbf..d8a91f6 100644
--- a/sys/vfs/ufs/ffs_softdep.c
+++ b/sys/vfs/ufs/ffs_softdep.c@ -4593,6 +4593,7
@ flush_pagedep_deps(struct vnode *pvp, struct mount *mp,
* locate that buffer, ensure that there will be no rollback
* caused by a bitmap dependency, then write the inode buffer.
*/
retry_lookup:
if (inodedep_lookup(ump->um_fs, inum, 0, &inodedep) 0) {
panic("flush_pagedep_deps: lost inode");
}@ -4602,6 +4603,8
@ flush_pagedep_deps(struct vnode *pvp, struct mount *mp,
*/
if ((inodedep->id_state & DEPCOMPLETE) 0) {
gotit = getdirtybuf(&inodedep->id_buf, MNT_WAIT);
if (gotit == 0)
+ goto retry_lookup;
FREE_LOCK(&lk);
if (gotit && (error = bwrite(inodedep->id_buf)) != 0)
break;
--
1.7.12.1.382.gb0576a6
--
-- vs