panic ffs_truncate3 (maybe fuse being evil)

Rick Macklem rmacklem at uoguelph.ca
Tue Jan 19 04:25:24 UTC 2016


Kostik wrote:
> 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.
> 
Still happens. I put the old panic test in, but with a printf() instead
of panic() and the printf() happens with this patch.
Btw, whenever I've looked, the entry is on the clean list.
No other panics happen and the file system fsck's fine after the test run.

rick

> 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