Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp106630ybz; Thu, 30 Apr 2020 17:26:51 -0700 (PDT) X-Google-Smtp-Source: APiQypLyL398fNk8GLQhBy8u/JrTNCfmzaZpIs6r28O+KEwpXBRNX0WHHYWaid/1pJ5xAlX6RINT X-Received: by 2002:a17:906:2604:: with SMTP id h4mr951122ejc.307.1588292811337; Thu, 30 Apr 2020 17:26:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588292811; cv=none; d=google.com; s=arc-20160816; b=ze9Jo94bP5JV3VnVCSsxo4j1QaKdc1H+8mZrqAr/G1/5c5xOYVerFPBNCI5es2MJSz OdDKAnCARTFMYzsW2gKrSyrmuAXvL3oG51ajfRev+miGI9Q/C6QxVfq7HNaaIreR80WC nAexsGdgospGE58oP9UIr6UfFHnTAYSZxo97nndI4kk3/CM3fOmdqwvWAbsWM0C8s31q QpjdGw4ybmv2IahJhD3Cf2ybwWLus/0IwuxduocS7fFeUflwsvwgzWKozT6+PoFbW596 hMYoM7VNfEcqapZ+YG4uQjlJuopAbIumTcez8DLt2w/HifvRiM6pPznpFf9sl9AHlFzw EF+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:subject:cc:to :from:date:dkim-signature; bh=NlUrcn0BJHJrg21aERXMlhRKXQHHrMBFvUWLwFQrMrc=; b=YPUET9uSpWr5zBdt9iiXCjALxeTgh68Xnq6Tk9XcCXF8dgxK15aEhsfTF72fIutf0I /CJGkArOSMlw6AdwtCLOlO1jUzteyESKzEbvCpHYQTYWFaxE8Vc4TU3KTuhtXjnNsb3M Sk5YRP+g36kbV0gYEVTv/2iTkt8HZBcpbwl5sfG/7ahY7hbWUSbIPIwvrEbnh9Q9nmvq SHU2ej/Pjy207qqIMvLQC/qMoyZhG9a1G9rU7z/deUwmSYfG4wojcJ9C7g95N09u9rzd ABraATXeX5evgGgnU9J/+wjAnL+apibfN/XuXnbUnDUl4Lj2ubOnR8pdm3Bz407U8f1n d5yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=H21fGJg3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q13si790416eds.115.2020.04.30.17.26.26; Thu, 30 Apr 2020 17:26:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=H21fGJg3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727923AbgEAAY6 (ORCPT + 99 others); Thu, 30 Apr 2020 20:24:58 -0400 Received: from bilbo.ozlabs.org ([203.11.71.1]:59765 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726545AbgEAAY6 (ORCPT ); Thu, 30 Apr 2020 20:24:58 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 49CtLH0qsJz9sSG; Fri, 1 May 2020 10:24:54 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1588292696; bh=2zzAFv3zB/fa2STEFwr4KC6VTjy3v4D10Ec7PDKbu3k=; h=Date:From:To:Cc:Subject:From; b=H21fGJg3T+kdkp66NjMxzFbJqv7brsM2TUX2lvBHr3BXKs+Ml71bfaIGU+pNvzQCG jJcrd2qRuIfJ9Ha40fXQ+6+Jv/f9lo/YvnKpLma4BaTe9/9n9b5kmJxAJSkwW7XNgp EZRsQeB2UeIBUAVa5bawmJkxP7KkCmAAipW+JREEqBC/UYYk1d9scQiGZMxjQPwetL I6S+Lmhv3OL15RsbPWaBO8WX3Jwap7VErngYfYYUDSyjKblZs22sJZvmVexRCcteaO Du1Z/GVzjXnIFO2Eu7r69YUdrfBH4pxWJXSuA5fxFHLCiogR1FN0lM1wCy3+tPvA2Z Rn2ntVThRJYqw== Date: Fri, 1 May 2020 10:24:53 +1000 From: Stephen Rothwell To: David Sterba Cc: Linux Next Mailing List , Linux Kernel Mailing List , Qu Wenruo , Josef Bacik Subject: linux-next: manual merge of the btrfs tree with the btrfs-fixes tree Message-ID: <20200501102453.4b80d290@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/yte3s_M5Kdj=Sxjb47zP7MD"; protocol="application/pgp-signature"; micalg=pgp-sha256 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/yte3s_M5Kdj=Sxjb47zP7MD Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi all, 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 initializati= on 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. --=20 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 =3D h; =20 /* + * 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 =3D h->block_rsv->space_info->flags; + btrfs_chunk_alloc(h, btrfs_get_alloc_profile(fs_info, flags), + CHUNK_ALLOC_NO_FORCE); + } +=20 return h; =20 join_fail: --Sig_/yte3s_M5Kdj=Sxjb47zP7MD Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAl6rbFUACgkQAVBC80lX 0GzCvgf8DJ2YK1vRdeGMxyY/JY8M46pxi9LQWTvwVrpZ2AK1FZNMyxFHYApHgpTk I0JSMfut8zhkgR4ato23C+vYqIlxN4J/RfRj9q6PmyN7mxKGXQtbGvdpEnP254DG 7fDASQWzoPpB4AUxrWh+D8wAArNwUxn+tgV4Ljtb0JrOUvKcOyR9pPiZdjXOVgcB cPXqgbniNj8tSlIi8osz/BFV+Luz9Y6j57+Oy9BXbygazVilyK3/wmSEqyKQ/lJi JsoRMju2W3rc/VqdGmQpA5hpOf/I9w8n+y3qTO7ytsgq3a/Eho63bz8ZeytsXbQn oIS2T5+erCQV7JgVyA67nvvC1C3l/w== =841x -----END PGP SIGNATURE----- --Sig_/yte3s_M5Kdj=Sxjb47zP7MD--