Date: Fri, 10 Aug 2018 09:16:26 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Rick Macklem <rmacklem@uoguelph.ca> Cc: "freebsd-current@FreeBSD.org" <freebsd-current@FreeBSD.org>, peter@holm.cc Subject: Re: ffs_truncate3 panics Message-ID: <20180810061626.GB2649@kib.kiev.ua> In-Reply-To: <YTOPR0101MB182067FF6F908E0B2EBAE3D1DD250@YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM> References: <YTOPR0101MB18206289DDED97BE9DD38D14DD270@YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM> <20180807131445.GC1884@kib.kiev.ua> <YTOPR0101MB18207C97903D3058A15091FFDD260@YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM> <20180808221647.GH1884@kib.kiev.ua> <YTOPR0101MB18205CDE34ABCC2345C3F172DD250@YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM> <20180809111004.GK1884@kib.kiev.ua> <YTOPR0101MB182067FF6F908E0B2EBAE3D1DD250@YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 09, 2018 at 08:38:50PM +0000, Rick Macklem wrote: > I did notice that my code locks the vnode first and then calls vn_start_write() > for the vn_extattr_set() calls, whereas the syscall code locks the vnode after the vn_start_write() call. > > Does that matter? Yes, it matter. It would cause deadlocks when corresponding filesystem is suspended in parallel with NFSD activities. vn_start_write() is a lock, and the correct lock order is vn_start_write()->vnode lock.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180810061626.GB2649>