All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: David Sterba <dsterba@suse.com>,
	linux-btrfs@vger.kernel.org,
	Damien Le Moal <Damien.LeMoal@wdc.com>,
	Naohiro Aota <Naohiro.Aota@wdc.com>,
	Filipe Manana <fdmanana@suse.com>
Subject: Re: [PATCH v2 0/8] btrfs: zoned: unify relocation on a zoned and regular FS
Date: Mon, 13 Sep 2021 17:51:06 +0200	[thread overview]
Message-ID: <20210913155105.GC15306@twin.jikos.cz> (raw)
In-Reply-To: <cover.1631117101.git.johannes.thumshirn@wdc.com>

On Thu, Sep 09, 2021 at 01:19:24AM +0900, Johannes Thumshirn wrote:
> A while ago David reported a bug in zoned btrfs' relocation code. The bug is
> triggered because relocation on a zoned filesystem does not preallocate the
> extents it copies and a writeback process running in parallel can cause a
> split of the written extent. But splitting extents is currently not allowed on
> relocation as it assumes a one to one copy of the relocated extents.
> 
> This causes transaction aborts and the filessytem switching to read-only in
> order to prevent further damage.
> 
> The first patch in this series is just a preparation to avoid overly long
> lines in follow up patches. Patch number two adds a dedicated block group for
> relocation on a zoned filesystem. Number three excludes multiple processes
> from adding pages to a relocation inode in a zoned filesystem. Patch four
> switches relocation from REQ_OP_ZONE_APPEND to regular REQ_OP_WRITE, five
> prepares an ASSERT()ion that we can enter the nocow path on a zoned filesystem
> under very special circumstances and the sixth patch then switches the
> relocation code for a zoned filesystem to using the same code path as we use
> on a non zoned filesystem. As the changes before have made the prerequisites
> to do so. The last two patches in this series are just a simple rename of a
> function whose name we have twice in the btrfs codebase but with a different
> purpose in different files and a cleanup of a complicated boolean comparison
> into an if to make it stand out.
> 
> Changes to v1:
> - Added patches 3 and 8
> - Added comments to patches 4 and 5 (Naohiro)
> - Move btrfs_clear_data_reloc_bg() out of line (David)
> - Untangle the 'skip' assing into an if (David)
> - Commented new fs_info members (David)
> 
> Johannes Thumshirn (8):
>   btrfs: introduce btrfs_is_data_reloc_root
>   btrfs: zoned: add a dedicated data relocation block group
>   btrfs: zoned: only allow one process to add pages to a relocation
>     inode
>   btrfs: zoned: use regular writes for relocation
>   btrfs: check for relocation inodes on zoned btrfs in should_nocow
>   btrfs: zoned: allow preallocation for relocation inodes
>   btrfs: rename setup_extent_mapping in relocation code
>   btrfs: zoned: let the for_treelog test in the allocator stand out

I did a few minor fixups, patches moved from topic branch to misc-next.
Thanks.

  parent reply	other threads:[~2021-09-13 15:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 16:19 [PATCH v2 0/8] btrfs: zoned: unify relocation on a zoned and regular FS Johannes Thumshirn
2021-09-08 16:19 ` [PATCH v2 1/8] btrfs: introduce btrfs_is_data_reloc_root Johannes Thumshirn
2021-09-08 16:19 ` [PATCH v2 2/8] btrfs: zoned: add a dedicated data relocation block group Johannes Thumshirn
2021-09-08 16:19 ` [PATCH v2 3/8] btrfs: zoned: only allow one process to add pages to a relocation inode Johannes Thumshirn
2021-09-08 16:19 ` [PATCH v2 4/8] btrfs: zoned: use regular writes for relocation Johannes Thumshirn
2021-09-08 16:19 ` [PATCH v2 5/8] btrfs: check for relocation inodes on zoned btrfs in should_nocow Johannes Thumshirn
2021-09-08 16:19 ` [PATCH v2 6/8] btrfs: zoned: allow preallocation for relocation inodes Johannes Thumshirn
2021-09-08 16:19 ` [PATCH v2 7/8] btrfs: rename setup_extent_mapping in relocation code Johannes Thumshirn
2021-09-08 16:19 ` [PATCH v2 8/8] btrfs: zoned: let the for_treelog test in the allocator stand out Johannes Thumshirn
2021-09-13 15:51 ` David Sterba [this message]
2021-09-14  6:58   ` [PATCH v2 0/8] btrfs: zoned: unify relocation on a zoned and regular FS Johannes Thumshirn

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=20210913155105.GC15306@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=Damien.LeMoal@wdc.com \
    --cc=Naohiro.Aota@wdc.com \
    --cc=dsterba@suse.com \
    --cc=fdmanana@suse.com \
    --cc=johannes.thumshirn@wdc.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.