From: Randy Dunlap <randy.dunlap@oracle.com>
To: "Josh Boyer" <jwboyer@gmail.com>
Cc: "Robert P. J. Day" <rpjday@mindspring.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Alexander Viro" <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH] FILESYSTEMS: Delete unused "int dummy[5]" from inodes_stat_t.
Date: Tue, 29 May 2007 12:33:26 -0700 [thread overview]
Message-ID: <20070529123326.a8a1bd64.randy.dunlap@oracle.com> (raw)
In-Reply-To: <625fc13d0705291144u1aef3b6dx4b00873f3d05b652@mail.gmail.com>
On Tue, 29 May 2007 13:44:42 -0500 Josh Boyer wrote:
> On 5/29/07, Randy Dunlap <randy.dunlap@oracle.com> wrote:
> > Robert P. J. Day wrote:
> > > On Tue, 29 May 2007, Randy Dunlap wrote:
> > >
> > >> On Tue, 29 May 2007 14:07:01 -0400 (EDT) Robert P. J. Day wrote:
> > >>
> > >>> On Tue, 29 May 2007, Andrew Morton wrote:
> > >>>
> > >>>> kernel/sysctl.c:
> > >>>>
> > >>>> {
> > >>>> .ctl_name = FS_STATINODE,
> > >>>> .procname = "inode-state",
> > >>>> .data = &inodes_stat,
> > >>>> .maxlen = 7*sizeof(int), <-----
> > >>>> .mode = 0444,
> > >>>> .proc_handler = &proc_dointvec,
> > >>>> },
> > >>>>
> > >>>> akpm:/home/akpm> cat /proc/sys/fs/inode-state
> > >>>> 608039 178454 0 0 0 0 0
> > >>>>
> > >>>> So it _is_ used: to present those five zeroes. I think this is
> > >>>> for back-compatibility with some cretaceous-era kernel.
> > >>> ah, gotcha. well, i'll leave this up to someone else to do
> > >>> anything with if they are so inclined.
> > >> There's little to be done, except possibly put a /* comment */ on
> > >> the struct's dummy line so that we don't go thru this again in N
> > >> years.
> > >
> > > so, just to clarify, what *is* the value of those trailing five
> > > zeroes? andrew suggests it's to be backward-compatible with an old
> > > kernel, which doesn't make much sense to me. it would make more sense
> > > to say that that's backward-compatible with some old userspace app
> > > that always wants to see seven values and just ignores the last five.
> >
> > Agreed, it's for compat with some (unknown) userspace app that reads
> > /proc/sys/fs/inode-state and scans for 7 (or more than 2) numbers there.
> > The mantra is "don't break userspace," so we leave the numbers there...
>
> Couldn't you remove the dummy member and just have the proc entry
> print out 5 dummy zeros?
In theory someone could do that, but it would (a) require a comment
so that someone else didn't try to remove it 5 years from now and
(b) require more proc/sysctl code just for that one sysctl entry
since the sysctl entries are all table-driven right now and printing
5 zeros would require a new /proc/sys handler for just this one
sysctl.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
next prev parent reply other threads:[~2007-05-29 19:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-29 17:11 Robert P. J. Day
2007-05-29 18:00 ` Andrew Morton
2007-05-29 18:07 ` Robert P. J. Day
2007-05-29 18:19 ` Randy Dunlap
2007-05-29 18:21 ` Robert P. J. Day
2007-05-29 18:33 ` Randy Dunlap
2007-05-29 18:44 ` Josh Boyer
2007-05-29 19:33 ` Randy Dunlap [this message]
2007-05-30 6:41 ` Stefan Richter
2007-05-30 11:29 ` Adrian Bunk
2007-05-30 11:38 ` Robert P. J. Day
2007-05-30 19:01 ` [trivial PATCH, updated] fs: clarify "dummy" member in struct inodes_stat_t Stefan Richter
2007-05-30 19:16 ` Randy Dunlap
2007-05-29 18:04 ` [PATCH] FILESYSTEMS: Delete unused "int dummy[5]" from inodes_stat_t Alexey Dobriyan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070529123326.a8a1bd64.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=jwboyer@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rpjday@mindspring.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome