From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9516AC04AAF for ; Thu, 16 May 2019 14:31:36 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4E72B20833 for ; Thu, 16 May 2019 14:31:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="chYWwNwm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E72B20833 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.91) (envelope-from ) id 1hRHPU-0004Gl-6m; Thu, 16 May 2019 10:31:04 -0400 Received: from mail-io1-xd36.google.com ([2607:f8b0:4864:20::d36]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1hRHPS-0004Ge-EZ for kernelnewbies@kernelnewbies.org; Thu, 16 May 2019 10:31:02 -0400 Received: by mail-io1-xd36.google.com with SMTP id q21so2698788iog.13 for ; Thu, 16 May 2019 07:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=a9Rk/X4ppEP79/yLeAfzh8iPETzdVDiTKdmIuv0UvKc=; b=chYWwNwm9Wh8tZLtF42CWi+rYfJ0UGKcdyzXYtWxru6KBg1Rmig9nuZo+E862w5Dmm wEnM49shM+KUajLxFXqgSEISvY+e33QZKTbU9iMnU1iwHeQNr3LSAn9l0kFKu/Q1eJf1 FMZ7ievqNIj9x7X8EBG4noCyrXdYgFh8Qea1RauIX03M4svJvr8XiT9/eqELP6ruiMc1 6CVSLAjBt0zioUHkB59n1XPGgsUAM5rykYKp+cfj4TcEPDJDOFbAxbItbTgB68oZruby MSrUUQjThtywvRk0MhLY5cUxne3sYgbKaRVoFXBkWhKjg/vCit8i+WxN5z1pnIVQMBVD PKJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=a9Rk/X4ppEP79/yLeAfzh8iPETzdVDiTKdmIuv0UvKc=; b=O4kxG7t44zkSIbc7b9v/5YCZpbVg6Alrat1n3HLJOIyoTEEj7eO7CX8RBeM82bROIU s0YQ/MTY50KZI6s7WijqmO5XqW5U5qGF/XvDnbHR+KjX8MplHRxvDUMJqd99LtukNEqi ZtHdPQnyzbrzwyrVTw5mOcQhuZ0UuXgOwNsi2nPkaese8nr44Yz8GetndkXjbzkhHVyU zViw6bO6MCIrPqQZy2XKaDAtrkypTDnuVUIzkI7nvS846cGfsFJ6cXtdWMG7sY3ubhmV dbH7hoFV9/mzcTSXhbd4XE34uUDuWrGBwgjwHJDtXVG+rhNoQ9yNng0d+VD8/KXvbsEf 9eCg== X-Gm-Message-State: APjAAAUXocVheLbsatAjvJdWFjDGFtvOybVQPlVLAfEm9MtCTw7DqWFy EVWmD9B3M5zSQ0OuMsa3wHiVRms8q8M8/qtUYJOFHl+b X-Google-Smtp-Source: APXvYqxU4moPfao3gCf8Yzo7KZs27FJ7ixxF6qEIGsy0IS04Ai2DlvsT4ANsN/TmJCSa1jddzaujSnOUqWaaCyzbSAc= X-Received: by 2002:a5d:8241:: with SMTP id n1mr24525339ioo.232.1558016999872; Thu, 16 May 2019 07:29:59 -0700 (PDT) MIME-Version: 1.0 References: <20190515081656.GB22750@kroah.com> <20190515112636.GA11749@kroah.com> In-Reply-To: <20190515112636.GA11749@kroah.com> From: Ravi Prakash Putchala Date: Thu, 16 May 2019 19:59:41 +0530 Message-ID: Subject: Re: fs.quota.warnings sysctl parameter usage To: Greg KH Cc: kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============2053996570431867060==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============2053996570431867060== Content-Type: multipart/alternative; boundary="000000000000d4de510589021948" --000000000000d4de510589021948 Content-Type: text/plain; charset="UTF-8" Thank you. This helps a lot. I will check it out. On Wed, May 15, 2019 at 5:04 PM Greg KH wrote: > On Wed, May 15, 2019 at 03:41:30PM +0530, Ravi Prakash Putchala wrote: > > On Wed, May 15, 2019 at 1:46 PM Greg KH wrote: > > > > > On Wed, May 15, 2019 at 01:14:24PM +0530, Ravi Prakash Putchala wrote: > > > > Hi, > > > > > > > > I am exploring fs sysctl parameters and unable to find the reference > to > > > > fs.quota.warnings parameter in the kernel source code. I tried > searching > > > > with fs.quota.warnings (ignoring case) and also > sysctl_fs_quota_warnings. > > > > > > > > Could anyone please point me to the place in the kernel source where > this > > > > parameter is used? > > > > > > Look at the flag_print_warnings variable in fs/quota/dquot.c > > > > > > > Thank you. But how do I associate it with fs.quota.warnings? Asking > because > > this would be useful for me to associate other sysctl parameters in > > future. > > Step back a minute and think about how you create a sysctl entry. It's > with a call to register_sysctl_table(), right? And what is the > parameter of that function? It takes a table that describes the sysctl > directory structure. And from that you can see the different quota > sysctl entries and variables. > > Look at the sys_table and fs_table structures for that information, > understand how they work and then you will be able to find any sysctl > entry in the kernel source quite easily. > > hope this helps, > > greg k-h > --000000000000d4de510589021948 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you. This helps a lot. I will check it out.

<= /div>
O= n Wed, May 15, 2019 at 5:04 PM Greg KH <greg@kroah.com> wrote:
On Wed, May 15, 2019 at 03:41:30PM +0530, Ravi Prakash Putc= hala wrote:
> On Wed, May 15, 2019 at 1:46 PM Greg KH <greg@kroah.com> wrote:
>
> > On Wed, May 15, 2019 at 01:14:24PM +0530, Ravi Prakash Putchala w= rote:
> > > Hi,
> > >
> > > I am exploring fs sysctl parameters and unable to find the r= eference to
> > > fs.quota.warnings parameter in the kernel source code. I tri= ed searching
> > > with fs.quota.warnings (ignoring case) and also sysctl_fs_qu= ota_warnings.
> > >
> > > Could anyone please point me to the place in the kernel sour= ce where this
> > > parameter is used?
> >
> > Look at the flag_print_warnings variable in fs/quota/dquot.c
> >
>
> Thank you. But how do I associate it with fs.quota.warnings? Asking be= cause
> this would be useful for me to associate other sysctl parameters in > future.

Step back a minute and think about how you create a sysctl entry.=C2=A0 It&= #39;s
with a call to register_sysctl_table(), right?=C2=A0 And what is the
parameter of that function?=C2=A0 It takes a table that describes the sysct= l
directory structure.=C2=A0 And from that you can see the different quota sysctl entries and variables.

Look at the sys_table and fs_table structures for that information,
understand how they work and then you will be able to find any sysctl
entry in the kernel source quite easily.

hope this helps,

greg k-h
--000000000000d4de510589021948-- --===============2053996570431867060== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============2053996570431867060==--