Linux-BTRFS Archive mirror
 help / color / mirror / Atom feed
From: fdmanana@kernel.org
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v2 0/2] btrfs: fix a bug in the direct IO write path for COW writes
Date: Wed, 15 May 2024 19:51:45 +0100	[thread overview]
Message-ID: <cover.1715798440.git.fdmanana@suse.com> (raw)
In-Reply-To: <cover.1715688057.git.fdmanana@suse.com>

From: Filipe Manana <fdmanana@suse.com>

Fix a bug in an error path for direct IO writes in COW mode, which can make
a subsequent fsync log invalid extent items (pointing to unwritten data).
The second patch is just a cleanup. Details in the change logs.

V2: Rework solution since other error paths caused the same problem, make
    it more generic.
    Added more details to change log and comment about what's going on,
    and why reads aren't affected.

Filipe Manana (2):
  btrfs: immediately drop extent maps after failed COW write
  btrfs: make btrfs_finish_ordered_extent() return void

 fs/btrfs/ordered-data.c | 30 ++++++++++++++++++++++++++++--
 fs/btrfs/ordered-data.h |  2 +-
 2 files changed, 29 insertions(+), 3 deletions(-)

-- 
2.43.0


  parent reply	other threads:[~2024-05-15 18:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-14 14:23 [PATCH 0/2] btrfs: fix a bug in the direct IO write path for COW writes fdmanana
2024-05-14 14:23 ` [PATCH 1/2] btrfs: drop extent maps after failed COW dio write fdmanana
2024-05-14 22:15   ` Qu Wenruo
2024-05-15  9:47     ` Filipe Manana
2024-05-14 14:23 ` [PATCH 2/2] btrfs: refactor btrfs_dio_submit_io() for less nesting and indentation fdmanana
2024-05-14 22:23   ` Qu Wenruo
2024-05-15 18:51 ` fdmanana [this message]
2024-05-15 18:51   ` [PATCH v2 1/2] btrfs: immediately drop extent maps after failed COW write fdmanana
2024-05-15 22:02     ` Qu Wenruo
2024-05-15 18:51   ` [PATCH v2 2/2] btrfs: make btrfs_finish_ordered_extent() return void fdmanana
2024-05-15 22:03     ` Qu Wenruo
2024-05-17 16:28   ` [PATCH v2 0/2] btrfs: fix a bug in the direct IO write path for COW writes David Sterba
2024-05-17 16:54     ` Filipe Manana

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=cover.1715798440.git.fdmanana@suse.com \
    --to=fdmanana@kernel.org \
    --cc=linux-btrfs@vger.kernel.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 read-only IMAP folder(s) and NNTP newsgroup(s).