Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jan 2016 23:25:16 -0500 (EST)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        FreeBSD Filesystems <freebsd-fs@freebsd.org>,  Kirk McKusick <mckusick@mckusick.com>
Subject:   Re: panic ffs_truncate3 (maybe fuse being evil)
Message-ID:  <855760730.165482737.1453177516248.JavaMail.zimbra@uoguelph.ca>
In-Reply-To: <20160117035858.GO3942@kib.kiev.ua>
References:  <1696608910.154845456.1452438117036.JavaMail.zimbra@uoguelph.ca> <20160114092934.GL72455@kib.kiev.ua> <964333498.161527381.1452827658163.JavaMail.zimbra@uoguelph.ca> <20160115095749.GC3942@kib.kiev.ua> <1817287612.162823118.1452909605928.JavaMail.zimbra@uoguelph.ca> <20160116191116.GI3942@kib.kiev.ua> <853868666.163292727.1452986431921.JavaMail.zimbra@uoguelph.ca> <20160117035858.GO3942@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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);
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?855760730.165482737.1453177516248.JavaMail.zimbra>