Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp437341imm; Thu, 28 Jun 2018 23:56:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeouDxN6jjf0+z4nuAvYGmgvvALLMH1MRRrkj/7ZdCIaEGsbLPejNuemIgbV8O81of37BHM X-Received: by 2002:a62:5486:: with SMTP id i128-v6mr13084024pfb.166.1530255392454; Thu, 28 Jun 2018 23:56:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530255392; cv=none; d=google.com; s=arc-20160816; b=zbSLlr6iAxIl9nmJWaj7b1kFzN3Y94K+Odf0JvRjBZO8cxLjPmZm4iGUJh0QJle7p9 frNohIMJRnO+5MDgHjudoo6JQXZclo1HbcoCKPq4p9YdfsJLt6Zsx3x8agTwz7ZFAWaX HIhkzWSRzlrVaB5r/kmStwrCvuE1SueZTrR5oMhFbJBH9gS5/PkqFKHo7a15XIeCbz+i jTVq8Fid9zE5Spz4dYZEgPYoVi4vUwLKJUVBE0MFHtQl4Py5oYzi/EFy4/S7OgnQ2QbU GQjsz3tYIuyVr479X5qfYE6+HfmbJPjttgeo0RAh2AtTayr3S3kPHADJueJJArWZG9G8 +C2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=jAXJTJc+7jG8ta7renTD2XUu9+0PJ1riZsRgzyeYy9s=; b=AZXQ94EE+52IODxz0c63CxpItnziwC9+OM/Tp71ySnQZS2pUubDnco9NH5sVk1iYDj 35x5BNn91ZgeMVi+Tao7xFgE3xkGzmwfJzoTtYmCqPiEVz7AShL9DjLceEiTO4j8iNq7 Gmok1K1mTO7zoDwIJ6XQIblfcKxWxg8ixj3+TpyVBRDoFYpNr7L9LtEqJv5Y3xJomhlA fvpDUOxV/jLtbYYzVBGRIkskvoHcURrT9YtCBNJh+jfum4qnrQmlsVxI5EJJWzphBU+P dSjz9P6Ywnsj8/0hz+sKhT3C5OT9wSJjjmMlJLMlkTQlpX7egBKQoOXIYJvBr2WuUnSv bc4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l7-v6si2344924pgs.541.2018.06.28.23.56.18; Thu, 28 Jun 2018 23:56:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932492AbeF2Eop (ORCPT + 99 others); Fri, 29 Jun 2018 00:44:45 -0400 Received: from ipmail06.adl6.internode.on.net ([150.101.137.145]:2036 "EHLO ipmail06.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932408AbeF2Eoo (ORCPT ); Fri, 29 Jun 2018 00:44:44 -0400 Received: from ppp59-167-129-252.static.internode.on.net (HELO dastard) ([59.167.129.252]) by ipmail06.adl6.internode.on.net with ESMTP; 29 Jun 2018 14:14:42 +0930 Received: from dave by dastard with local (Exim 4.80) (envelope-from ) id 1fYlGy-0002RK-B4; Fri, 29 Jun 2018 14:44:40 +1000 Date: Fri, 29 Jun 2018 14:44:40 +1000 From: Dave Chinner To: Steve French Cc: ronnie sahlberg , Theodore Tso , linux-fsdevel , LKML , samba-technical , CIFS Subject: Re: config files and how to have persistent Linux kernel Driver/File System configuration info saved Message-ID: <20180629044440.GK19934@dastard> References: <20180628225857.GB1231@thunk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 28, 2018 at 06:24:59PM -0500, Steve French wrote: > On Thu, Jun 28, 2018 at 6:21 PM ronnie sahlberg > wrote: > > > > On Fri, Jun 29, 2018 at 8:58 AM, Theodore Y. Ts'o via samba-technical > > wrote: > > > On Thu, Jun 28, 2018 at 05:37:15PM -0500, Steve French wrote: > > >> Ronnie brought up an interesting point about the problems consistently > > >> configuring file systems (or any Linux module for that matter) so that > > >> reboot doesn't wipe away security or performance tuning changes. > > > > > > In general it's considered best practice to make the file system > > > auto-tune itself as much as possible, because the sad fact is that > > > 99.9999% of the customers aren't going to bother to add any tuning > > > parameters. So there hasn't been a push to try to create something > > > more complex, because it's generally not needed. > > > > True, but in these cases I think we are more looking at server or > > mountpoint specific options than > > actual fs tuning. > > > > For example nfsmount.conf can be used to say "only use NFSv4 when > > accessing server abc" etc. > > For the case of CIFS I could imagine that an administrator might want > > to set "disable smb1 protocol globally" > > Or perhaps > "disable smb1 on " ... various public networks but allow it on > private networks The way the policy is configured depends on the mechanism used to configure the policy. If it's a sysctl or a mount option, then we've already got everything we need. If it's something dynamic in sysfs, then I think you're on your own. FYI, I have been looking at making sysctl be able to work on /sys rather than just /proc/sys (I have a 10 line hack to enable it) so we could re-use it with custom per-mount error config files in /etc/xfs/ for XFS that we inject based on a uevent delivered to udev. It works, but the fact is modifying sysctl in this way exposes it to a whole bunch of stuff sysctl doesn't understand, shouldn't be accessing and/or trying modify. i.e. sysctl is disturbingly dumb, and it gets away with it because of it's restricted scope and API presented by /proc/sys. So, really, I'm probably just going roll our own sysfs config file mechanism into xfs_spaceman (probably based on the new config file parser we have for mkfs.xfs) and hide the mess with a nice, simple xfs_admin interface for udev to call. i.e. roll our own :) Cheers, Dave. -- Dave Chinner david@fromorbit.com