linux-fsdevel.vger.kernel.org archive mirror
 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 07/17 for v6.19] vfs folio
Date: Fri, 28 Nov 2025 17:48:18 +0100	[thread overview]
Message-ID: <20251128-vfs-folio-v619-e62bd8562ec0@brauner> (raw)
In-Reply-To: <20251128-vfs-v619-77cd88166806@brauner>

Hey Linus,

/* Summary */
Add a new folio_next_pos() helper function that returns the file position
of the first byte after the current folio. This is a common operation in
filesystems when needing to know the end of the current folio.

The helper is lifted from btrfs which already had its own version, and
is now used across multiple filesystems and subsystems:

- btrfs
- buffer
- ext4
- f2fs
- gfs2
- iomap
- netfs
- xfs
- mm

This fixes a long-standing bug in ocfs2 on 32-bit systems with files
larger than 2GiB. Presumably this is not a common configuration, but the
fix is backported anyway. The other filesystems did not have bugs, they
were just mildly inefficient.

This also introduce uoff_t as the unsigned version of loff_t. A recent
commit inadvertently changed a comparison from being unsigned (on 64-bit
systems) to being signed (which it had always been on 32-bit systems),
leading to sporadic fstests failures.

Generally file sizes are restricted to being a signed integer, but in
places where -1 is passed to indicate "up to the end of the file", it is
convenient to have an unsigned type to ensure comparisons are always
unsigned regardless of architecture.

/* 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]: https://lore.kernel.org/linux-next/20251103085832.5d7ff280@canb.auug.org.au

[2]: https://lore.kernel.org/linux-next/20251124100508.64a6974a@canb.auug.org.au

The following changes since commit 3a8660878839faadb4f1a6dd72c3179c1df56787:

  Linux 6.18-rc1 (2025-10-12 13:42:36 -0700)

are available in the Git repository at:

  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.19-rc1.folio

for you to fetch changes up to 37d369fa97cc0774ea4eab726d16bcb5fbe3a104:

  fs: Add uoff_t (2025-11-25 10:07:42 +0100)

Please consider pulling these changes from the signed vfs-6.19-rc1.folio tag.

Thanks!
Christian

----------------------------------------------------------------
vfs-6.19-rc1.folio

----------------------------------------------------------------
Christian Brauner (1):
      Merge patch series "Add and use folio_next_pos()"

Matthew Wilcox (Oracle) (11):
      filemap: Add folio_next_pos()
      btrfs: Use folio_next_pos()
      buffer: Use folio_next_pos()
      ext4: Use folio_next_pos()
      f2fs: Use folio_next_pos()
      gfs2: Use folio_next_pos()
      iomap: Use folio_next_pos()
      netfs: Use folio_next_pos()
      xfs: Use folio_next_pos()
      mm: Use folio_next_pos()
      fs: Add uoff_t

 fs/btrfs/compression.h                 |  4 ++--
 fs/btrfs/defrag.c                      |  7 ++++---
 fs/btrfs/extent_io.c                   | 16 ++++++++--------
 fs/btrfs/file.c                        |  9 +++++----
 fs/btrfs/inode.c                       | 11 ++++++-----
 fs/btrfs/misc.h                        |  5 -----
 fs/btrfs/ordered-data.c                |  2 +-
 fs/btrfs/subpage.c                     |  5 +++--
 fs/buffer.c                            |  2 +-
 fs/ext4/inode.c                        | 10 +++++-----
 fs/f2fs/compress.c                     |  2 +-
 fs/gfs2/aops.c                         |  3 +--
 fs/iomap/buffered-io.c                 | 10 ++++------
 fs/netfs/buffered_write.c              |  2 +-
 fs/netfs/misc.c                        |  2 +-
 fs/ocfs2/alloc.c                       |  2 +-
 fs/xfs/scrub/xfarray.c                 |  2 +-
 fs/xfs/xfs_aops.c                      |  2 +-
 include/linux/mm.h                     |  8 ++++----
 include/linux/pagemap.h                | 11 +++++++++++
 include/linux/shmem_fs.h               |  2 +-
 include/linux/types.h                  |  1 +
 include/uapi/asm-generic/posix_types.h |  1 +
 mm/shmem.c                             |  8 ++++----
 mm/truncate.c                          |  4 ++--
 25 files changed, 70 insertions(+), 61 deletions(-)

  parent reply	other threads:[~2025-11-28 16:51 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-28 16:48 [GIT PULL 00/17 for v6.19] v6.19 Christian Brauner
2025-11-28 16:48 ` [GIT PULL 01/17 for v6.19] vfs iomap Christian Brauner
2025-12-01 22:08   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 02/17 for v6.19] vfs misc Christian Brauner
2025-12-01 22:08   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 03/17 for v6.19] vfs inode Christian Brauner
2025-12-01 22:08   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 04/17 for v6.19] vfs writeback Christian Brauner
2025-12-01 22:08   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 05/17 for v6.19] namespaces Christian Brauner
2025-12-01 19:06   ` Eric W. Biederman
2025-12-02 17:00     ` Linus Torvalds
2025-12-03 10:07       ` Christian Brauner
2025-12-01 22:08   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 06/17 for v6.19] vfs coredump Christian Brauner
2025-12-01 22:08   ` pr-tracker-bot
2025-11-28 16:48 ` Christian Brauner [this message]
2025-12-01 22:08   ` [GIT PULL 07/17 for v6.19] vfs folio pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 08/17 for v6.19] cred guards Christian Brauner
2025-12-01 21:53   ` Linus Torvalds
2025-12-02  1:26     ` Sasha Levin
2025-12-02  1:36       ` [PATCH] nfs/localio: make do_nfs_local_call_write() return void Sasha Levin
2025-12-01 22:08   ` [GIT PULL 08/17 for v6.19] cred guards pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 09/17 for v6.19] vfs headers Christian Brauner
2025-12-01 23:22   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 10/17 for v6.19] vfs super guards Christian Brauner
2025-12-01 23:22   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 11/17 for v6.19] minix Christian Brauner
2025-12-01 23:22   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 12/17 for v6.19] vfs directory delegations Christian Brauner
2025-12-02  3:19   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 13/17 for v6.19] vfs directory locking Christian Brauner
2025-12-02  3:19   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 14/17 for v6.19] overlayfs cred guards Christian Brauner
2025-12-02  3:19   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 15/17 for v6.19] autofs Christian Brauner
2025-12-02  3:19   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 16/17 for v6.19] vfs fd prepare Christian Brauner
2025-12-01 14:15   ` Al Viro
2025-12-01 18:41     ` Sean Christopherson
2025-11-28 16:48 ` [GIT PULL 17/17 for v6.19] vfs fd prepare minimal Christian Brauner
2025-12-02  1:35   ` Linus Torvalds
2025-12-02  9:42     ` Christian Brauner
2025-12-02  3:19   ` 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=20251128-vfs-folio-v619-e62bd8562ec0@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;
as well as URLs for NNTP newsgroup(s).