From mboxrd@z Thu Jan 1 00:00:00 1970 From: greg@kroah.com (Greg KH) Date: Sun, 3 Aug 2014 22:21:17 -0700 Subject: Linux filesystem configuration infrastructure In-Reply-To: References: Message-ID: <20140804052117.GA3517@kroah.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Mon, Aug 04, 2014 at 10:20:35AM +0530, Sankar P wrote: > Hi, > > I have a simple filesystem that I did for learning purpose > https://github.com/psankar/simplefs > > Now, I would like to add a few settings to my filesystem (such as the > number of blocks that should be allocated in an extent by default, > maximum fragmentation score after which defrag should be automatically > handled etc.) I would like to have the ability to not just set these > settings, but export them to a file and restore these settings later. > Is there some kind of a settings infrastructure code that is available > in the linux kernel configfs, but usually a filesystem doesn't need anything so complex, just use the "normal" mount option way and you should be fine. > I would also like to have some kind of validation system also as part > of the settings interface. For example: If a setting can accept only > ints, trying to set a string to that should be disabled, min and max > values (range) for values of settings, etc. Again, configfs is good for "complex" configurations. Good luck, greg k-h From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Subject: Re: Linux filesystem configuration infrastructure Date: Sun, 3 Aug 2014 22:21:17 -0700 Message-ID: <20140804052117.GA3517@kroah.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kernelnewbies , linux-fsdevel@vger.kernel.org To: Sankar P Return-path: Received: from out1-smtp.messagingengine.com ([66.111.4.25]:41661 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751495AbaHDP4W (ORCPT ); Mon, 4 Aug 2014 11:56:22 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by gateway1.nyi.internal (Postfix) with ESMTP id 408B722235 for ; Mon, 4 Aug 2014 11:56:19 -0400 (EDT) Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Aug 04, 2014 at 10:20:35AM +0530, Sankar P wrote: > Hi, > > I have a simple filesystem that I did for learning purpose > https://github.com/psankar/simplefs > > Now, I would like to add a few settings to my filesystem (such as the > number of blocks that should be allocated in an extent by default, > maximum fragmentation score after which defrag should be automatically > handled etc.) I would like to have the ability to not just set these > settings, but export them to a file and restore these settings later. > Is there some kind of a settings infrastructure code that is available > in the linux kernel configfs, but usually a filesystem doesn't need anything so complex, just use the "normal" mount option way and you should be fine. > I would also like to have some kind of validation system also as part > of the settings interface. For example: If a setting can accept only > ints, trying to set a string to that should be disabled, min and max > values (range) for values of settings, etc. Again, configfs is good for "complex" configurations. Good luck, greg k-h