From: Steven Whitehouse <steve@chygwyn.com>
To: Theodore Tso <tytso@thunk.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] [PATCH 1/8] inode_diet: Replace inode.u.generic_ip with inode.i_private
Date: Tue, 20 Jun 2006 10:43:16 +0100 [thread overview]
Message-ID: <1150796596.3856.1333.camel@quoit.chygwyn.com> (raw)
In-Reply-To: <20060619153108.418349000@candygram.thunk.org>
Hi,
On Mon, 2006-06-19 at 11:20 -0400, Theodore Tso wrote:
> plain text document attachment (inode-slim-1)
> The filesystem or device-specific pointer in the inode is inside a
> union, which is pretty pointless given that all 30+ users of this
> field have been using the void pointer. Get rid of the union and
> rename it to i_private, with a comment to explain who is allowed to
> use the void pointer. This is just a cleanup, but it allows us to
> reuse the union 'u' for something something where the union will
> actually be used.
>
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
>
> Index: linux-2.6.17/include/linux/fs.h
> ===================================================================
> --- linux-2.6.17.orig/include/linux/fs.h 2006-06-18 18:58:51.000000000 -0400
> +++ linux-2.6.17/include/linux/fs.h 2006-06-18 18:58:55.000000000 -0400
> @@ -534,9 +534,7 @@
>
> atomic_t i_writecount;
> void *i_security;
> - union {
> - void *generic_ip;
> - } u;
> + void *i_private; /* fs or device private pointer */
> #ifdef __NEED_I_SIZE_ORDERED
> seqcount_t i_size_seqcount;
> #endif
As a further suggestion, I wonder do we really need i_private at all?
Since we have sb->s_op->alloc_inode and inode->i_sb->s_op->destroy_inode
if all filesystems did something along the following lines:
struct myfs_inode {
struct inode i_inode;
...
};
#define MYFS_I(inode) container_of((inode), struct myfs_inode, i_inode)
then it would seem that i_private is redundant. If there is a file
system which does genuinely need a pointer here (if indeed such a
filesystem does exist, I haven't actually checked that) then a pointer
can just be added as the one single other member of (in my example)
struct myfs_inode.
Steve.
next prev parent reply other threads:[~2006-06-20 9:36 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-19 15:20 [RFC] [PATCH 0/8] Inode slimming Theodore Tso
2006-06-19 15:20 ` [RFC] [PATCH 1/8] inode_diet: Replace inode.u.generic_ip with inode.i_private Theodore Tso
2006-06-19 17:17 ` Jan Engelhardt
2006-06-19 19:09 ` Christoph Hellwig
2006-06-19 19:37 ` Theodore Tso
2006-06-20 9:43 ` Steven Whitehouse [this message]
2006-06-20 11:45 ` Arnd Bergmann
2006-06-20 12:34 ` Steven Whitehouse
2006-06-20 13:53 ` Arnd Bergmann
2006-06-20 15:01 ` Brian F. G. Bidulock
2006-06-20 15:04 ` Brian F. G. Bidulock
2006-06-20 12:29 ` Theodore Tso
2006-06-19 15:20 ` [RFC] [PATCH 2/8] inode-diet: Move i_pipe into a union Theodore Tso
2006-06-19 17:19 ` Jan Engelhardt
2006-06-19 19:06 ` Theodore Tso
2006-06-20 15:23 ` Brian F. G. Bidulock
2006-06-21 1:45 ` Theodore Tso
2006-06-22 9:03 ` Brian F. G. Bidulock
2006-06-19 15:20 ` [RFC] [PATCH 3/8] inode-diet: Move i_bdev " Theodore Tso
2006-06-19 15:20 ` [RFC] [PATCH 4/8] inode-diet: Move i_cdev " Theodore Tso
2006-06-19 17:20 ` Jan Engelhardt
2006-06-19 15:20 ` [RFC] [PATCH 5/8] inode-diet: Eliminate i_blksize and use a per-superblock default Theodore Tso
2006-06-19 15:49 ` Avi Kivity
2006-06-19 16:55 ` Theodore Tso
2006-06-19 15:58 ` Christoph Hellwig
2006-06-19 16:16 ` Joel Becker
2006-06-19 17:20 ` Theodore Tso
2006-06-19 18:55 ` Christoph Hellwig
2006-06-19 22:13 ` Mark Fasheh
2006-06-21 19:41 ` Nate Diller
2006-06-19 17:03 ` Theodore Tso
2006-06-19 18:56 ` Christoph Hellwig
2006-06-19 16:01 ` Joel Becker
2006-06-19 17:06 ` Theodore Tso
2006-06-19 21:45 ` Joel Becker
2006-06-19 22:14 ` Mark Fasheh
2006-06-19 15:20 ` [RFC] [PATCH 6/8] inode-diet: Move i_cindex from struct inode to struct file Theodore Tso
2006-06-19 19:33 ` Al Viro
2006-06-19 19:37 ` Al Viro
2006-06-19 20:58 ` Theodore Tso
2006-06-19 21:51 ` Stefan Richter
2006-06-19 15:20 ` [RFC] [PATCH 7/8] inode-diet: Use a union for i_blocks and i_size, i_rdev and i_devices Theodore Tso
2006-06-19 15:20 ` [RFC] [PATCH 8/8] inode-diet: Fix size of i_blkbits, i_version, and i_dnotify_mask Theodore Tso
2006-06-19 16:54 ` [RFC] [PATCH 0/8] Inode slimming Christoph Lameter
2006-06-19 19:09 ` Theodore Tso
2006-06-21 12:51 [RFC] [PATCH 0/8] Inode diet v2 Theodore Tso
2006-06-21 12:51 ` [RFC] [PATCH 1/8] inode_diet: Replace inode.u.generic_ip with inode.i_private Theodore Tso
2006-06-21 13:23 ` Jan Engelhardt
2006-06-21 14:44 ` Brian F. G. Bidulock
2006-06-21 15:37 ` Theodore Tso
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=1150796596.3856.1333.camel@quoit.chygwyn.com \
--to=steve@chygwyn.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@thunk.org \
/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
all inboxes | Powered by JetHome®