From patchwork Wed Sep 20 09:31:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 142338 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp4028035vqi; Wed, 20 Sep 2023 03:30:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFbJytWjjPB+AuKrzIIzqCYe5be8cM6c0IJb5FrzjiRsd1r5kBV8o/PH4wg/YR8677AN5KL X-Received: by 2002:a17:90b:1b0b:b0:274:c284:c83c with SMTP id nu11-20020a17090b1b0b00b00274c284c83cmr1890959pjb.48.1695205813469; Wed, 20 Sep 2023 03:30:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695205813; cv=none; d=google.com; s=arc-20160816; b=cLMgd4h7rJXKVmXs8nGIoUqX9R6bhTYIKTOb2G23dkdbywKZixLAzs4pf8hre04KE2 /lSt0iHE0SQ0GeGF4VWkLishoV3LpNicIRAn1paPKrIYvK7OJX66M72z9FEyJH8E2OR7 MPFXyoZiRbTTE5fDHj+fr0KiURK3yO+0E9fJmJaQaawSutsyo1LICKBJYApO2O290KtX wi4WU+h1RWL0+tNFnFxuw4YNA0JJ8pzmO2qOALqredbZaWoeKq2Czz3PyezIwEu+8a1U 32LM2vg1ihr7aWgRw38aR+MTWxPN4dwUePB6x0Ahqg+NB1PDTNecNrKaiAsPF3W7RKp5 8sqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :wdcironportexception:ironport-sdr:ironport-sdr:dkim-signature; bh=gEiS9s54V+VQCSX0/tYbItDwsWkF7yQngZdpBq6JJls=; fh=ZBIeESkUb/iidfG45mvqtPm0vhj4bdZnQPzR057sc1k=; b=ZGq9RqqIjFY4UvUd6qvrwIL+dfS3R5pAmg7Jw3CsRXQ5uy2uWrW+BU0zsbu7qP+BZH LZSvdDIjbFK/937Fz6nIvpbqYXTyCsR7Qvu+VV5f7U2lbmgYZk6pnZnYACH3+JnXTYnF j4z9+ylg8M6SC+4WaGeCNhgBFqYPtftMe1eqKHtq5vtGF6uWLJaQ6mEoOPpoT9kX/jvE 0FfNJmfrH5gH8uKILsjZBG8hV0vawV5gGganfVzZR8Wcj8FeMGRWpkuke7FCC5EXlCGi 9oaBFJwfYu3hSetOfGaFSW7admsyCdxVa1XW9glokcHfP0TsWr6GDyF0JVjGJ1Sh5Xil DyLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b="iB9NVYj/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wdc.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id o1-20020a17090a744100b002639394cfcdsi1243684pjk.145.2023.09.20.03.30.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 03:30:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b="iB9NVYj/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wdc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 81C47820E539; Wed, 20 Sep 2023 02:32:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234150AbjITJbj (ORCPT + 26 others); Wed, 20 Sep 2023 05:31:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233747AbjITJbg (ORCPT ); Wed, 20 Sep 2023 05:31:36 -0400 Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCDC19E; Wed, 20 Sep 2023 02:31:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1695202288; x=1726738288; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=Hnjzezp2fhqydMZOcBzR8oKxJ5u8Yy9ISCL0cTZzX5o=; b=iB9NVYj/dpPkRweoO4q50cM40QWV0/MOsIEfEyyo1HfcWzyppNshXq0d TtiX/E7YGIvWw3D8SjX1vah61Oq8ZRkFlMYsICpF/yvIhHIXwnOjyLnp2 zZkUEEoKv2X3sLFi+q16Zep5r54MtetgNTtZEPrviyNcWp9D8zYBYU+Gm +PHZ3IcOd17YK4JyLXZkgmQa9jDbdB2/t8E8km7ojUpsNz+AleHDqlZcO 5Q9jJS9QSHlB4aCAC4fiINNW2mse/QNqVCn/fITOQHzCqxXZ3urmBA88t WsCs+HTohzknHHE4cQlYXPxUhyjbpxrEwZQijb06pxNao36ro9xLTXplk Q==; X-CSE-ConnectionGUID: 4U+KZZ4JRZS7PZ8tU51X1A== X-CSE-MsgGUID: 20i6vmMETIibjPe+K3RQEQ== X-IronPort-AV: E=Sophos;i="6.02,161,1688400000"; d="scan'208";a="356502796" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 20 Sep 2023 17:31:28 +0800 IronPort-SDR: /ys7wBpBTDRF2Pd17lneblwKAEcv7qa/vcsTOco8HAo3rei22gfRXDIn8n1JWbyDhumAaUMSXZ vX5uQAwq2SCF8iEs1lo/ct/B4OONgFwhfLnzb5d0YSMe/ocAzQUcTni2tLMDvTVRoXJyAVRU6g zYM4xbIo7398bFLI7LkPkvPCjn0jFCv6IcVLhxxCD58OAlLR11/gl8CFZCu6XCRwO1AjSXHaup l2dNahZuU7Ccqkao2HtmuOwG9R2/YmqPwrxlSFVpJDpGlWsVqhCVsj3L2e2km0w23h6wRWCjo6 U1E= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 20 Sep 2023 01:44:03 -0700 IronPort-SDR: tGZGxxAMW43F6N9Hwidex4Ifta9k1yNSskBTBc9ZcwZp9Ic+25m7MD5PEWD5SJzKZ2OBhAz0vb orp4HFY3kfSQkATk/LSZbgN4sH0+iRJ9tHJF4lLaHm5HkPF6T9Wq81neLJIvNT3WK65f4XDcWf gahTmJUaYxF0S8ldlb11gLF41oXe5R+eHiQwwnfWh6uIBjxDet+M3tXLgD4QIghW/Iu54p9i4y Vj84aigZyHdRxESgRx0SrJNC7lmEYjysDKWig20jKp81hTpIxx9Af2aNr2mV6jtSYU6dOmSAqp s3g= WDCIronportException: Internal Received: from unknown (HELO redsun91.ssa.fujisawa.hgst.com) ([10.149.66.6]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Sep 2023 02:31:28 -0700 From: Johannes Thumshirn Date: Wed, 20 Sep 2023 02:31:17 -0700 Subject: [PATCH v2 1/2] btrfs: check for incompat bit in btrfs_insert_raid_extent MIME-Version: 1.0 Message-Id: <20230920-rst-updates-v2-1-b4dc154a648f@wdc.com> References: <20230920-rst-updates-v2-0-b4dc154a648f@wdc.com> In-Reply-To: <20230920-rst-updates-v2-0-b4dc154a648f@wdc.com> To: Chris Mason , Josef Bacik , David Sterba Cc: Qu Wenru , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, Johannes Thumshirn X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1695202286; l=659; i=johannes.thumshirn@wdc.com; s=20230613; h=from:subject:message-id; bh=Hnjzezp2fhqydMZOcBzR8oKxJ5u8Yy9ISCL0cTZzX5o=; b=eH7CUlHMFoPLYaKP0YJBGfjuWggoBkwtSXhNt7zD48qz+n4wEZFcOsxinUd8KOFieIk2c/VAN lu4Rujn7NYUAD7R5/N9xc1DAsbPYsZn0LK4rZY+4kykFcexz6/g9q9J X-Developer-Key: i=johannes.thumshirn@wdc.com; a=ed25519; pk=TGmHKs78FdPi+QhrViEvjKIGwReUGCfa+3LEnGoR2KM= X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 20 Sep 2023 02:32:07 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777552131053816526 X-GMAIL-MSGID: 1777552131053816526 Signed-off-by: Johannes Thumshirn --- fs/btrfs/raid-stripe-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/raid-stripe-tree.c b/fs/btrfs/raid-stripe-tree.c index 5e8afe662ed1..7b968eaf9e58 100644 --- a/fs/btrfs/raid-stripe-tree.c +++ b/fs/btrfs/raid-stripe-tree.c @@ -263,7 +263,7 @@ int btrfs_insert_raid_extent(struct btrfs_trans_handle *trans, u64 map_type; int ret; - if (!trans->fs_info->stripe_root) + if (!btrfs_fs_incompat(trans->fs_info, RAID_STRIPE_TREE)) return 0; map_type = list_first_entry(&ordered_extent->bioc_list, typeof(*bioc),