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] vfs untorn writes
Date: Fri, 15 Nov 2024 15:09:21 +0100	[thread overview]
Message-ID: <20241115-vfs-untorn-writes-7229611aeacc@brauner> (raw)

Hey Linus,

/* Summary */

An atomic write is a write issed with torn-write protection. This means
for a power failure or any hardware failure all or none of the data from
the write will be stored, never a mix of old and new data.

This work is already supported for block devices. If a block device is
opened with O_DIRECT and the block device supports atomic write, then
FMODE_CAN_ATOMIC_WRITE is added to the file of the opened block device.

This pull request contains the work to expand atomic write support to
filesystems, specifically ext4 and XFS. Currently, only support for
writing exactly one filesystem block atomically is added.

Since it's now possible to have filesystem block size > page size for
XFS, it's possible to write 4K+ blocks atomically on x86.

/* Testing */

gcc version 14.2.0 (Debian 14.2.0-6)
Debian clang version 16.0.6 (27+b1)

All patches are based on v6.12-rc1 and have been sitting in linux-next.
No build failures or warnings were observed.

/* Conflicts */

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

No known conflicts.

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

No known conflicts.

The following changes since commit 9852d85ec9d492ebef56dc5f229416c925758edc:

  Linux 6.12-rc1 (2024-09-29 15:06:19 -0700)

are available in the Git repository at:

  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.13.untorn.writes

for you to fetch changes up to 54079430c5dbf041363ab39a0c254cd9e4f6aed5:

  iomap: drop an obsolete comment in iomap_dio_bio_iter (2024-11-11 14:35:06 +0100)

Please consider pulling these changes from the signed vfs-6.13.untorn.writes tag.

Thanks!
Christian

----------------------------------------------------------------
vfs-6.13.untorn.writes

----------------------------------------------------------------
Christian Brauner (1):
      Merge tag 'fs-atomic_2024-11-05' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into vfs.untorn.writes

Christoph Hellwig (1):
      iomap: drop an obsolete comment in iomap_dio_bio_iter

John Garry (8):
      block/fs: Pass an iocb to generic_atomic_write_valid()
      fs/block: Check for IOCB_DIRECT in generic_atomic_write_valid()
      block: Add bdev atomic write limits helpers
      fs: Export generic_atomic_write_valid()
      fs: iomap: Atomic write support
      xfs: Support atomic write for statx
      xfs: Validate atomic writes
      xfs: Support setting FMODE_CAN_ATOMIC_WRITE

Ritesh Harjani (IBM) (4):
      ext4: Add statx support for atomic writes
      ext4: Check for atomic writes support in write iter
      ext4: Support setting FMODE_CAN_ATOMIC_WRITE
      ext4: Do not fallback to buffered-io for DIO atomic write

 Documentation/filesystems/iomap/operations.rst | 15 +++++++++
 block/fops.c                                   | 22 +++++++------
 fs/ext4/ext4.h                                 | 10 ++++++
 fs/ext4/file.c                                 | 24 ++++++++++++++
 fs/ext4/inode.c                                | 39 ++++++++++++++++++++---
 fs/ext4/super.c                                | 31 +++++++++++++++++++
 fs/iomap/direct-io.c                           | 43 ++++++++++++++++++++------
 fs/iomap/trace.h                               |  3 +-
 fs/read_write.c                                | 16 ++++++----
 fs/xfs/xfs_buf.c                               |  7 +++++
 fs/xfs/xfs_buf.h                               |  4 +++
 fs/xfs/xfs_file.c                              | 16 ++++++++++
 fs/xfs/xfs_inode.h                             | 15 +++++++++
 fs/xfs/xfs_iops.c                              | 22 +++++++++++++
 include/linux/blkdev.h                         | 16 ++++++++++
 include/linux/fs.h                             |  2 +-
 include/linux/iomap.h                          |  1 +
 17 files changed, 254 insertions(+), 32 deletions(-)

             reply	other threads:[~2024-11-15 14:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-15 14:09 Christian Brauner [this message]
2024-11-18 19:49 ` 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=20241115-vfs-untorn-writes-7229611aeacc@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®