From: Theodore Ts'o <tytso@mit.edu>
To: linux-kernel@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org, Theodore Ts'o <tytso@mit.edu>
Subject: [PATCH 1/5] fs: i_flags and i_state in struct inode only need to be unsigned short
Date: Thu, 21 May 2009 16:00:59 -0400 [thread overview]
Message-ID: <1242936063-31689-2-git-send-email-tytso@mit.edu> (raw)
In-Reply-To: <1242936063-31689-1-git-send-email-tytso@mit.edu>
Currently i_flags and i_state do not need to be an unsigned int and an
unsigned long, respectively. (We currently use 9 i_flags bits, and 8
i_state bits.) Changing them to be an unsigned short saves 4 bytes
per inode on an x86 platform, and 8 bytes on an x86_64 platform.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: linux-fsdevel@vger.kernel.org
---
include/linux/fs.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 3b534e5..9b20f13 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -765,10 +765,10 @@ struct inode {
struct mutex inotify_mutex; /* protects the watches list */
#endif
- unsigned long i_state;
unsigned long dirtied_when; /* jiffies of first dirtying */
- unsigned int i_flags;
+ unsigned short i_state;
+ unsigned short i_flags;
atomic_t i_writecount;
#ifdef CONFIG_SECURITY
--
1.6.3.1.1.g75fc.dirty
next prev parent reply other threads:[~2009-05-21 20:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-21 20:00 [RFC PATCH 0/5] Put struct inode on a diet Theodore Ts'o
2009-05-21 20:00 ` Theodore Ts'o [this message]
2009-05-21 20:01 ` [PATCH 2/5] fs: Remove i_cindex from struct inode Theodore Ts'o
2009-05-21 20:01 ` [PATCH 3/5] fs: Slim down inode by only using an unsigned int for i_dnotify_mask Theodore Ts'o
2009-05-21 20:01 ` [PATCH 4/5] fs: Rearrange inode structure elements to avoid waste due to padding Theodore Ts'o
2009-05-21 20:01 ` [PATCH 5/5] Dump the inode structure (for debugging purposes only) Theodore Ts'o
2009-05-21 20:09 ` Matthew Wilcox
2009-05-21 20:28 ` Theodore Tso
2009-05-21 20:30 ` [PATCH 2/5] fs: Remove i_cindex from struct inode Stefan Richter
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=1242936063-31689-2-git-send-email-tytso@mit.edu \
--to=tytso@mit.edu \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).