From owner-freebsd-fs@freebsd.org Mon Mar 14 23:27:59 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 1A072ACFF35 for ; Mon, 14 Mar 2016 23:27:59 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id AEA0017D0; Mon, 14 Mar 2016 23:27:58 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) IronPort-PHdr: 9a23:qQzS7xdSoHqlDh1hsCEfnMEmlGMj4u6mDksu8pMizoh2WeGdxc+6bB7h7PlgxGXEQZ/co6odzbGG7OaxBidYv96oizMrTt9lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUiv2OQc9HOnpAIma153xjLDtvcyMKF0WzBOGIppMbzyO5T3LsccXhYYwYo0Q8TDu5kVyRuJN2GlzLkiSlRuvru25/Zpk7jgC86l5r50IeezAcq85Vb1VCig9eyBwvZWz9EqLcQzarHIYX3VQmAdSBxnK5Vf7U4v/+iL+u/o70jSAOdz5RPY1VCispe8/QRvlmGENKiQ94W7ezM19kKxzrxeophg5yInRNtK7Lv17K5ncdtBSYGNKXcJcUmQVGIa1ZIgLAu8pIOFXsoT5v1tIphLoVlrkP//m1jId3iy+5qY9yel0VFiehAE= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2DQAQDdR+dW/61jaINdhBhtBrowAQ2BcBcKhSJKAoFqFAEBAQEBAQEBYyeCLYIUAQEBAwEBAQEgBCcgCwULAgEIGAICDRkCAicBCSYCBAgHBAEcBId7CA6scI80AQEBAQEBAQECAQEBAQEXBHyFHIF7gkeEChACAQWDGIE6BZdLhW6CcAeCMoROhEmIV4YIiHMCHgEBQoIDGYFkIC4HiSEkGX4BAQE X-IronPort-AV: E=Sophos;i="5.24,337,1454994000"; d="scan'208";a="270879719" Received: from nipigon.cs.uoguelph.ca (HELO zcs1.mail.uoguelph.ca) ([131.104.99.173]) by esa-jnhn.mail.uoguelph.ca with ESMTP; 14 Mar 2016 19:27:56 -0400 Received: from localhost (localhost [127.0.0.1]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id BBD3F15F574; Mon, 14 Mar 2016 19:27:56 -0400 (EDT) Received: from zcs1.mail.uoguelph.ca ([127.0.0.1]) by localhost (zcs1.mail.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 4P9Jr3vdzqna; Mon, 14 Mar 2016 19:27:56 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id 078E715F577; Mon, 14 Mar 2016 19:27:56 -0400 (EDT) X-Virus-Scanned: amavisd-new at zcs1.mail.uoguelph.ca Received: from zcs1.mail.uoguelph.ca ([127.0.0.1]) by localhost (zcs1.mail.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 0GGlmhdoXyiY; Mon, 14 Mar 2016 19:27:55 -0400 (EDT) Received: from zcs1.mail.uoguelph.ca (zcs1.mail.uoguelph.ca [172.17.95.18]) by zcs1.mail.uoguelph.ca (Postfix) with ESMTP id D646C15F574; Mon, 14 Mar 2016 19:27:55 -0400 (EDT) Date: Mon, 14 Mar 2016 19:27:55 -0400 (EDT) From: Rick Macklem To: "alex.burlyga.ietf alex.burlyga.ietf" Cc: Julian Elischer , freebsd-fs , Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= Message-ID: <2077111856.17185418.1457998075797.JavaMail.zimbra@uoguelph.ca> In-Reply-To: References: <826673226.15831075.1457922047675.JavaMail.zimbra@uoguelph.ca> Subject: Re: make mountd's -S option the default MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.95.10] X-Mailer: Zimbra 8.0.9_GA_6191 (ZimbraWebClient - FF44 (Win)/8.0.9_GA_6191) Thread-Topic: make mountd's -S option the default Thread-Index: 9IryGEM4ejvSeWZyZjLEuQLKfv09qw== X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2016 23:27:59 -0000 Alex Burlyga wrote: > Awesome! Also I noticed that we always blow away all the exports and apply > exports again on HUP. There are some pathological examples where > automounter is involved and even though there were no changes we still > going through the motions of applying exports. I thought it used to be only > delta's were applied, but not anymore. Was it conscious decision, or this > just needs to be fixed in the new server? > To the best of my knowledge, it has always done a full reload and never deltas. (If you look at revision log for mountd.c, you'll find minimal changes when the new NFS server was added, mostly to add the NFSv4 support.) Much of this code was written by Herb Hasler who worked for/with me in the mid to late 1980s. The original intent was that a HUP signal would only be sent to mountd when /etc/exports had been updated and the sysadmin wanted those changes to take effect (ie. the sysadmin would always do an explicit "update now"). I also mention this because the code in mountd.c that parses /etc/exports has become pretty convoluted over the years and detecting deltas wouldn't be easy. Then, a long time ago a change was made to "mount" so that it sends a SIGHUP to mountd whenever it does a mount (just in case this mount is to be exported). I'm pretty sure I didn't do this change, because I wouldn't have thought it a good idea. However, it has been this way for a long time (I took a quick look and couldn't even find the commit in the log). It would be tempting to only reload /etc/exports when it is modified (via a check for the modify time changing), but that would break the case where /etc/exports hasn't changed but a mount/umount of an underlying file system has changed the underlying file system structure. Ideally, "mount" would parse /etc/exports and only send the SIGHUP if the new mount is exported, but that isn't easy (take a look at mountd.c if you don't believe me) and has never been done. --> Of course any mounting/umounting done by an automounter applies here. If autofs changes the file system structure without sending a SIGHUP to mountd (directly or via mount(8)), then that could break things. From your post, it sounds like it does do the SIGHUP. As above, deciding when this doesn't need to be done isn't easy. There was an open source utility called nfse which did update exports atomically, but it never went into FreeBSD, in part because it wasn't backwards compatible with mountd and /etc/exports (it did everything at file system mount points from what I understood). rick > Alex. > On Mar 13, 2016 19:21, "Rick Macklem" wrote: > > > Julian Elischer has volunteered to commit the patches that > > make the -S option the default for mountd. > > > > Without this option, any reload of /etc/exports (which happens > > whenever any file system is mounted on the server) can result in > > error replies to NFS clients, due to the file system being temporarily > > not exported. The only downside I can think of to using this option > > is a delay observed by NFS clients when large /etc/exports files > > are reloaded. (Since without the delay they can get error replies, > > the delay seems preferable. > > > > There are several PR#s related to these error replies: > > 9619, 131342, 206855 (and probably some others) > > > > If anyone has a problem with this change in default behaviour, > > please email. > > > > rick > > _______________________________________________ > > freebsd-fs@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-fs > > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" > > >