From patchwork Wed Oct 4 07:56:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 148171 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2593097vqb; Wed, 4 Oct 2023 00:57:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF96TPLO2IjeMgmKxzWOqRRRZzs4LQmCAf1Xofar9DkzBPaS2E4jDK/2lyd4j5/Kow2q1ue X-Received: by 2002:a05:6a00:1392:b0:692:6d3f:483f with SMTP id t18-20020a056a00139200b006926d3f483fmr2062510pfg.27.1696406222265; Wed, 04 Oct 2023 00:57:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696406222; cv=none; d=google.com; s=arc-20160816; b=0nNvOxqsnN6MpAbmiKzpt6JMzOZ+4XO1/u8Ns6Q2q6US6dxNLKKmAlDQ05BkdA8L/B ItORE8dJg41/tP2/dj36i+1DQ8MhymYDf0jneNhFAwmEaZaxkT2tjQzKmvER3GK/9cR+ 3Xb4Bl8/mXHyizdJpKZK8Py89EYX6QvawR0eOYyM2urR9BTumtG4xMgSVDvBwvGvSXbN jk968yM3HdTtpvG4YWFP/mUzW7KJXBICAH9lHyVoiDJmRau2bhROdgqwO7b4vTY4VOzu dmMMw1JJkcEt3kH4X3X1tIm6/IoDpB6UpNTfIBAlReSJNwBUtA8ktMzq9fUiOlVz69f2 sd0Q== 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=BhudIDDJC+0KAYBnJ6us4KnHPHhpdg6J19h/UpDyQ+Q=; fh=7eaqsdLjxP6rgu5SvlnX6/iVNbUoDSlcFLfI/7YtxbA=; b=H8T8YLDbUkgBLl6qE6qPHy2D453o/HyEgxhrvYx7b0lHs5bW1cjP6S+l0iM35+ZStu aGiWx4CR880J6n08yi7PK+pjxbdq7uW/bvEPS9nZgsSHVf7vWHtnHpAOsziHx1Hs10sl Da/ML9rNPB9gxZOsWclrEERgESUR3AZYQ+zuCtljy95vG/XLDQcJnn+MT50574O8Y8cg qKk6iL+2fCrPaLySqoWT5OwP55RWvSjCNyrOseCmkO+TaNW6vk+uPsrafGGv5wVe7TGK wNIIqVmGwRWd4tW9B0vge3wE9hHukCC5MXvgFNGOnTLZABAAFqSdabsg1TNDQgTEaGyu Fpzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=mSiSv6G4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id bx15-20020a056a00428f00b0068fc9c6eafasi3189286pfb.357.2023.10.04.00.57.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 00:57:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=mSiSv6G4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id F3E908083B0D; Wed, 4 Oct 2023 00:56:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241616AbjJDH4c (ORCPT + 18 others); Wed, 4 Oct 2023 03:56:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241603AbjJDH42 (ORCPT ); Wed, 4 Oct 2023 03:56:28 -0400 Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1555A7; Wed, 4 Oct 2023 00:56:23 -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=1696406184; x=1727942184; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=oOaBzvLzYxk5pgsPN1ktOBI6k/bFMn2voCQvb+dd7HM=; b=mSiSv6G4Uxc67gEh4KVdZ192IRd6d5eQc73+4UN8ImmAgoAAMUtwYISB cyR5d8HM/N+8kWcQ3khZheRrtpuJLAjkJ2ZIiBnO+reuDaCbGBJZU5A/0 tSFLpQED/+LRRcGaxxJRwDu2zD2kXrBKRi5JRJO2w21gXY42OhmgoqHu9 nn7f7ImZiqtXFmLScYpz4R7maJd+i7Qgg8qrVgiu8l/JMFBXY5Zcyo5PG YCUcc3vdbBNs9J3p68yDZkXCZrwHNoHTC67jSBYIELD3g3BezKN1s+Wjn PtLQyoGKKgNFjcPRi+v8ddDcBQ/DTM7yDjPwQ3sT0yEjKcfMoxjYRwvh5 Q==; X-CSE-ConnectionGUID: BecG0bTiR/KGmWHVRZ7o4g== X-CSE-MsgGUID: MhwPEGn7SBe0/es3kUKmEA== X-IronPort-AV: E=Sophos;i="6.03,199,1694707200"; d="scan'208";a="351024162" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 04 Oct 2023 15:56:23 +0800 IronPort-SDR: h/ICLCPZSui84k7Wty79D/LTga+m2qaYXQBU+oswB2rWBa5ztf9AlJThZUlM2bQBsBfL4mCB4g 478GcvUDhWW2MlAvHBXJwsoBZW1SbpapEcrWxN504O4zikW6GIf6u0M+GqpANg26XT7HtwUEJY 4rhoGxdDo7iyiuSmp9GodgQ+1TALdhuAls4ssnG0x8zFckyd9JtSE2+C8UQUz+HzQB6kNuLf0p EHejaiu8cvyouAsUr1naiIVCf5yF/hiRxEW8lbP+f95fAkAuq53StLMTqiOTa6y2t5FKk2Nizo 6p0= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 04 Oct 2023 00:03:01 -0700 IronPort-SDR: Bfe0qnoJ6OwQ3odKOmUXUgIgEH+Bk+4VDuKjaRMWwP5iRTw2BQSVf2MgJdNScI+8kesMPvoqjK sY939ms9htlVEQ2wutdMAfPUoBDJf2eBxIfise6hnKYkSZvFx1lRqMcBVdchQE56k9FWTuk/lV 9iSUctWLCNtxvE1Kk+2JKsH8jTbFXDWdvCqAPaYyDe1zANHPLOUZabxR3jek33fG4Gtkne9sL0 g4lEAGDtmk7NLBoWT7spsMuQQDoCWYeRVx+L4vGF1KykpzBRY4zakbhkRxQkCpbM/8mueLdpAZ 2Dw= WDCIronportException: Internal Received: from unknown (HELO redsun91.ssa.fujisawa.hgst.com) ([10.149.66.6]) by uls-op-cesaip01.wdc.com with ESMTP; 04 Oct 2023 00:56:23 -0700 From: Johannes Thumshirn Date: Wed, 04 Oct 2023 00:56:16 -0700 Subject: [PATCH v3 1/4] btrfs: change RST write MIME-Version: 1.0 Message-Id: <20231004-rst-updates-v3-1-7729c4474ade@wdc.com> References: <20231004-rst-updates-v3-0-7729c4474ade@wdc.com> In-Reply-To: <20231004-rst-updates-v3-0-7729c4474ade@wdc.com> To: Chris Mason , Josef Bacik , David Sterba Cc: Qu Wenru , Damien Le Moal , Naohiro Aota , 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=1696406180; l=6579; i=johannes.thumshirn@wdc.com; s=20230613; h=from:subject:message-id; bh=oOaBzvLzYxk5pgsPN1ktOBI6k/bFMn2voCQvb+dd7HM=; b=4odRZdfbn24hd6VqjX85IQeOKsxFxDe1OKzkyhb2LUgii50StBOu5f35vRzt+MB7xRjxBaeG3 OzDug3jhT1wCafx5VEivIGndBQ9szzW+B65s1nmLXgzKUfJJG0UvfUj X-Developer-Key: i=johannes.thumshirn@wdc.com; a=ed25519; pk=TGmHKs78FdPi+QhrViEvjKIGwReUGCfa+3LEnGoR2KM= X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Wed, 04 Oct 2023 00:56:51 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778810850969079856 X-GMAIL-MSGID: 1778810850969079856 Signed-off-by: Johannes Thumshirn --- fs/btrfs/raid-stripe-tree.c | 165 ++------------------------------------------ 1 file changed, 5 insertions(+), 160 deletions(-) diff --git a/fs/btrfs/raid-stripe-tree.c b/fs/btrfs/raid-stripe-tree.c index 8a38f07a3246..248e048810d3 100644 --- a/fs/btrfs/raid-stripe-tree.c +++ b/fs/btrfs/raid-stripe-tree.c @@ -75,12 +75,12 @@ int btrfs_delete_raid_extent(struct btrfs_trans_handle *trans, u64 start, u64 le } static int btrfs_insert_one_raid_extent(struct btrfs_trans_handle *trans, - int num_stripes, struct btrfs_io_context *bioc) { struct btrfs_fs_info *fs_info = trans->fs_info; struct btrfs_key stripe_key; struct btrfs_root *stripe_root = fs_info->stripe_root; + const int num_stripes = btrfs_bg_type_to_factor(bioc->map_type); u8 encoding = btrfs_bg_flags_to_raid_index(bioc->map_type); struct btrfs_stripe_extent *stripe_extent; const size_t item_size = struct_size(stripe_extent, strides, num_stripes); @@ -107,7 +107,6 @@ static int btrfs_insert_one_raid_extent(struct btrfs_trans_handle *trans, btrfs_set_stack_raid_stride_devid(raid_stride, devid); btrfs_set_stack_raid_stride_physical(raid_stride, physical); - btrfs_set_stack_raid_stride_length(raid_stride, length); } stripe_key.objectid = bioc->logical; @@ -124,173 +123,19 @@ static int btrfs_insert_one_raid_extent(struct btrfs_trans_handle *trans, return ret; } -static int btrfs_insert_mirrored_raid_extents(struct btrfs_trans_handle *trans, - struct btrfs_ordered_extent *ordered, - u64 map_type) -{ - int num_stripes = btrfs_bg_type_to_factor(map_type); - struct btrfs_io_context *bioc; - int ret; - - list_for_each_entry(bioc, &ordered->bioc_list, rst_ordered_entry) { - ret = btrfs_insert_one_raid_extent(trans, num_stripes, bioc); - if (ret) - return ret; - } - - return 0; -} - -static int btrfs_insert_striped_mirrored_raid_extents( - struct btrfs_trans_handle *trans, - struct btrfs_ordered_extent *ordered, - u64 map_type) -{ - struct btrfs_io_context *bioc; - struct btrfs_io_context *rbioc; - const size_t nstripes = list_count_nodes(&ordered->bioc_list); - const enum btrfs_raid_types index = btrfs_bg_flags_to_raid_index(map_type); - const int substripes = btrfs_raid_array[index].sub_stripes; - const int max_stripes = div_u64(trans->fs_info->fs_devices->rw_devices, - substripes); - int left = nstripes; - int i; - int ret = 0; - u64 stripe_end; - u64 prev_end; - int stripe; - - if (nstripes == 1) - return btrfs_insert_mirrored_raid_extents(trans, ordered, map_type); - - rbioc = kzalloc(struct_size(rbioc, stripes, nstripes * substripes), GFP_NOFS); - if (!rbioc) - return -ENOMEM; - - rbioc->map_type = map_type; - rbioc->logical = list_first_entry(&ordered->bioc_list, typeof(*rbioc), - rst_ordered_entry)->logical; - - stripe_end = rbioc->logical; - prev_end = stripe_end; - i = 0; - stripe = 0; - list_for_each_entry(bioc, &ordered->bioc_list, rst_ordered_entry) { - rbioc->size += bioc->size; - for (int j = 0; j < substripes; j++) { - stripe = i + j; - rbioc->stripes[stripe].dev = bioc->stripes[j].dev; - rbioc->stripes[stripe].physical = bioc->stripes[j].physical; - rbioc->stripes[stripe].length = bioc->size; - } - - stripe_end += rbioc->size; - if (i >= nstripes || - (stripe_end - prev_end >= max_stripes * BTRFS_STRIPE_LEN)) { - ret = btrfs_insert_one_raid_extent(trans, stripe + 1, rbioc); - if (ret) - goto out; - - left -= stripe + 1; - if (left <= 0) - break; - - i = 0; - rbioc->logical += rbioc->size; - rbioc->size = 0; - } else { - i += substripes; - prev_end = stripe_end; - } - } - - if (left > 0) { - bioc = list_prev_entry(bioc, rst_ordered_entry); - ret = btrfs_insert_one_raid_extent(trans, substripes, bioc); - } - -out: - kfree(rbioc); - return ret; -} - -static int btrfs_insert_striped_raid_extents(struct btrfs_trans_handle *trans, - struct btrfs_ordered_extent *ordered, - u64 map_type) -{ - struct btrfs_io_context *bioc; - struct btrfs_io_context *rbioc; - const size_t nstripes = list_count_nodes(&ordered->bioc_list); - int i; - int ret = 0; - - rbioc = kzalloc(struct_size(rbioc, stripes, nstripes), GFP_NOFS); - if (!rbioc) - return -ENOMEM; - rbioc->map_type = map_type; - rbioc->logical = list_first_entry(&ordered->bioc_list, typeof(*rbioc), - rst_ordered_entry)->logical; - - i = 0; - list_for_each_entry(bioc, &ordered->bioc_list, rst_ordered_entry) { - rbioc->size += bioc->size; - rbioc->stripes[i].dev = bioc->stripes[0].dev; - rbioc->stripes[i].physical = bioc->stripes[0].physical; - rbioc->stripes[i].length = bioc->size; - - if (i == nstripes - 1) { - ret = btrfs_insert_one_raid_extent(trans, nstripes, rbioc); - if (ret) - goto out; - - i = 0; - rbioc->logical += rbioc->size; - rbioc->size = 0; - } else { - i++; - } - } - - if (i && i < nstripes - 1) - ret = btrfs_insert_one_raid_extent(trans, i, rbioc); - -out: - kfree(rbioc); - return ret; -} - int btrfs_insert_raid_extent(struct btrfs_trans_handle *trans, struct btrfs_ordered_extent *ordered_extent) { struct btrfs_io_context *bioc; - u64 map_type; int ret; if (!btrfs_fs_incompat(trans->fs_info, RAID_STRIPE_TREE)) return 0; - map_type = list_first_entry(&ordered_extent->bioc_list, typeof(*bioc), - rst_ordered_entry)->map_type; - - switch (map_type & BTRFS_BLOCK_GROUP_PROFILE_MASK) { - case BTRFS_BLOCK_GROUP_DUP: - case BTRFS_BLOCK_GROUP_RAID1: - case BTRFS_BLOCK_GROUP_RAID1C3: - case BTRFS_BLOCK_GROUP_RAID1C4: - ret = btrfs_insert_mirrored_raid_extents(trans, ordered_extent, map_type); - break; - case BTRFS_BLOCK_GROUP_RAID0: - ret = btrfs_insert_striped_raid_extents(trans, ordered_extent, map_type); - break; - case BTRFS_BLOCK_GROUP_RAID10: - ret = btrfs_insert_striped_mirrored_raid_extents(trans, ordered_extent, - map_type); - break; - default: - btrfs_err(trans->fs_info, "trying to insert unknown block group profile %lld", - map_type & BTRFS_BLOCK_GROUP_PROFILE_MASK); - ret = -EINVAL; - break; + list_for_each_entry(bioc, &ordered_extent->bioc_list, rst_ordered_entry) { + ret = btrfs_insert_one_raid_extent(trans, bioc); + if (ret) + return ret; } while (!list_empty(&ordered_extent->bioc_list)) { From patchwork Wed Oct 4 07:56: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: 148168 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2592976vqb; Wed, 4 Oct 2023 00:56:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFndSpxYOp8/8aHHEx7KanJo4/2uiX3BeHZm9DAsfUSvkyjQKBZoU3pnZc9k/FVnUtF4KGI X-Received: by 2002:a05:6808:18a4:b0:398:5d57:3d08 with SMTP id bi36-20020a05680818a400b003985d573d08mr2050373oib.37.1696406203837; Wed, 04 Oct 2023 00:56:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696406203; cv=none; d=google.com; s=arc-20160816; b=pqf2uKfqzh1SU+8U3EKan36lt7Gi+/BqRnesGYYDuCwVBOT61azeqYqrRpS9Pz+Yfx BRKb9eJsbjRT3q8v+EWaKjv0IwPOopTTY0yWIjOx2YYK+2gj6RHTjXLx7HqjMOlExO99 NzRif1dF6WyCBFgfZeassq+YCc1HmBuIzBZnVmB6Bnmu8Tu+V0aOe1m6QbWTKrJueheK JtLQxr6+A/ZcNbRe6kld7tCQKS5kzjt/4l7c25+fwyCrxG4Tag49LQRwfOLP44js9P1V 5i0wYTpMPK588CCDWut4XaUFEQZrDx4rrOOeAlXx5pViIdz+sWfUX18kEhGxRK/cnRbO v5Rw== 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=AKpXbECz8DH/UeySesCcGSqabRYOsgjtDbU/kzL6V/U=; fh=7eaqsdLjxP6rgu5SvlnX6/iVNbUoDSlcFLfI/7YtxbA=; b=bCsb/02NBSHymhhh/iOxr1V60SzORQb2EUyiYqrhZAb3Yy0p76YNIPlO2BuKS1kqmz r2VBqSAU3P5RPneGRY97PtdCmZfjqk0N+TBdb9qlDU5a+0PfEMfXocaMFJO1D/yy6iji vUspMDehRLkhw/hDJAF8p6g80XnA7iOiP2mkp+ZVKEQJj2Zj6OPu4/lp+wCuMReZPEv7 KA5UaSVizVF+fOdOK3Lm+0ugTrMUMcdzcbgqzYnff5nmf6+7qTrEyeu9t6VQebvYHQP3 q9xGC3vpOmo2gZeYDdxftDb+7Uw/ZonwB0LIMjv7j4D2lrqtm1uVvl1ulqt3wVS2C2x6 VBNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=eQiVDOKo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id d4-20020a633604000000b005859c874eb5si3230173pga.275.2023.10.04.00.56.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 00:56:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=eQiVDOKo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 D5F95801C02A; Wed, 4 Oct 2023 00:56:42 -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 S241649AbjJDH4i (ORCPT + 18 others); Wed, 4 Oct 2023 03:56:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241605AbjJDH42 (ORCPT ); Wed, 4 Oct 2023 03:56:28 -0400 Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 353A6AC; Wed, 4 Oct 2023 00:56:25 -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=1696406185; x=1727942185; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=+rpwer5aJHTGV8tKBiNFMEqa/oSZvlhrh7ptZ83X8Hs=; b=eQiVDOKoSnRQu27G1Q63LSg3EyHo3/QY+DxnTdRTnYX5mAYLEQYcw/j+ wXehgeBO+JR2kVcyj8C5Bqzd6vzZ7fMA89U2GgjNLpL6zxpMbXW2LyCPb feXVTh1u5+wX2wZKJtt94UHdRQY5fWT068gnqBccZz1pEs4/avMbpP1qo fgIt4SP9HflujXHR8p6IItoKpm/mUHtjsp4Im+5TyNqHcNAmEHGBDCdzs fFGePOh+9oZ2+XHi0ZjwEGBs+zxZ+qNeP1kcNKoJcH+KUXTQhubnGhCUh x+eMJ9HqhFO5Q25r+BhtOdQO8WlISr3ppz/b1iitsPZd9sIp4W7fCODwO g==; X-CSE-ConnectionGUID: 0BTl8Gs3RvCsybL0Dv/UhQ== X-CSE-MsgGUID: YAQdQu+nSrSLEb6SX85/AQ== X-IronPort-AV: E=Sophos;i="6.03,199,1694707200"; d="scan'208";a="351024164" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 04 Oct 2023 15:56:24 +0800 IronPort-SDR: lEn3nUO0s1/ih0kKKjXXW+hZDe7B1CTR1i2pRqP++iZSRnHVjqezNHrZgXgHZ/Nh0dSvwZ3+nd b7HCUdKpdHOkemxuYET1MglVtLAfkxyeUNPbs+cFpjBydBZCVeRCTvXyaKrCNXxEx//NZRpDi8 0erAEVl4aFJsDXGqloR2pcADE4RrmlDCJQKupA85L2eWtWvkBQDRHBYorUNyRwgMtQnAxTJh3b ncjuTpb4Fq07WgQcHHdwXforR3/AKgp7k+/voK1//cuWCyOAnUieNiMYVCCa6If1NiKjVVQPW/ NOo= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 04 Oct 2023 00:03:02 -0700 IronPort-SDR: GdLfE7MqiqgQ5NE0Qwt6Z/UiQy9GUgSqF2KqMRFJTBePsObtVcO2yZ7AvAMg/6dxu4AW0TwdrB 6MTEeb0akGEjAVWapE8Qxp5yYkiiDe6dD/dSCtHyad+SaOnmxnPnehAardjsn8/07iL2xf+76U hyZ/n/roguX7s9d+N9xsMHNbeQjosnF6obI4OJ7pyHI1HIg0uN4fqpqQxZh2Ex/sdzUoOgP6cq w2xD7tKWthuBy3bKmR/3qJMM11EJAY/hqeNCILbE9TcBbtvpxfPwn/IJ5BWBRDyBCeHo8CwOmT S8w= WDCIronportException: Internal Received: from unknown (HELO redsun91.ssa.fujisawa.hgst.com) ([10.149.66.6]) by uls-op-cesaip01.wdc.com with ESMTP; 04 Oct 2023 00:56:24 -0700 From: Johannes Thumshirn Date: Wed, 04 Oct 2023 00:56:17 -0700 Subject: [PATCH v3 2/4] btrfs: remove stride length check on read MIME-Version: 1.0 Message-Id: <20231004-rst-updates-v3-2-7729c4474ade@wdc.com> References: <20231004-rst-updates-v3-0-7729c4474ade@wdc.com> In-Reply-To: <20231004-rst-updates-v3-0-7729c4474ade@wdc.com> To: Chris Mason , Josef Bacik , David Sterba Cc: Qu Wenru , Damien Le Moal , Naohiro Aota , 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=1696406180; l=879; i=johannes.thumshirn@wdc.com; s=20230613; h=from:subject:message-id; bh=+rpwer5aJHTGV8tKBiNFMEqa/oSZvlhrh7ptZ83X8Hs=; b=9hiIY4SWywRd+xkjGxXBtyXHIbTYuXF2rdSQFRyKyaykhcSRR6adSUIXXNeY4559N3vZWbQxr dtvil4DqvckBaMQBMdVJqHT817/W+TOLTEkOD5UahXQti+U6fngK39g X-Developer-Key: i=johannes.thumshirn@wdc.com; a=ed25519; pk=TGmHKs78FdPi+QhrViEvjKIGwReUGCfa+3LEnGoR2KM= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_NONE,URIBL_BLOCKED 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, 04 Oct 2023 00:56:42 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778810831301031546 X-GMAIL-MSGID: 1778810831301031546 Signed-off-by: Johannes Thumshirn --- fs/btrfs/raid-stripe-tree.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/fs/btrfs/raid-stripe-tree.c b/fs/btrfs/raid-stripe-tree.c index 248e048810d3..944e8f1862aa 100644 --- a/fs/btrfs/raid-stripe-tree.c +++ b/fs/btrfs/raid-stripe-tree.c @@ -237,16 +237,8 @@ int btrfs_get_raid_extent_offset(struct btrfs_fs_info *fs_info, for (int i = 0; i < num_stripes; i++) { struct btrfs_raid_stride *stride = &stripe_extent->strides[i]; u64 devid = btrfs_raid_stride_devid(leaf, stride); - u64 len = btrfs_raid_stride_length(leaf, stride); u64 physical = btrfs_raid_stride_physical(leaf, stride); - if (offset >= len) { - offset -= len; - - if (offset >= BTRFS_STRIPE_LEN) - continue; - } - if (devid != stripe->dev->devid) continue; From patchwork Wed Oct 4 07:56:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 148169 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2593030vqb; Wed, 4 Oct 2023 00:56:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFwoxvWHVNyY7BMT31SZ358BxT956dkMFW2M0xmqjH8FloH5/2Hna2gc0FCJdKGWXiewSwR X-Received: by 2002:a05:6808:10ce:b0:3ab:83fe:e182 with SMTP id s14-20020a05680810ce00b003ab83fee182mr2103407ois.1.1696406210745; Wed, 04 Oct 2023 00:56:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696406210; cv=none; d=google.com; s=arc-20160816; b=slig+uo6cThAPisWrEMCEgIk6bGd0fG42yU3xBb6FR+um3kQXpQ/bwa+vlKOcTdVk/ e2qnekaIszHEelI1dgpTksEVgAzFNZZHwKnnGuy4bSN9QZqEmyUtxPnDybD812OLFIrl oWVb0Xu1SAj2IrO14dWTP3cjvFjLnN1CaY8vaZQ6hRhc8SpY0daFiS32ESnx8nTPcvC4 0ap0/spX8I6v2eTjQf0xVRaCYhgQ4PI9gEtSEp8h4tDo0knxr8+jcK9JWgVFnIyx0Gok Y5nRgroaFuMR7f6IQWX38ZSUtKcPLoArvrpEToI1cLo/b/N/GE6GskKy6XPuICMnwQFq +Vnw== 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=mNwpepV7W49bloJSamLHI68pPug4S0XI0MVBi+4/c1E=; fh=7eaqsdLjxP6rgu5SvlnX6/iVNbUoDSlcFLfI/7YtxbA=; b=w4j3euo3bYTUYehj6PE4QkSlhwB3VfbeLyWOCILtuwmSDLWdeJmL0MeLqkWY2+QaZD pYoV8Ier4GQVlMnGkcjzibY2aXfd5sMn118XR/7NB/BzjEoR3MeKjV4Mozlg7PeDChF3 bHZ6Au0LclFqPbus7JiBjaz7TPz8bibIZzwT+BiXsdqw0pyk7frvWb1lSargYIwxZT6s etHlSvrIrWXXR9R5wiozatMNM08c6vRWjjEniwpUncLc0eqlrUTTg+VHuDufXKfIgLWl ucfywOFIchZfo9Fm3TUQIhZH2FFJzURqpDjBRZzeF2+Umej1DYKeC8VJUkqRI3SyKWg5 99FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=SuLQcE6n; 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 q24-20020a635c18000000b00585a5433e55si3221849pgb.143.2023.10.04.00.56.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 00:56:50 -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=SuLQcE6n; 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 1615A81D4751; Wed, 4 Oct 2023 00:56:50 -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 S241650AbjJDH4l (ORCPT + 18 others); Wed, 4 Oct 2023 03:56:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241615AbjJDH4a (ORCPT ); Wed, 4 Oct 2023 03:56:30 -0400 Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46B66AD; Wed, 4 Oct 2023 00:56:26 -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=1696406186; x=1727942186; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=e+YyfDQ1PFX4rBIrEPfhcrCD3fDnJ1asPXocJQ97CxI=; b=SuLQcE6nxGiyHpczPQsdRu7srg1pvCyfnESJZ7xJksrHuayQzr7XQaOR CAwWROa/jJh7FrbDZhTOfa07hYmwJ2yp7Dn3/DM85d27rl1DP2RvCRe9Z SRjKhhLEl6TBjfBWHDMIWNu+V4WvU1hydgnWySn95U4JzrF2blK0DgQJw IBqXQi03uJqAGoPa85Z+u/fsYfC0qxNeZdDVOs71Ur9QbDAvvPBzsGz9H eukpupsziGqvnVIqSyjBWpbzSnqg9BlRZ8ximqcabJM3lrCXI8csa2yz5 wgjRECJ5JbtL2wWDrbAJsHMn8lKIcz9VmqYKSbU1fBFxPrOV1UQLqQA4l g==; X-CSE-ConnectionGUID: Rvl5g4JMQ8WH70Gv/dU9mg== X-CSE-MsgGUID: d9t3ZTI4Q3qkp4r6aaV0jQ== X-IronPort-AV: E=Sophos;i="6.03,199,1694707200"; d="scan'208";a="351024168" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 04 Oct 2023 15:56:26 +0800 IronPort-SDR: xPSh7UtJYUKBehJmvRyje1nbOEgzPNbjbs/Yzlh01XhlirqGV7UQ1XmGSZm8BoA6dlRiEJ2DJH pkwTJeE6dtU/mgjfzqXcjw/TDIjtd6VIHqlsxhg+LX4gK6XVdMfdwbTyCVE2/Tci3fwMQw0W/x +Suv6DAJpOAfGQa+wgKhFdSTsF/XWK0Y2cYpRjt8aCM1kpzpVFdHi8pnCGTJrSDvDTw7Pki/I8 /eX8lZau+C+jAkLcsLxX0m9eRKB4ArvFmJq5D3P8PHa63MjTgt79lt63RwTqLumjERo5YvDGYf b00= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 04 Oct 2023 00:03:04 -0700 IronPort-SDR: N503Q1l6AQ2yqCQtEZfqH3hSDxANp+eLAKJrvkCh9J4SSOIlycDddY2QJEgYBgXtXFlwMY+7yD H59TshsF7ZIJMxi9H8/8GsOI7gLaXaMbzM06/Fe/WI5l/06DtwMDYwxq3k8yxtpr0FRz1SVtSl cCNF09WcuMvjedLBeK/0HUpCbhOP+u1RSlKwlECTNaVswS0DUelCtaO1zvIzIvAo9ppUXi7s9H k2+ZoKUtU+aAULQqS/z5Wt8YKgMRg+wwYl+wVEWo2CXMn3LN9GVprzYZAnAcXoorRa/6MYW2c0 RHs= WDCIronportException: Internal Received: from unknown (HELO redsun91.ssa.fujisawa.hgst.com) ([10.149.66.6]) by uls-op-cesaip01.wdc.com with ESMTP; 04 Oct 2023 00:56:25 -0700 From: Johannes Thumshirn Date: Wed, 04 Oct 2023 00:56:18 -0700 Subject: [PATCH v3 3/4] btrfs: remove raid stride length in tree printer MIME-Version: 1.0 Message-Id: <20231004-rst-updates-v3-3-7729c4474ade@wdc.com> References: <20231004-rst-updates-v3-0-7729c4474ade@wdc.com> In-Reply-To: <20231004-rst-updates-v3-0-7729c4474ade@wdc.com> To: Chris Mason , Josef Bacik , David Sterba Cc: Qu Wenru , Damien Le Moal , Naohiro Aota , 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=1696406180; l=903; i=johannes.thumshirn@wdc.com; s=20230613; h=from:subject:message-id; bh=e+YyfDQ1PFX4rBIrEPfhcrCD3fDnJ1asPXocJQ97CxI=; b=+Dk11t5dxqsV4xH3DcQn0eUXJ+m+asjEZZbUU4ZqwWJM+BSx7zTVyvSM6tqpdmJ4B3/bT9dHA 7HDB8bLUa5YC6LsjTPSQchwKFOUV0vBdmhzAMUF4d6GKG9iK1FKPWDZ X-Developer-Key: i=johannes.thumshirn@wdc.com; a=ed25519; pk=TGmHKs78FdPi+QhrViEvjKIGwReUGCfa+3LEnGoR2KM= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_NONE,URIBL_BLOCKED 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, 04 Oct 2023 00:56:50 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778810839056043000 X-GMAIL-MSGID: 1778810839056043000 Signed-off-by: Johannes Thumshirn --- fs/btrfs/print-tree.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c index 2ade2672ed58..7e46aa8a0444 100644 --- a/fs/btrfs/print-tree.c +++ b/fs/btrfs/print-tree.c @@ -215,10 +215,9 @@ static void print_raid_stripe_key(const struct extent_buffer *eb, u32 item_size, btrfs_raid_array[encoding].raid_name : "unknown"); for (int i = 0; i < num_stripes; i++) - pr_info("\t\t\tstride %d devid %llu physical %llu length %llu\n", + pr_info("\t\t\tstride %d devid %llu physical %llu\n", i, btrfs_raid_stride_devid(eb, &stripe->strides[i]), - btrfs_raid_stride_physical(eb, &stripe->strides[i]), - btrfs_raid_stride_length(eb, &stripe->strides[i])); + btrfs_raid_stride_physical(eb, &stripe->strides[i])); } /* From patchwork Wed Oct 4 07:56:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 148170 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2593034vqb; Wed, 4 Oct 2023 00:56:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGjDppBoTsb81t2d2t1+qyduOr0o/fgIswLj3WvHdlKTUj0wW7RS8jZvWXdP7luvpT4++H8 X-Received: by 2002:a05:6808:d49:b0:3a6:fbe3:45cf with SMTP id w9-20020a0568080d4900b003a6fbe345cfmr1725064oik.35.1696406211212; Wed, 04 Oct 2023 00:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696406211; cv=none; d=google.com; s=arc-20160816; b=NtQlWPMyOzPoPYAwbZMRnIMCMnjiwM73fIDzj7WnczQXTmE9Oi628osmzo5d//rOnT nfhSBT6WNrJgbIC+BIoGkZbMEQ2LlUGyzOzA61WF1Gi0X1PMoCK13VzBHASdOeY8qBBQ BjS3iPVOeaKxG3z3xbboo9HHHxXp9MqvyFJK0pyd7NstDP++RMs/wQU2vLhN7kmPBBPX T+Cm8ODgHp8phXQLYA/KoWVV7bmJpszK96aoA6l1KVhp5cpnmOjVvw++BIXefjFwHhRB m9RDlLZ1g795jyByK31tNgod5IbtgiOw3LbSoKAH6YsoLXc6U1gJd3oZQ4yVoz/4ZuXe MZ5Q== 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=JiWZo4nKQcGF0wSey/S87RFq86N7MijFW4IfEk5VOoM=; fh=7eaqsdLjxP6rgu5SvlnX6/iVNbUoDSlcFLfI/7YtxbA=; b=oxx9hR5mbg8B3TfLeYX4ELnmFjjbHDbFl1eIh61FBBbU+WY5WLwD7HafneDa5yyAnJ GYuUTrXuoW4Yn8yY0m4/JNutScz5tpLPt/pwxp+r7+tsmQvAOnsU24+uSt2pvdrYPhkr l1PZwZPnvHwmQX+lziNSsGS6brV2e6s2SGQk7UJfOx4EGhouFQhnw8KnkHlw7BuD676l 687DdJG7K+z6QUjR/EjVJB9A5nQp9ge9JwTotg34EgYxfr+a5TuiyBdRc09PQi8TvuPi Bu17bBRpUc5/v9oSIrAhCnBPTNLWw6GpY1UXCemlafhosFkMwlKjytUklMMW8p3i0FQX h1hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=fDU1qJh9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id f19-20020a63f113000000b00578d5a135dasi3275550pgi.891.2023.10.04.00.56.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 00:56:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=fDU1qJh9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 826168315C91; Wed, 4 Oct 2023 00:56:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241648AbjJDH4n (ORCPT + 18 others); Wed, 4 Oct 2023 03:56:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232790AbjJDH4b (ORCPT ); Wed, 4 Oct 2023 03:56:31 -0400 Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59E10A7; Wed, 4 Oct 2023 00:56: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=1696406188; x=1727942188; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=dfxEmiitU7sG/JHVT8Owzk/9e9RSoVO37pAJFjGfI8U=; b=fDU1qJh99wywnS1oE8VmnXI8zLvC3TuRr3M89Ko41hokpojP//DBvowX q+4S9XbLxySboYB54uryrKhHK6Rpy0KrtzgHCfGMbAbMk3v3VY2bZeITd aAv7DRCwjPEshv1NDIgFt56OWWUSyEEe5SSed6tZ+DToc6/Cr2QR4sO7T Osqxl3qIHOsGLKeRx3YyRERq0ZI4Qz3/o87J0d9gO87+uP4C7+Bsv8HRQ 67rW0rO6qB90jOiBaUzFacalh4cheSvGvsv/koID3Ic3l4HXjhn25Yslu sa76YHeegHMGMTQVlyWE/EP/Hsqave3pgjdkkTbDTfuUIcdkE+XFMKr0+ Q==; X-CSE-ConnectionGUID: SONxoOqNTSiNChR+QWqYmw== X-CSE-MsgGUID: CsyGpB5VQryE5hgB4ycYKA== X-IronPort-AV: E=Sophos;i="6.03,199,1694707200"; d="scan'208";a="351024176" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 04 Oct 2023 15:56:27 +0800 IronPort-SDR: KJYwXBMtsvDy2SLJtp0BEncQKjTzJfMK1Xz9fYmsUcivFm9YnykudaecVRnkd8Vm6cd0PU4FLV KLv01gZDf17otO6VTOwB7cYUN+5AZ/u4eCi3eJFKt/aMedWg1qEHUp35AwG1y1eRNQJBlXf9qp xSJKfS6rghsIXoCMyIqGgzhTOgKVWAwxZOSZrsv1BH4inJSzB8CMSLEDA+oGSPpqRVz4ZDwDth D//GNVgFa2Q7xQqQvuRn+fTSfszHIwR481Hwywsg0ZhkbTgE2pk9CY5ogK9KxsxGSbIva0M7Hv JEg= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 04 Oct 2023 00:03:06 -0700 IronPort-SDR: 88I+pvM7gpFB+3mWbzpar/sEOU2uc5ulMuQCzqyPrRtyCzCxsojQtmbRKuWHM3zxjamBZXcdpt a33m9yWOOdhBCOBACh8DYRtDwAH3NMK+O97rUQqn4BfYUZsxmm5QFJeQgB1BY8l5L7+cPyZ0NC Sc3nqrWLJw6x+yKLPjOHTF7bgouZHClg4n7GEe7EgSANWJPQksKkeSJOfxLgnJC1z8J9jS7FXN PoVAn5LCv2QDGJw7oK2MJuXMwsHPJwE3NxSYVwHTTHzR5U0zjQM+Tu3Z6Ma1VVK/iVTK42pyvE eZc= WDCIronportException: Internal Received: from unknown (HELO redsun91.ssa.fujisawa.hgst.com) ([10.149.66.6]) by uls-op-cesaip01.wdc.com with ESMTP; 04 Oct 2023 00:56:27 -0700 From: Johannes Thumshirn Date: Wed, 04 Oct 2023 00:56:19 -0700 Subject: [PATCH v3 4/4] btrfs: remove stride length from on-disk format MIME-Version: 1.0 Message-Id: <20231004-rst-updates-v3-4-7729c4474ade@wdc.com> References: <20231004-rst-updates-v3-0-7729c4474ade@wdc.com> In-Reply-To: <20231004-rst-updates-v3-0-7729c4474ade@wdc.com> To: Chris Mason , Josef Bacik , David Sterba Cc: Qu Wenru , Damien Le Moal , Naohiro Aota , 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=1696406180; l=1791; i=johannes.thumshirn@wdc.com; s=20230613; h=from:subject:message-id; bh=dfxEmiitU7sG/JHVT8Owzk/9e9RSoVO37pAJFjGfI8U=; b=s6VAEOI6hGci33EzTXGqgS6KT3PosuQjrI0B71UqwFPeITDPjpcu89WQNJjMWdbvYyu3BQoAc EeB+Sie1ELjAaA+sDBZ9QPjAt7yrcs0v/B6yW9hXGGQgV9+CLW7n5NT X-Developer-Key: i=johannes.thumshirn@wdc.com; a=ed25519; pk=TGmHKs78FdPi+QhrViEvjKIGwReUGCfa+3LEnGoR2KM= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_NONE,URIBL_BLOCKED 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 (howler.vger.email [0.0.0.0]); Wed, 04 Oct 2023 00:56:50 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778810839634541232 X-GMAIL-MSGID: 1778810839634541232 Signed-off-by: Johannes Thumshirn --- fs/btrfs/accessors.h | 2 -- include/uapi/linux/btrfs_tree.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/fs/btrfs/accessors.h b/fs/btrfs/accessors.h index b780d9087490..aa0844535644 100644 --- a/fs/btrfs/accessors.h +++ b/fs/btrfs/accessors.h @@ -309,12 +309,10 @@ BTRFS_SETGET_STACK_FUNCS(stack_timespec_nsec, struct btrfs_timespec, nsec, 32); BTRFS_SETGET_FUNCS(stripe_extent_encoding, struct btrfs_stripe_extent, encoding, 8); BTRFS_SETGET_FUNCS(raid_stride_devid, struct btrfs_raid_stride, devid, 64); BTRFS_SETGET_FUNCS(raid_stride_physical, struct btrfs_raid_stride, physical, 64); -BTRFS_SETGET_FUNCS(raid_stride_length, struct btrfs_raid_stride, length, 64); BTRFS_SETGET_STACK_FUNCS(stack_stripe_extent_encoding, struct btrfs_stripe_extent, encoding, 8); BTRFS_SETGET_STACK_FUNCS(stack_raid_stride_devid, struct btrfs_raid_stride, devid, 64); BTRFS_SETGET_STACK_FUNCS(stack_raid_stride_physical, struct btrfs_raid_stride, physical, 64); -BTRFS_SETGET_STACK_FUNCS(stack_raid_stride_length, struct btrfs_raid_stride, length, 64); /* struct btrfs_dev_extent */ BTRFS_SETGET_FUNCS(dev_extent_chunk_tree, struct btrfs_dev_extent, chunk_tree, 64); diff --git a/include/uapi/linux/btrfs_tree.h b/include/uapi/linux/btrfs_tree.h index 9fafcaebf44d..c25fc9614594 100644 --- a/include/uapi/linux/btrfs_tree.h +++ b/include/uapi/linux/btrfs_tree.h @@ -737,8 +737,6 @@ struct btrfs_raid_stride { __le64 devid; /* The physical location on disk. */ __le64 physical; - /* The length of stride on this disk. */ - __le64 length; } __attribute__ ((__packed__)); /* The stripe_extent::encoding, 1:1 mapping of enum btrfs_raid_types. */