From patchwork Mon Oct 21 18:01:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J. Bruce Fields" X-Patchwork-Id: 3079291 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DAEC09F396 for ; Mon, 21 Oct 2013 18:01:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9D70D202CF for ; Mon, 21 Oct 2013 18:01:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 578A82015F for ; Mon, 21 Oct 2013 18:01:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752066Ab3JUSBF (ORCPT ); Mon, 21 Oct 2013 14:01:05 -0400 Received: from fieldses.org ([174.143.236.118]:37071 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751937Ab3JUSBE (ORCPT ); Mon, 21 Oct 2013 14:01:04 -0400 Received: from bfields by fieldses.org with local (Exim 4.76) (envelope-from ) id 1VYJmp-0007J8-UA; Mon, 21 Oct 2013 14:01:03 -0400 Date: Mon, 21 Oct 2013 14:01:03 -0400 From: "J. Bruce Fields" To: Steve Dickson Cc: Tony Asleson , linux-nfs@vger.kernel.org Subject: Re: [PATCH] exportfs: Add -s option. Message-ID: <20131021180103.GF18657@fieldses.org> References: <1380734389-8202-1-git-send-email-tasleson@redhat.com> <20131002214015.GA20902@fieldses.org> <5265315D.9030008@RedHat.com> <20131021140114.GE18657@fieldses.org> <52655C68.1000604@RedHat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <52655C68.1000604@RedHat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Oct 21, 2013 at 12:55:04PM -0400, Steve Dickson wrote: > > > On 21/10/13 10:01, J. Bruce Fields wrote: > > On Mon, Oct 21, 2013 at 09:51:25AM -0400, Steve Dickson wrote: > >> I guess we could change -v to used what the -s is proposing, > >> but that could break someone's existing configuration... > > > > Also, looking at my home server.... It would be annoying to get: > > > > /export *(rw,sync,wdelay,hide,nocrossmnt,insecure,no_root_squash,no_all_squash,no_subtree_check,secure_locks,acl,anonuid=65534,anongid=65534) > > > > when all you need is: > > > > /export (rw,wdelay,insecure,no_root_squash,no_subtree_check) > > > > (Actually I wonder why it's even showing wdelay and no_subtree_check > > when those are both defaults? But this is on F16, maybe it's different > > now. I should really update that machine.) > No, the defaults have not changed for (quite) a while... > The defaults are: > ro, root_squash, wdelay, no_subtree_check > > Now it turns out wdelay (aka NFSEXP_GATHERED_WRITES) is a v2 only thing... > So do we really need to have that on by default, now that we are > slowly moving away from v2 support? Yeah, it should stay on by default. Anyway it wasn't the defaults I was wondering about so much as why exportfs -v was printing out some options that were already set at their defaults. I guess that stuff is just hardwired into utils/exportfs/exportfs.c:dump(). So we may want the following. (Anyway, ACK to the -s patch.) --b. --- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c index 4331697..0cde3e9 100644 --- a/utils/exportfs/exportfs.c +++ b/utils/exportfs/exportfs.c @@ -665,7 +665,7 @@ dump(int verbose) c = dumpopt(c, "rw"); if (ep->e_flags & NFSEXP_ASYNC) c = dumpopt(c, "async"); - if (ep->e_flags & NFSEXP_GATHERED_WRITES) + if (!(ep->e_flags & NFSEXP_GATHERED_WRITES)) c = dumpopt(c, "wdelay"); if (ep->e_flags & NFSEXP_NOHIDE) c = dumpopt(c, "nohide"); @@ -679,7 +679,7 @@ dump(int verbose) c = dumpopt(c, "no_root_squash"); if (ep->e_flags & NFSEXP_ALLSQUASH) c = dumpopt(c, "all_squash"); - if (ep->e_flags & NFSEXP_NOSUBTREECHECK) + if (!(ep->e_flags & NFSEXP_NOSUBTREECHECK)) c = dumpopt(c, "no_subtree_check"); if (ep->e_flags & NFSEXP_NOAUTHNLM) c = dumpopt(c, "insecure_locks");