From patchwork Tue Jun 12 11:11:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 10460061 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B3052602A0 for ; Tue, 12 Jun 2018 11:10:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94C0E286DE for ; Tue, 12 Jun 2018 11:10:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8937A286E2; Tue, 12 Jun 2018 11:10:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3FD55286DE for ; Tue, 12 Jun 2018 11:10:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932286AbeFLLKC (ORCPT ); Tue, 12 Jun 2018 07:10:02 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=1bkaD/OscE7M/z02XMX5WhYyawuRhObuN9X8JXf/fRE=; b=JCVhjN6l/qErDSWQxTd7iicrn+zgBbGX/WlU0FpqSUcUg7WO/bSArlYi2rGNByDp2o cOZoYPIorIzJsNUbnqr28HNHwm17qcJFHYEWnd0Zr9qUYYJgUclCs1EWRjiUHp/VyhOC CaRjy0w77rhxX6jgLSbPssou239BrI2621+LjLfiM6JvlBaha5iGTKSK8dL4XRKMItrP 9u7kCSXv1dkVrsPQjxXvU17YYoKHElTvrRqtlk1H3B75ZIOBzII4R9k5zIeAkEifJ8yM 9ltYvUWDC1YoPsA33JKkZ75hBVpdQQ5zdxjskjOoQn9Uzyvtp/qqUONmoi/Lkad5SxQO iBfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1bkaD/OscE7M/z02XMX5WhYyawuRhObuN9X8JXf/fRE=; b=HDGQdgWS1HEcEsWHi1kgEGZ8Wzp0HXXvNholfnymedqorVHmEF95VmppZStK2JLxDq Kez6snLcVUN+z3XZQ93qLg0mdaT0PgCL0841G/7VJx4VN4CGySpvi1uGB5pbR2ej5fM7 /nPf1pdYnpVRFgh2wCMpkmlhUa1m/ADC7wFb+z/w6QPiqpbMjgJeP6D9/kog6G/XOEIC QurAoE0Zsx8rZ3LEIW7gV+ilpw4rLU06a6l4ncxj+ec9G+AConjo+Q9rBiQdG4BsaDbX MtPT2fNuF+KljoS97nJYR1x8+4qK2M2YZe44lSs65hRTI/ROHle5/a4Mb4rC968zHok1 1bvw== X-Gm-Message-State: APt69E3MsJdulUernWRozB8scaWMuF8jJlIK++S6EgqNkeTRO2YODic9 DCjPlm27DlwnGGqOlAT2pAwjKw== X-Google-Smtp-Source: ADUXVKLSYVHwz/Sbf+Ao6rltBGRR+VtGLKmBFXlqZ/uw63aO0QncmcbxxVUtEnI/uR3V70FTlS3asg== X-Received: by 2002:a1c:f106:: with SMTP id p6-v6mr1830558wmh.68.1528801800832; Tue, 12 Jun 2018 04:10:00 -0700 (PDT) Received: from amir-VirtualBox.ctera.local (bzq-166-168-31-246.red.bezeqint.net. [31.168.166.246]) by smtp.gmail.com with ESMTPSA id i10-v6sm313667wmf.4.2018.06.12.04.09.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Jun 2018 04:10:00 -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> X-Mailer: git-send-email 2.7.4 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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