Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Aug 2018 12:08:33 +0000
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        "freebsd-current@FreeBSD.org" <freebsd-current@FreeBSD.org>, "peter@holm.cc" <peter@holm.cc>
Subject:   Re: ffs_truncate3 panics
Message-ID:  <YQBPR0101MB1809DDDB316CD25370B17774DD240@YQBPR0101MB1809.CANPRD01.PROD.OUTLOOK.COM>
In-Reply-To: <20180810061626.GB2649@kib.kiev.ua>
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>, <20180810061626.GB2649@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Konstantin Belousov wrote:
>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 vnod=
e 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.
Ok, thanks, I'll work on a patch to fix this LOR.

rick




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