From owner-freebsd-fs@freebsd.org Tue Jan 19 04:25:24 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E42F1A867CB for ; Tue, 19 Jan 2016 04:25:23 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.net.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id A3797106D for ; Tue, 19 Jan 2016 04:25:23 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) IronPort-PHdr: 9a23:gwu8pxe7KGIUFn1oeL6X+M1JlGMj4u6mDksu8pMizoh2WeGdxc6yZh7h7PlgxGXEQZ/co6odzbGG7eaxBidfut6oizMrTt9lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUiv2OQc9HOnpAIma153xjLDsvcyMKFoTzBOGIppMbzyO5T3LsccXhYYwYo0Q8TDu5kVyRuJN2GlzLkiSlRuvru25/Zpk7jgC86l5r50IeezAcq85Vb1VCig9eyBwvZWz9EqLcQzaxXwaSXkflAZJBUDv4RX9Q4z2rGOute1mxCiZN8DyZb8xUDWmqaxsTUm7pj0AMmsD8WrUwul5h6FfrRfp8wZ6yoXXZIyQHOd5cb7QecsaA2FICJUCHxddC5+xOtNcR9EKOvxV+syk/wMD X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2DOAQC4uZ1W/61jaINehH+IULNEAQ2BYoYPAoFyFAEBAQEBAQEBgQmCLYIHAQEBAwEjBFIFCwIBCA4KAgINGQICVwIEiCYIryOPfAEBAQEBAQEBAgEBAQEBAQEBG4EAhVWEf4d0gUkFjjmIYY89hESIX0SOFwIgAQFChCcghhqBCAEBAQ X-IronPort-AV: E=Sophos;i="5.22,315,1449550800"; d="scan'208";a="263496061" Received: from nipigon.cs.uoguelph.ca (HELO zcs1.mail.uoguelph.ca) ([131.104.99.173]) by esa-annu.net.uoguelph.ca with ESMTP; 18 Jan 2016 23:25:16 -0500 Received: from localhost (localhost [127.0.0.1]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id AC0DF15F55D; Mon, 18 Jan 2016 23:25:16 -0500 (EST) Received: from zcs1.mail.uoguelph.ca ([127.0.0.1]) by localhost (zcs1.mail.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 18zTPjdfjpkP; Mon, 18 Jan 2016 23:25:16 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id 5BCF215F565; Mon, 18 Jan 2016 23:25:16 -0500 (EST) X-Virus-Scanned: amavisd-new at zcs1.mail.uoguelph.ca Received: from zcs1.mail.uoguelph.ca ([127.0.0.1]) by localhost (zcs1.mail.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id cf6osFCIknyV; Mon, 18 Jan 2016 23:25:16 -0500 (EST) Received: from zcs1.mail.uoguelph.ca (zcs1.mail.uoguelph.ca [172.17.95.18]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id 43B0B15F55D; Mon, 18 Jan 2016 23:25:16 -0500 (EST) Date: Mon, 18 Jan 2016 23:25:16 -0500 (EST) From: Rick Macklem To: Konstantin Belousov Cc: FreeBSD Filesystems , Kirk McKusick 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> Subject: Re: panic ffs_truncate3 (maybe fuse being evil) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.95.10] X-Mailer: Zimbra 8.0.9_GA_6191 (ZimbraWebClient - FF43 (Win)/8.0.9_GA_6191) Thread-Topic: panic ffs_truncate3 (maybe fuse being evil) Thread-Index: J9p5e5CYpA4BYA2S5z+Ll5xyazdl9A== X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2016 04:25:24 -0000 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); >