mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Christian Brauner <brauner@kernel.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [GIT PULL 03/12 for v6.18] inode
Date: Fri, 26 Sep 2025 16:18:57 +0200	[thread overview]
Message-ID: <20250926-vfs-inode-be4062725b4f@brauner> (raw)
In-Reply-To: <20250926-vfs-618-e880cf3b910f@brauner>

Hey Linus,

/* Summary */
This contains a series I originally wrote and that Eric brought over the
finish line. It moves out the i_crypt_info and i_verity_info pointers
out of 'struct inode' and into the fs-specific part of the inode.

So now the few filesytems that actually make use of this pay the price
in their own private inode storage instead of forcing it upon every user
of struct inode.

The pointer for the crypt and verity info is simply found by storing an
offset to its address in struct fsverity_operations and struct
fscrypt_operations. This shrinks struct inode by 16 bytes.

I hope to move a lot more out of it in the future so that struct inode
becomes really just about very core stuff that we need, much like struct
dentry and struct file, instead of the dumping ground it has become over
the years.

On top of this are a various changes associated with the ongoing inode
lifetime handling rework that multiple people are pushing forward:

* Stop accessing inode->i_count directly in f2fs and gfs2. They simply
  should use the __iget() and iput() helpers.

* Make the i_state flags an enum.

* Rework the iput() logic

  Currently, if we are the last iput, and we have the I_DIRTY_TIME bit
  set, we will grab a reference on the inode again and then mark it
  dirty and then redo the put.  This is to make sure we delay the time
  update for as long as possible.

  We can rework this logic to simply dec i_count if it is not 1, and if
  it is do the time update while still holding the i_count reference.

  Then we can replace the atomic_dec_and_lock with locking the ->i_lock
  and doing atomic_dec_and_test, since we did the atomic_add_unless
  above.

* Add an icount_read() helper and convert everyone that accesses
  inode->i_count directly for this purpose to use the helper.

* Expand dump_inode() to dump more information about an inode helping in
  debugging.

* Add some might_sleep() annotations to iput() and associated helpers.

/* Testing */

gcc (Debian 14.2.0-19) 14.2.0
Debian clang version 19.1.7 (3+b1)

No build failures or warnings were observed.

/* Conflicts */

Merge conflicts with mainline
=============================

No known conflicts.

Merge conflicts with other trees
================================

[1] This will have a merge conflict with the vfs-6.18-rc1.misc pull request.
    The conflict resolution is to simply use exactly what the tag here
    brings in.

The following changes since commit 8f5ae30d69d7543eee0d70083daf4de8fe15d585:

  Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)

are available in the Git repository at:

  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.18-rc1.inode

for you to fetch changes up to c3c616c53dbabddf32a0485bd133d8d3b9f6656a:

  Merge branch 'vfs-6.18.inode.refcount.preliminaries' (2025-09-19 16:46:02 +0200)

Please consider pulling these changes from the signed vfs-6.18-rc1.inode tag.

Thanks!
Christian

----------------------------------------------------------------
vfs-6.18-rc1.inode

----------------------------------------------------------------
Christian Brauner (3):
      Merge patch series "Move fscrypt and fsverity info out of struct inode"
      inode: fix whitespace issues
      Merge branch 'vfs-6.18.inode.refcount.preliminaries'

Eric Biggers (13):
      fscrypt: replace raw loads of info pointer with helper function
      fscrypt: add support for info in fs-specific part of inode
      ext4: move crypt info pointer to fs-specific part of inode
      f2fs: move crypt info pointer to fs-specific part of inode
      ubifs: move crypt info pointer to fs-specific part of inode
      ceph: move crypt info pointer to fs-specific part of inode
      fs: remove inode::i_crypt_info
      fsverity: add support for info in fs-specific part of inode
      ext4: move verity info pointer to fs-specific part of inode
      f2fs: move verity info pointer to fs-specific part of inode
      btrfs: move verity info pointer to fs-specific part of inode
      fs: remove inode::i_verity_info
      fsverity: check IS_VERITY() in fsverity_cleanup_inode()

Josef Bacik (4):
      fs: stop accessing ->i_count directly in f2fs and gfs2
      fs: make the i_state flags an enum
      fs: rework iput logic
      fs: add an icount_read helper

Mateusz Guzik (1):
      fs: expand dump_inode()

Max Kellermann (1):
      fs: add might_sleep() annotation to iput() and more

 arch/powerpc/platforms/cell/spufs/file.c |   2 +-
 fs/btrfs/btrfs_inode.h                   |   5 +
 fs/btrfs/inode.c                         |   5 +-
 fs/btrfs/verity.c                        |   2 +
 fs/ceph/crypto.c                         |   2 +
 fs/ceph/inode.c                          |   1 +
 fs/ceph/mds_client.c                     |   2 +-
 fs/ceph/super.h                          |   1 +
 fs/crypto/bio.c                          |   2 +-
 fs/crypto/crypto.c                       |  14 +-
 fs/crypto/fname.c                        |  11 +-
 fs/crypto/fscrypt_private.h              |   4 +-
 fs/crypto/hooks.c                        |   2 +-
 fs/crypto/inline_crypt.c                 |  12 +-
 fs/crypto/keysetup.c                     |  43 +++---
 fs/crypto/policy.c                       |   7 +-
 fs/ext4/crypto.c                         |   2 +
 fs/ext4/ext4.h                           |   8 +
 fs/ext4/ialloc.c                         |   4 +-
 fs/ext4/super.c                          |   6 +
 fs/ext4/verity.c                         |   2 +
 fs/f2fs/f2fs.h                           |   6 +
 fs/f2fs/super.c                          |  14 +-
 fs/f2fs/verity.c                         |   2 +
 fs/fs-writeback.c                        |   2 +-
 fs/gfs2/ops_fstype.c                     |   2 +-
 fs/hpfs/inode.c                          |   2 +-
 fs/inode.c                               |  90 ++++++++---
 fs/nfs/inode.c                           |   4 +-
 fs/notify/fsnotify.c                     |   2 +-
 fs/smb/client/inode.c                    |   2 +-
 fs/ubifs/crypto.c                        |   2 +
 fs/ubifs/super.c                         |   2 +-
 fs/ubifs/ubifs.h                         |   4 +
 fs/verity/enable.c                       |   6 +-
 fs/verity/fsverity_private.h             |   9 +-
 fs/verity/open.c                         |  23 +--
 fs/verity/verify.c                       |   2 +-
 fs/xfs/xfs_inode.c                       |   2 +-
 fs/xfs/xfs_trace.h                       |   2 +-
 include/linux/fs.h                       | 246 ++++++++++++++++---------------
 include/linux/fscrypt.h                  |  40 ++++-
 include/linux/fsverity.h                 |  57 +++++--
 include/trace/events/filelock.h          |   2 +-
 security/landlock/fs.c                   |   2 +-
 45 files changed, 428 insertions(+), 234 deletions(-)

  parent reply	other threads:[~2025-09-26 14:19 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-26 14:18 [GIT PULL 00/12 for v6.18] vfs 6.18 Christian Brauner
2025-09-26 14:18 ` [GIT PULL 01/12 for v6.18] misc Christian Brauner
2025-09-29  9:47   ` Christian Brauner
2025-09-29 19:31   ` pr-tracker-bot
2025-09-26 14:18 ` [GIT PULL 02/12 for v6.18] mount Christian Brauner
2025-09-29 19:31   ` pr-tracker-bot
2025-09-26 14:18 ` Christian Brauner [this message]
2025-09-29 19:31   ` [GIT PULL 03/12 for v6.18] inode pr-tracker-bot
2025-09-26 14:18 ` [GIT PULL 04/12 for v6.18] iomap Christian Brauner
2025-09-29 19:31   ` pr-tracker-bot
2025-09-26 14:18 ` [GIT PULL 05/12 for v6.18] pidfs Christian Brauner
2025-09-29 19:31   ` pr-tracker-bot
2025-10-01 14:18   ` Oleg Nesterov
2025-10-06 13:48     ` Christian Brauner
2025-10-07 14:34       ` Oleg Nesterov
2025-10-10 11:00         ` Christian Brauner
2025-09-26 14:19 ` [GIT PULL 06/12 for v6.18] rust Christian Brauner
2025-09-29 19:31   ` pr-tracker-bot
2025-09-26 14:19 ` [GIT PULL 07/12 for v6.18] workqueue Christian Brauner
2025-09-29 19:31   ` pr-tracker-bot
2025-09-26 14:19 ` [GIT PULL 08/12 for v6.18] core kernel Christian Brauner
2025-09-27 12:19   ` Sasha Levin
2025-09-29  9:53     ` Christian Brauner
2025-09-29 19:31   ` pr-tracker-bot
2025-09-26 14:19 ` [GIT PULL 9/12 for v6.18] afs Christian Brauner
2025-09-29 19:31   ` pr-tracker-bot
2025-09-26 14:19 ` [GIT PULL 10/12 for v6.18] namespaces Christian Brauner
2025-09-29 19:31   ` pr-tracker-bot
2025-09-26 14:19 ` [GIT PULL 11/12 for v6.18] writeback Christian Brauner
2025-09-29 19:31   ` pr-tracker-bot
2025-09-26 14:19 ` [GIT PULL 12/12 for v6.18] async directory preliminaries Christian Brauner
2025-09-29 19:31   ` pr-tracker-bot

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=20250926-vfs-inode-be4062725b4f@brauner \
    --to=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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

all inboxes | Powered by JetHome®