From owner-freebsd-fs@freebsd.org Tue Nov 8 05:45:56 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 05CC6C34ECE for ; Tue, 8 Nov 2016 05:45:56 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0091.outbound.protection.outlook.com [65.55.169.91]) (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 A7ACA8F5 for ; Tue, 8 Nov 2016 05:45:55 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM (10.165.218.133) by YTXPR01MB0191.CANPRD01.PROD.OUTLOOK.COM (10.165.218.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6; Mon, 7 Nov 2016 22:12:13 +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.0707.006; Mon, 7 Nov 2016 22:12:13 +0000 From: Rick Macklem To: Colin Percival , "freebsd-fs@freebsd.org" Subject: Re: Mount protocol/showmount vs NFSv4 Thread-Topic: Mount protocol/showmount vs NFSv4 Thread-Index: AQHSOG1Vi/9I8/Ov0UO2Epz4od6j/qDODlaAgAAHY6M= Date: Mon, 7 Nov 2016 22:12:13 +0000 Message-ID: References: , <0100015840bc8135-cc77751d-68f4-48de-af77-b09327d24a0d-000000@email.amazonses.com> In-Reply-To: <0100015840bc8135-cc77751d-68f4-48de-af77-b09327d24a0d-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: b2bf0687-5d55-4351-961a-08d4075b20b7 x-microsoft-exchange-diagnostics: 1; YTXPR01MB0191; 7:ASMnOecDAmz/MnV/JnJ08i8pYn0NxbBBddg/642ABu6ULl020qGLu/bYOsmAQAe+S0Xvj+96Ywb5N2tE+e5s75NGViSGdyH+lfAkvTWmTdLN2uXUSwzmz1lRBS8peYnXQJJnTGqCGB6LM5JsL9fReUmTIQDKLDKTxk4UqqtVJJACuge/yIo8mv43bJikmOQ/Cebm0IeVJaCGhzH6db4qN1ODVjs67GXx2Ii28z++Fs/LJ8VyVy+9xq0dbbvj6ZtpNhhpYpun7gi9ALKGn7mfX67EPiw7Fa459llhYClCX0g/uTeQpXlv8bhV09o9SeB5PiI/vs/5Eu+hgSonujLSRa5TeTLza70ykJxWfiozCFM= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:YTXPR01MB0191; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(209352067349851)(192374486261705); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040176)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6043046)(6042046); SRVR:YTXPR01MB0191; BCL:0; PCL:0; RULEID:; SRVR:YTXPR01MB0191; x-forefront-prvs: 0119DC3B5E x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(199003)(24454002)(189002)(97736004)(105586002)(5001770100001)(2906002)(86362001)(106116001)(77096005)(76176999)(11100500001)(19580395003)(68736007)(2950100002)(50986999)(8936002)(102836003)(15974865002)(101416001)(586003)(54356999)(9686002)(5660300001)(10400500002)(3280700002)(107886002)(5002640100001)(189998001)(87936001)(74482002)(2501003)(33656002)(7696004)(2900100001)(106356001)(7846002)(81156014)(305945005)(122556002)(3660700001)(8676002)(92566002)(74316002)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:YTXPR01MB0191; 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: 07 Nov 2016 22:12:13.6701 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTXPR01MB0191 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: Tue, 08 Nov 2016 05:45:56 -0000 Colin Percival wrote: >Thanks for bringing this to the list, Rick. (This started with me asking >Rick why unmounting my nfsv4 mount was sending UDP packets.) > >On 11/06/16 12:51, Rick Macklem wrote: >> NFSv4 doesn't use the Mount protocol at all and does everything via the = NFSv4 protocol >> serviced at port #2049. > >It doesn't use the Mount protocol while the filesystem is in use, but our >umount(8) code does send UDP packets (which I understand are for the Mount >protocol) when unmounting an nfsv4 mount. Yes, I should have stated this. At least for NFSv4, it would seem that it s= hould not do any Unmount RPC. For NFSv3 over TCP, maybe it should use TCP instead of UDP= . >> I have never done anything about this, since most were still using NFSv3= , but it seems >> that maybe something should be done now? >> - What do people think of having a new option on mountd(8) that would be= used for >> NFSv4 only servers that disables servicing of Mount RPCs. > >Done in isolation, it seems that this would guarantee that unmounting an >nfsv4 filesystem will result in umount(8) hanging while it waits for >responses to the UDP packets it sends. So I'd think that we should fix >the client side to stop sending those first? Yes, the NFSv4 client should be fixed so that it doesn't do Unmount RPCs be= fore mountd gets changed. (I had thought of this, but neglected to mention it in= the first post. Thanks for bringing this up.) rick >-- >Colin Percival >Security Officer Emeritus, FreeBSD | The power to serve >Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid