Return-Path: Received: from mail-wm0-f67.google.com ([74.125.82.67]:50537 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753977AbeFLLKC (ORCPT ); Tue, 12 Jun 2018 07:10:02 -0400 Received: by mail-wm0-f67.google.com with SMTP id e16-v6so19827365wmd.0 for ; Tue, 12 Jun 2018 04:10:01 -0700 (PDT) From: Amir Goldstein To: Linus Torvalds Cc: Jan Kara , Al Viro , linux-fsdevel@vger.kernel.org Subject: [PATCH] fs: shave 8 bytes off of struct inode Date: Tue, 12 Jun 2018 14:11:30 +0300 Message-Id: <1528801890-25839-1-git-send-email-amir73il@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Signed-off-by: Amir Goldstein --- Linus, I tried to find some space to cram i_generation in case I get rid of i_fsnotify_mask, but stumbled on a possible "lossless compression". Any caveats with this change? Thanks, Amir. include/linux/fs.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 760d8da1b6c7..6d0489613dc1 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -274,6 +274,7 @@ struct writeback_control; /* * Write life time hint values. + * Stored in struct inode as u8. */ enum rw_hint { WRITE_LIFE_NOT_SET = 0, @@ -607,8 +608,8 @@ struct inode { struct timespec i_ctime; spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ unsigned short i_bytes; - unsigned int i_blkbits; - enum rw_hint i_write_hint; + u8 i_blkbits; + u8 i_write_hint; blkcnt_t i_blocks; #ifdef __NEED_I_SIZE_ORDERED -- 2.7.4