From owner-freebsd-fs@freebsd.org Wed Dec 14 17:41:48 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 C9815C80582 for ; Wed, 14 Dec 2016 17:41:48 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0071.outbound.protection.outlook.com [65.55.169.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7667A2D9 for ; Wed, 14 Dec 2016 17:41:47 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM (10.165.218.133) by YTXPR01MB0192.CANPRD01.PROD.OUTLOOK.COM (10.165.218.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.9; Wed, 14 Dec 2016 13:09:02 +0000 Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) by YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) with mapi id 15.01.0771.014; Wed, 14 Dec 2016 13:09:02 +0000 From: Rick Macklem To: Colin Percival , Benjamin Kaduk CC: "freebsd-fs@freebsd.org" Subject: Re: ESTALE after cwd deleted by same NFS client Thread-Topic: ESTALE after cwd deleted by same NFS client Thread-Index: AQHSVANFVKFixagVOUGZ8mLDXQwbl6EDzQuAgAC4aM2AAVLGrIABN7mAgABdEGA= Date: Wed, 14 Dec 2016 13:09:02 +0000 Message-ID: References: <01000158f023675b-41b35a73-4428-4937-853b-62db4fb9b984-000000@email.amazonses.com> <20161212054233.GU8460@kduck.kaduk.org> <01000158f1abc081-d4eddc58-3b4b-41dd-aa1e-0157d2fad812-000000@email.amazonses.com> <20161212163603.GV8460@kduck.kaduk.org> , <01000158fc3da2c5-c13da088-e7b9-4ac0-ac01-ec49a275dd24-000000@email.amazonses.com> In-Reply-To: <01000158fc3da2c5-c13da088-e7b9-4ac0-ac01-ec49a275dd24-000000@email.amazonses.com> 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-office365-filtering-correlation-id: ea3d2910-674b-4183-c401-08d42422603c x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:YTXPR01MB0192; x-microsoft-exchange-diagnostics: 1; YTXPR01MB0192; 7:bRHtHvY8CNLGWRkHmNVAAZdMmrgUKkaAoCy4MjPMfK+V0Z0N4JXyXuq3hxRvVk3cjcqfhq8DKghzIPsEInPaSoI6Cj68KBkmbb82UaK0fbjtsZbhIdDq5WONFAmlwbGs9ChhCSRh7l14JsFlyQtpsoNDiluiAtk93H0q1iwjkbksZeCpNcI03A/yUywReogW4o7HSqsccsMiCaJX80QvWgX7eeW4noPOXWEpLF0n+QYNsSEnO+sA0iuJ59EtbMZVMsnDz+Md093McTJYg4PetxVLj9XJ0WMW7IuVBXu4PMny9yqmfXPWJt+ZftecT1awdcCCpKnPCjVb8cotlL3CzrTevzY8b8d1QZIif4jlD5oz+lp0KKCn+4in64UwLNFNu9yLNH6miuHdfkYR5QDxi9TYpUZMlVg7/seUpa8bA736Z6NbDd2OJaHi4Gfaq4DxbQKk5ChpwhEt3ZAhuhOc+w== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123555025)(20161123560025)(20161123562025)(20161123564025)(6072148); SRVR:YTXPR01MB0192; BCL:0; PCL:0; RULEID:; SRVR:YTXPR01MB0192; x-forefront-prvs: 01565FED4C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39450400003)(199003)(24454002)(189002)(74316002)(102836003)(5660300001)(2171001)(305945005)(101416001)(68736007)(86362001)(6506006)(9686002)(6436002)(93886004)(229853002)(33656002)(77096006)(106116001)(50986999)(54356999)(81156014)(76176999)(8936002)(97736004)(5001770100001)(92566002)(38730400001)(105586002)(81166006)(74482002)(2950100002)(2906002)(8676002)(106356001)(122556002)(189998001)(2900100001)(4326007)(3660700001)(3280700002)(7696004); DIR:OUT; SFP:1101; SCL:1; SRVR:YTXPR01MB0192; H:YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) 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-originalarrivaltime: 14 Dec 2016 13:09:02.7385 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTXPR01MB0192 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 17:41:48 -0000 Colin Percival wrote: >On 12/13/16 05:04, Rick Macklem wrote: >>>>> On Sun, Dec 11, 2016 at 11:06:42PM +0000, Colin Percival wrote: >>>>>> If I run the following with /nfs/ being an NFS mount: >>>>>> # mkdir /nfs/foo >>>>>> # touch /nfs/foo/bar >>>>>> # cd /nfs/foo >>>>>> # rm -r /nfs/foo >>>>>> # rm bar >> If this is happening on a single client > >Yes. At the time I ran this, there was only one client. > >> something is broken. >> - For this step, the name cache should have a miss and the Lookup should= fail with >> ENOENT. I think the most likely failures are... >> --> Either the name cache in the client is broken and has a hit >> OR >> --> The server replies NFS_OK for the lookup, even though it should ha= ve been >removed. > >The server replied ESTALE for the 'rm bar'. Is that the lookup you mean? = I >don't think a lookup happened for /nfs/foo after the 'rm -r' completed, si= nce >it was already the current directory (despite no longer existing). If there was no Lookup between "rm -r /nfs/foo" and "rm bar" then that is t= he problem. The NFS client remove makes a cache call (can't remember the exact function name without looking at the code) which should invalidate the mapp= ing of the name ("bar" in this case). Then, a Lookup of "bar" should occur. --> I'll try and reproduce this when I get home on the weekend. rick [stuff snipped]