lkml.org 
[lkml]   [2009]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 1/5] fs: i_flags and i_state in struct inode only need to be unsigned short
    Date
    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


    \
     
     \ /
      Last update: 2009-05-21 22:05    [W:0.030 / U:123.736 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site