public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: David Sterba <dsterba@suse.cz>
Cc: Linux Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Qu Wenruo <wqu@suse.com>, Josef Bacik <josef@toxicpanda.com>
Subject: Re: linux-next: manual merge of the btrfs tree with the btrfs-fixes tree
Date: Fri, 1 May 2020 11:05:58 +1000	[thread overview]
Message-ID: <20200501110558.586c1d07@canb.auug.org.au> (raw)
In-Reply-To: <20200501102453.4b80d290@canb.auug.org.au>

[-- Attachment #1: Type: text/plain, Size: 2115 bytes --]

Hi all,

On Fri, 1 May 2020 10:24:53 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the btrfs tree got a conflict in:
> 
>   fs/btrfs/transaction.c
> 
> between commit:
> 
>   fcc99734d1d4 ("btrfs: transaction: Avoid deadlock due to bad initialization timing of fs_info::journal_info")
> 
> from the btrfs-fixes tree and commit:
> 
>   f12ca53a6fd6 ("btrfs: force chunk allocation if our global rsv is larger than metadata")
> 
> from the btrfs tree.
> 
> I fixed it up (see below) 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.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc fs/btrfs/transaction.c
> index 2d5498136e5e,e4dbd8e3c641..000000000000
> --- a/fs/btrfs/transaction.c
> +++ b/fs/btrfs/transaction.c
> @@@ -666,15 -674,17 +672,26 @@@ got_it
>   		current->journal_info = h;
>   
>   	/*
>  +	 * btrfs_record_root_in_trans() needs to alloc new extents, and may
>  +	 * call btrfs_join_transaction() while we're also starting a
>  +	 * transaction.
>  +	 *
>  +	 * Thus it need to be called after current->journal_info initialized,
>  +	 * or we can deadlock.
>  +	 */
>  +	btrfs_record_root_in_trans(h, root);
>  +
> + 	 * If the space_info is marked ALLOC_FORCE then we'll get upgraded to
> + 	 * ALLOC_FORCE the first run through, and then we won't allocate for
> + 	 * anybody else who races in later.  We don't care about the return
> + 	 * value here.
> + 	 */
> + 	if (do_chunk_alloc && num_bytes) {
> + 		u64 flags = h->block_rsv->space_info->flags;
> + 		btrfs_chunk_alloc(h, btrfs_get_alloc_profile(fs_info, flags),
> + 				  CHUNK_ALLOC_NO_FORCE);
> + 	}
> + 
>   	return h;
>   
>   join_fail:


I fixed the missing comment start in my resolution ...
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-05-01  1:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01  0:24 linux-next: manual merge of the btrfs tree with the btrfs-fixes tree Stephen Rothwell
2020-05-01  1:05 ` Stephen Rothwell [this message]
2020-05-01  2:06   ` Qu Wenruo
  -- strict thread matches above, loose matches on Subject: below --
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-09-05 23:50 Stephen Rothwell
2022-09-06  0:15 ` Stephen Rothwell
2022-09-06 19:41   ` David Sterba
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-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=20200501110558.586c1d07@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=dsterba@suse.cz \
    --cc=josef@toxicpanda.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=wqu@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox