linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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>,
	sfr@canb.auug.org.au
Subject: [PATCH 3/5] fs: Slim down inode by only using an unsigned int for i_dnotify_mask
Date: Thu, 21 May 2009 16:01:01 -0400	[thread overview]
Message-ID: <1242936063-31689-4-git-send-email-tytso@mit.edu> (raw)
In-Reply-To: <1242936063-31689-3-git-send-email-tytso@mit.edu>

The dnotify mask values range from 0x0001 through 0x0020, as well as
0x80000000 (for DN_MULTISHOT).  There is no need for this field to be
an unsigned long (which is 8 bytes on 64-bit systems).  Using an
unsigned int will save 4 bytes for the inode structure on 64-bit
systems.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: sfr@canb.auug.org.au
Cc: linux-fsdevel@vger.kernel.org
---
 include/linux/dnotify.h |    2 +-
 include/linux/fs.h      |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/dnotify.h b/include/linux/dnotify.h
index 102a902..d573542 100644
--- a/include/linux/dnotify.h
+++ b/include/linux/dnotify.h
@@ -10,7 +10,7 @@
 
 struct dnotify_struct {
 	struct dnotify_struct *	dn_next;
-	unsigned long		dn_mask;
+	unsigned int		dn_mask;
 	int			dn_fd;
 	struct file *		dn_filp;
 	fl_owner_t		dn_owner;
diff --git a/include/linux/fs.h b/include/linux/fs.h
index e3b8334..7c73c59 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -755,7 +755,7 @@ struct inode {
 	__u32			i_generation;
 
 #ifdef CONFIG_DNOTIFY
-	unsigned long		i_dnotify_mask; /* Directory notify events */
+	unsigned int		i_dnotify_mask; /* Directory notify events */
 	struct dnotify_struct	*i_dnotify; /* for directory notifications */
 #endif
 
-- 
1.6.3.1.1.g75fc.dirty


  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 ` [PATCH 1/5] fs: i_flags and i_state in struct inode only need to be unsigned short Theodore Ts'o
2009-05-21 20:01   ` [PATCH 2/5] fs: Remove i_cindex from struct inode Theodore Ts'o
2009-05-21 20:01     ` Theodore Ts'o [this message]
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-4-git-send-email-tytso@mit.edu \
    --to=tytso@mit.edu \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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).