@@ -181,13 +181,13 @@ struct btrfs_inode {
/*
* Cached values of inode properties
*/
- unsigned prop_compress; /* per-file compression algorithm */
+ unsigned prop_compress : 2; /* per-file compression algorithm */
/*
* Force compression on the file using the defrag ioctl, could be
* different from prop_compress and takes precedence if set
*/
- unsigned defrag_compress;
- unsigned change_compress;
+ unsigned defrag_compress : 2;
+ unsigned change_compress : 1;
struct btrfs_delayed_node *delayed_node;
Currently btrfs_inode have size equal 1136 bytes. (On x86_64). struct btrfs_inode store several vars releated to compression code, all states use 1 or 2 bits. Lets declare bitfields for compression releated vars, to reduce sizeof btrfs_inode to 1128 bytes. Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com> --- fs/btrfs/btrfs_inode.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)