All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <johannes.thumshirn@wdc.com>
To: David Sterba <dsterba@suse.com>
Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>,
	linux-btrfs@vger.kernel.org, Filipe Manana <fdmanana@suse.com>,
	Damien Le Moal <damien.lemoal@wdc.com>,
	Naohiro Aota <naohiro.aota@wdc.com>
Subject: [PATCH 3/6] btrfs: zoned: use regular writes for relocation
Date: Fri,  3 Sep 2021 23:44:44 +0900	[thread overview]
Message-ID: <ac0fb08cbaada419c4e7a65a78793401ac557e55.1630679569.git.johannes.thumshirn@wdc.com> (raw)
In-Reply-To: <cover.1630679569.git.johannes.thumshirn@wdc.com>

Now that we have a dedicated block group for relocation, we can use
REQ_OP_WRITE instead of  REQ_OP_ZONE_APPEND for writing out the data on
relocation.

Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 fs/btrfs/zoned.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
index 28a06c2d80ad..be82823c9b16 100644
--- a/fs/btrfs/zoned.c
+++ b/fs/btrfs/zoned.c
@@ -1490,6 +1490,9 @@ bool btrfs_use_zone_append(struct btrfs_inode *inode, u64 start)
 	if (!is_data_inode(&inode->vfs_inode))
 		return false;
 
+	if (btrfs_is_data_reloc_root(inode->root))
+		return false;
+
 	cache = btrfs_lookup_block_group(fs_info, start);
 	ASSERT(cache);
 	if (!cache)
-- 
2.32.0


  parent reply	other threads:[~2021-09-03 14:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03 14:44 [PATCH 0/6] btrfs: zoned: unify relocation on a zoned and regular FS Johannes Thumshirn
2021-09-03 14:44 ` [PATCH 1/6] btrfs: introduce btrfs_is_data_reloc_root Johannes Thumshirn
2021-09-07 11:36   ` Naohiro Aota
2021-09-03 14:44 ` [PATCH 2/6] btrfs: zoned: add a dedicated data relocation block group Johannes Thumshirn
2021-09-07 11:37   ` Naohiro Aota
2021-09-07 11:52   ` David Sterba
2021-09-07 12:43   ` David Sterba
2021-09-03 14:44 ` Johannes Thumshirn [this message]
2021-09-07 11:39   ` [PATCH 3/6] btrfs: zoned: use regular writes for relocation Naohiro Aota
2021-09-03 14:44 ` [PATCH 4/6] btrfs: check for relocation inodes on zoned btrfs in should_nocow Johannes Thumshirn
2021-09-07 11:40   ` Naohiro Aota
2021-09-03 14:44 ` [PATCH 5/6] btrfs: zoned: allow preallocation for relocation inodes Johannes Thumshirn
2021-09-03 14:44 ` [PATCH 6/6] btrfs: rename setup_extent_mapping in relocation code 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=ac0fb08cbaada419c4e7a65a78793401ac557e55.1630679569.git.johannes.thumshirn@wdc.com \
    --to=johannes.thumshirn@wdc.com \
    --cc=damien.lemoal@wdc.com \
    --cc=dsterba@suse.com \
    --cc=fdmanana@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=naohiro.aota@wdc.com \
    /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.