From: Stephen Rothwell <sfr@canb•auug.org.au>
To: David Sterba <dsterba@suse•cz>
Cc: David Sterba <dsterba@suse•com>,
Johannes Thumshirn <johannes.thumshirn@wdc•com>,
Josef Bacik <josef@toxicpanda•com>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>
Subject: Re: linux-next: manual merge of the btrfs tree with the btrfs-fixes tree
Date: Tue, 6 Sep 2022 10:15:49 +1000 [thread overview]
Message-ID: <20220906101549.1cfee0d4@canb.auug.org.au> (raw)
In-Reply-To: <20220906095055.498d90ea@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 3056 bytes --]
Hi all,
On Tue, 6 Sep 2022 09:50:55 +1000 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
>
> Today's linux-next merge of the btrfs tree got a conflict in:
>
> fs/btrfs/zoned.c
>
> between commit:
>
> 6ca64ac27631 ("btrfs: zoned: fix mounting with conventional zones")
>
> from the btrfs-fixes tree and commit:
>
> e5182af66852 ("btrfs: convert block group bit field to use bit helpers")
>
> from the btrfs tree.
>
> I fixed it up (the former removed some of the code modified by the latter)
> and can carry the fix as necessary. This is now fixed as far as linux-next
> is concerned, but any non trivial conflicts should be mentioned to your
> upstream maintainer when your tree is submitted for merging. You may
> also want to consider cooperating with the maintainer of the conflicting
> tree to minimise any particularly complex conflicts.
Actually the fix up is below ...
--
Cheers,
Stephen Rothwell
diff --cc fs/btrfs/zoned.c
index 62e7007a7e46,dc96b3331bfb..000000000000
--- a/fs/btrfs/zoned.c
+++ b/fs/btrfs/zoned.c
@@@ -1426,17 -1402,32 +1426,16 @@@ int btrfs_load_block_group_zone_info(st
cache->seq_zone = true;
if (num_conventional > 0) {
- /*
- * Avoid calling calculate_alloc_pointer() for new BG. It
- * is no use for new BG. It must be always 0.
- *
- * Also, we have a lock chain of extent buffer lock ->
- * chunk mutex. For new BG, this function is called from
- * btrfs_make_block_group() which is already taking the
- * chunk mutex. Thus, we cannot call
- * calculate_alloc_pointer() which takes extent buffer
- * locks to avoid deadlock.
- */
-
/* Zone capacity is always zone size in emulation */
cache->zone_capacity = cache->length;
- if (new) {
- cache->alloc_offset = 0;
- goto out;
- }
- ret = calculate_alloc_pointer(cache, &last_alloc);
- if (ret || map->num_stripes == num_conventional) {
- if (!ret)
- cache->alloc_offset = last_alloc;
- else
- btrfs_err(fs_info,
+ ret = calculate_alloc_pointer(cache, &last_alloc, new);
+ if (ret) {
+ btrfs_err(fs_info,
"zoned: failed to determine allocation offset of bg %llu",
- cache->start);
+ cache->start);
+ goto out;
+ } else if (map->num_stripes == num_conventional) {
+ cache->alloc_offset = last_alloc;
- cache->zone_is_active = 1;
goto out;
}
}
@@@ -1528,16 -1529,10 +1530,16 @@@ out
ret = -EIO;
}
- if (!ret)
+ if (!ret) {
cache->meta_write_pointer = cache->alloc_offset + cache->start;
- if (cache->zone_is_active) {
-
- if (ret) {
++ if (test_bit(BLOCK_GROUP_FLAG_ZONE_IS_ACTIVE, &cache->runtime_flags)) {
+ btrfs_get_block_group(cache);
+ spin_lock(&fs_info->zone_active_bgs_lock);
+ list_add_tail(&cache->active_bg_list,
+ &fs_info->zone_active_bgs);
+ spin_unlock(&fs_info->zone_active_bgs_lock);
+ }
+ } else {
kfree(cache->physical_map);
cache->physical_map = NULL;
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-09-06 0:15 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-05 23:50 linux-next: manual merge of the btrfs tree with the btrfs-fixes tree Stephen Rothwell
2022-09-06 0:15 ` Stephen Rothwell [this message]
2022-09-06 19:41 ` David Sterba
-- strict thread matches above, loose matches on Subject: below --
2026-06-02 12:41 Mark Brown
2026-03-24 13:25 Mark Brown
2026-03-24 13:25 Mark Brown
2026-03-17 13:48 Mark Brown
2026-03-17 13:48 Mark Brown
2026-03-17 13:48 Mark Brown
2025-09-18 11:26 Mark Brown
2024-06-06 22:55 Stephen Rothwell
2024-06-06 23:12 ` Qu Wenruo
2023-10-04 23:09 Stephen Rothwell
2022-10-31 23:28 Stephen Rothwell
2022-03-24 23:48 Stephen Rothwell
2022-02-24 13:44 broonie
2022-02-25 11:59 ` David Sterba
2021-01-10 22:29 Stephen Rothwell
2020-05-01 0:28 Stephen Rothwell
2020-05-03 21:40 ` David Sterba
2020-05-01 0:24 Stephen Rothwell
2020-05-01 1:05 ` Stephen Rothwell
2020-05-01 2:06 ` Qu Wenruo
2020-01-08 22:14 Stephen Rothwell
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=20220906101549.1cfee0d4@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=dsterba@suse$(echo .)com \
--cc=dsterba@suse$(echo .)cz \
--cc=johannes.thumshirn@wdc$(echo .)com \
--cc=josef@toxicpanda$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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