panic ffs_truncate3 (maybe fuse being evil)

Konstantin Belousov kostikbel at gmail.com
Sun Jan 17 03:59:05 UTC 2016


On Sat, Jan 16, 2016 at 06:20:31PM -0500, Rick Macklem wrote:
> Kostik wrote:
> > Was IO_EXT flag passed to the ffs_truncate() invocation where the
> > assert ffs_truncate3 fired ?
> > 
> Yes. The only call to UFS_TRUNCATE() in ufs_inactive() specified both
> IO_EXT | IO_NORMAL.

Please try this.

diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
index 381f6f8..ecc3f9b 100644
--- a/sys/ufs/ffs/ffs_vnops.c
+++ b/sys/ufs/ffs/ffs_vnops.c
@@ -1313,7 +1313,8 @@ ffs_close_ea(struct vnode *vp, int commit, struct ucred *cred, struct thread *td
 		/* XXX: I'm not happy about truncating to zero size */
 		if (ip->i_ea_len < dp->di_extsize)
 			error = ffs_truncate(vp, 0, IO_EXT, cred);
-		error = ffs_extwrite(vp, &luio, IO_EXT | IO_SYNC, cred);
+		error = ffs_extwrite(vp, &luio, IO_EXT | IO_SYNC | IO_UNIT,
+		    cred);
 	}
 	if (--ip->i_ea_refs == 0) {
 		free(ip->i_ea_area, M_TEMP);


More information about the freebsd-fs mailing list