From owner-freebsd-current@freebsd.org Fri Aug 10 12:08:36 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 239EF1068DD8 for ; Fri, 10 Aug 2018 12:08:36 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660074.outbound.protection.outlook.com [40.107.66.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A23CB88091 for ; Fri, 10 Aug 2018 12:08:35 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YQBPR0101MB1809.CANPRD01.PROD.OUTLOOK.COM (52.132.67.140) by YQBPR0101MB1873.CANPRD01.PROD.OUTLOOK.COM (52.132.70.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1038.19; Fri, 10 Aug 2018 12:08:34 +0000 Received: from YQBPR0101MB1809.CANPRD01.PROD.OUTLOOK.COM ([fe80::39f1:60bd:8551:cf68]) by YQBPR0101MB1809.CANPRD01.PROD.OUTLOOK.COM ([fe80::39f1:60bd:8551:cf68%2]) with mapi id 15.20.1038.023; Fri, 10 Aug 2018 12:08:33 +0000 From: Rick Macklem To: Konstantin Belousov CC: "freebsd-current@FreeBSD.org" , "peter@holm.cc" Subject: Re: ffs_truncate3 panics Thread-Topic: ffs_truncate3 panics Thread-Index: AQHULkj8zfSrFB+Dkkqu0NmeGvZbQKS0RKaAgAGEoXWAAKUlgIAANVYCgACitwCAAJvZIoAApHIAgABhs4w= Date: Fri, 10 Aug 2018 12:08:33 +0000 Message-ID: References: <20180807131445.GC1884@kib.kiev.ua> <20180808221647.GH1884@kib.kiev.ua> <20180809111004.GK1884@kib.kiev.ua> , <20180810061626.GB2649@kib.kiev.ua> In-Reply-To: <20180810061626.GB2649@kib.kiev.ua> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YQBPR0101MB1873; 6:wZbDgH+oJD7RO9pemBEDlhTP+0atIGJPk1f5luTonvnaAf0W7ztyciw5C99ZXgzj8wA96Lhlb+ZuXHTVU8FwMXADd4D8sg3P+mZeJAibqbMW6SdBpH93yGfsHP0jEVtJ5d8eEguo9lQJY93vfj90BmMOfTtTsEaxD6DrPkG7cnkUlyj9S/SEtpp+elt7UiU3tKmhTnPEa03pdCe1eWpTN8bDOs6lEx3M5Z2vbOCoYqF7uPO55NtsvvdEpjASzyvn/nCnP7TzBG3VZV18M5pQVYqK9B2bZb7eQK1b60IU+JmUKHHR5u4/jaaWNjhNOAIov12UXHZNXrPXEuQfMuiwUXlEyu+S/21uC18rjAYSOdwrv2NJDr7hc6c+yKF7429AK7AXdhJnHnKfF/0C905m8rYYyGRWRTdUkScmGbTLSNE+JF2aVtP1S5KvFjZ9HlafDsmLZx+4ouRlfaL1p4R0pw==; 5:rP5upceTE88/2c3kxt9qAOXt4B/lCCKHnqECXKTLgLZRAu3lVq0zEH2Kyws+4ktpIZsl8rU+XFutBiDEZHamJxKXbLN878mI7GxX4JPZhpRVjbuj/t5eRIDHyb6+Ev3LNJXzUxaaku5ysuxkZCF2DA1ePWOX+FExtJOzP8XfuE0=; 7:Tm79kEdlfyPdcihCSNmqBQDFytH9ojOy/Rmu/rgjJl3EXrQDMkfgFrWLYKY7uTdmdXjfQxIt7PzJFWfkiag/XrQBBYD7TTynXEPwj3g/3DpTYJttnjetU86YhdsasA5Ek8lopv8viRJQkR1v+iTILlRSZ2pwwD4v7swiFEcprq30VhlZh/BLKrDX+eqGYbHPblKumGgGu5bF7YdrZxDAENZ0AEk5GGb0MZSnjeQTxugoc24O3+HXhDIgwOEQCQrc x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 0cb3f891-7f11-45d5-ee16-08d5feb9fec3 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:YQBPR0101MB1873; x-ms-traffictypediagnostic: YQBPR0101MB1873: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231311)(944501410)(52105095)(3002001)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:YQBPR0101MB1873; BCL:0; PCL:0; RULEID:; SRVR:YQBPR0101MB1873; x-forefront-prvs: 07607ED19A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(376002)(136003)(396003)(366004)(189003)(199004)(478600001)(39060400002)(102836004)(11346002)(316002)(6436002)(74482002)(476003)(446003)(68736007)(14454004)(105586002)(53936002)(106356001)(33656002)(9686003)(26005)(55016002)(786003)(2900100001)(486006)(8676002)(81166006)(93886005)(186003)(5660300001)(81156014)(54906003)(7116003)(4326008)(97736004)(2906002)(6246003)(1411001)(76176011)(86362001)(74316002)(8936002)(229853002)(256004)(6916009)(99286004)(14444005)(25786009)(5250100002)(305945005)(7696005)(6506007); DIR:OUT; SFP:1101; SCL:1; SRVR:YQBPR0101MB1873; H:YQBPR0101MB1809.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-microsoft-antispam-message-info: zJojHH378vjF0cHPzikE/J/jCamFHuTQRDPYYxRzDGwAZXWqPUWD7QKbvssLHmG8qDU8F12XDWlOj0YHJpDjf5pbWHkJzqtKdE+66FJbIoqGHQdOA06xaxQe59LJXdkXs0JZvvHTK54ltHn9MlBQ7bw8qceaJQO+a/szgHpverJqS44cf/uRWM9rTAFSyE9UrLmeWXRFHHRogK8FPnA0ewfBOWmYU9qjio96hnQCNMEAjPYsbIx7q+BSHtEMMlMFh9kWNds1y+EB2UsAaFPsUZQvBNyC6h0wqccuEMY+ZvU+0rXSDR6q7RBdrfGXRoR1dURAP0rOi5WQyr9ecQ6KQFv6L3Jerd4nKeLx3PxF4Eg= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: 0cb3f891-7f11-45d5-ee16-08d5feb9fec3 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Aug 2018 12:08:33.8650 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQBPR0101MB1873 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Aug 2018 12:08:36 -0000 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