From patchwork Fri Oct 6 06:58:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 13411001 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70357E92FF2 for ; Fri, 6 Oct 2023 06:58:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230266AbjJFG6R (ORCPT ); Fri, 6 Oct 2023 02:58:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230263AbjJFG6N (ORCPT ); Fri, 6 Oct 2023 02:58:13 -0400 Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27CB4F0 for ; Thu, 5 Oct 2023 23:58:12 -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=1696575492; x=1728111492; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=m/Q2cSep3CDXOJ9BwJ9y3w4Upsncw3q0fFlT9JrH+JA=; b=WjfTKazifD++GSxVFQaG41Mpc/9CC0PNKojwDC9c5nDJkCmcYf4oMTDO oqNfc7MF8Ho8RtZDSB+hCrlcTNUl5GO9ZKrf8H3NBv6s71wR4/DQPtDFn OJD0MbagNzkWdJoaWlGHoIAoljvavjLK4VRz5nWDNmmTwjblGNLAkljTf XOu5KJkV5kvY0wpBDfur2eT2kci6b8/co4zaoXdFt7/sBgX/GG5fd4S+M YAYn9PKJLB1FiHyOX91dh1M8Z2Cbd415lTYYGwqfNbrQpZoAsCngKBUvA dToSkDYvraUg0Nys5rPikmLHNlztFawtRKKnXZwtA4IacxAZi3jivWCqO g==; X-CSE-ConnectionGUID: GXdViT6UTNGywiJ0nTzD1Q== X-CSE-MsgGUID: puXnHVpRSEKsvhCMsWiD5w== X-IronPort-AV: E=Sophos;i="6.03,203,1694707200"; d="scan'208";a="357918320" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 06 Oct 2023 14:58:11 +0800 IronPort-SDR: j/qrVpeRWdogqWlDDUilEquqmWn/0EB+ZsxZ5SgJwuNGtQirvrLbWdNKn9tVlNDcYzughfgK/T QHfbCqiFy75ciEfFtXWp1qjTP581ZTbkv+oy/JGSBuszqyPhmDNZ9RZjUm8pTtiPS5zB3LLmO6 Qj1YOjSzHFsLnO+z5FowKgtQItz8A6hqAABKx5E1JAeW4LmR3K7CpAZKs4QcMCYm4GWL0fAXtO SdkxSUPOVZpVh0C2c/IS/t2OXk7mbJt/wJMBFoVOwESAZRqHvDvqz4h+zOFfNMrmMhGyWMlYbM NVA= 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; 05 Oct 2023 23:04:46 -0700 IronPort-SDR: 44pLuc8ayBIeVMwhk0va02CdKFfrgoQ8I6SHmXQCXr+fBev03gqvAcjY1n60A5SwaUYdHclwwc XARcHaoy8oEHHBSlUdJ/283H+TXLMxfdHKf14DRU8Rso6BPJwUzsvVTzWFNbIo0wN3hn1RgeeH 7Aisr6zANFv0x0y2NhPjS39HtlmWWzvi0Yudhs0uAQHaNk6TQ4kPPAgzZSuzQ3sZOxcKA/wyzT YWhAFgYezy3atkjx7cuSiQ/N/K25hYVLxWby1oxGy1PqUky24sUTggipZdAV7QnHsFZjzdROY+ w28= WDCIronportException: Internal Received: from unknown (HELO redsun91.ssa.fujisawa.hgst.com) ([10.149.66.6]) by uls-op-cesaip01.wdc.com with ESMTP; 05 Oct 2023 23:58:12 -0700 From: Johannes Thumshirn Date: Thu, 05 Oct 2023 23:58:02 -0700 Subject: [PATCH 1/2] btrfs-progs: remove stride length from tree dump MIME-Version: 1.0 Message-Id: <20231005-rst-update-v1-1-7ea5b3c6ac61@wdc.com> References: <20231005-rst-update-v1-0-7ea5b3c6ac61@wdc.com> In-Reply-To: <20231005-rst-update-v1-0-7ea5b3c6ac61@wdc.com> To: linux-btrfs@vger.kernel.org Cc: Johannes Thumshirn X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1696575490; l=1131; i=johannes.thumshirn@wdc.com; s=20230613; h=from:subject:message-id; bh=m/Q2cSep3CDXOJ9BwJ9y3w4Upsncw3q0fFlT9JrH+JA=; b=rAC31xAW0gtJ3bNGY7MlRWXuy7M0Fhsr2bOy4V0mZGvpmaSNwlXXm4uiOMIW4BYc7IWyTze1U Bgf3K2jz4ECBj0uB4wXpZGpHpnyOsMZEMvATvLGtzGl3qtqSMf6hyeO X-Developer-Key: i=johannes.thumshirn@wdc.com; a=ed25519; pk=TGmHKs78FdPi+QhrViEvjKIGwReUGCfa+3LEnGoR2KM= Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Fixes: ecd6fb44c172 ("btrfs-progs: add dump tree support for the raid stripe tree") Signed-off-by: Johannes Thumshirn --- kernel-shared/print-tree.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel-shared/print-tree.c b/kernel-shared/print-tree.c index 26524a13304c..7ec9035567f7 100644 --- a/kernel-shared/print-tree.c +++ b/kernel-shared/print-tree.c @@ -681,10 +681,9 @@ static void print_raid_stripe_key(struct extent_buffer *eb, printf("\t\t\tencoding: %s\n", stripe_encoding_name(encoding)); for (int i = 0; i < num_stripes; i++) - printf("\t\t\tstripe %d devid %llu physical %llu length %llu\n", i, + printf("\t\t\tstripe %d devid %llu physical %llu\n", i, (unsigned long long)btrfs_raid_stride_devid_nr(eb, stripe, i), - (unsigned long long)btrfs_raid_stride_offset_nr(eb, stripe, i), - (unsigned long long)btrfs_raid_stride_length_nr(eb, stripe, i)); + (unsigned long long)btrfs_raid_stride_offset_nr(eb, stripe, i)); } void print_key_type(FILE *stream, u64 objectid, u8 type) From patchwork Fri Oct 6 06:58:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 13411000 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A502E92FEF for ; Fri, 6 Oct 2023 06:58:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230256AbjJFG6Q (ORCPT ); Fri, 6 Oct 2023 02:58:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230246AbjJFG6N (ORCPT ); Fri, 6 Oct 2023 02:58:13 -0400 Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6538BF9 for ; Thu, 5 Oct 2023 23:58:12 -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=1696575492; x=1728111492; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=SezYm591g47TP1PjvlufnmlUdPRvpPMK5Q5FnaynkmE=; b=GnZqY5B29RZctFr1xNwbUZEtwn3zKMbTRngk5aT8NU9CpRFI/D902kOf QuG9jvbkTMB2cN8NGj023tv4MVveiDZTzHprt0DkfVWw6jnvXZ46FjTKT 5kd+tLiIOv3/1Zl9+UbxOtI3VJB1/Dp9ylecSR3K398mEo5jrEEJTU6GM KVGDznT3Adzb4p47rmc5ttEzkDZtTYnk+OWYoNlHGRmmQJkTTIkfaA11/ FlibgAQMFvzl6oNNd+rPKgjQGahMsQV/2cEe1++NlWuEZk9F7VLo8LGam c/+eBlLMUWXtZ8NUCdnUe5F/ojkSBQo+VlI8vW1y1DWZwyCx0Iv8HFagd A==; X-CSE-ConnectionGUID: JIE3gMGuQhaRP1sFssgaNQ== X-CSE-MsgGUID: KnTxumcFTqCsoJJJRRQJhQ== X-IronPort-AV: E=Sophos;i="6.03,203,1694707200"; d="scan'208";a="357918322" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 06 Oct 2023 14:58:12 +0800 IronPort-SDR: c++1DJkzhX5Yw9WFCqzoJ60iEhssj1imp2UUDtmeJxV6LrfjfIE5mRpBjiWiu5BjMvdXj/tYmg Eda0t3pJY5Y4jNeodXeUXvgBIgr3Qg5QamU7itHL+YBrnnkq3wZBxEo9dCbIMcpZg6lpzwyxp9 7hMBhBVs9urdT2+IFlWRSaL2N8CxvhTvaPTOTbni+bp3BCkLYk0wmKyrObh8pZZeNZK4+UgFS9 VbrL48ZwBgSl3FZiMow+SvfNJiceb2uuFAAAtd7gluq/G/+cDqLhzBu+ted6nsdqnLNl/iuQBv TCI= 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; 05 Oct 2023 23:04:46 -0700 IronPort-SDR: b+YKf5qLD25+PwXmXGrrLuD4AS8/B+Ww9zSwAcgX4iuB3dFhUubZh6Q1+yFWA8ErS1UAHK4LlL R0Ya21+dG3lggJe6EHscRewj3u3/xVAlsb/CRFsUlDgCb6tYjYwuat6262AcNKfnlmokPVsXdO +L2f1ZvdAXnklOwjFsEtM8hZXc1gKwOWt8t1hetw1wuLcmkUH3C6F9B3Hp+ysQGjONIKpCT+Ws Bc4QgvmJ6mzeAzbVpMAJFtzXljFN6z7YnDKryOYlg7duL7/jsfY40k8DCPgL0Dviws5m6JYShs 7FA= WDCIronportException: Internal Received: from unknown (HELO redsun91.ssa.fujisawa.hgst.com) ([10.149.66.6]) by uls-op-cesaip01.wdc.com with ESMTP; 05 Oct 2023 23:58:12 -0700 From: Johannes Thumshirn Date: Thu, 05 Oct 2023 23:58:03 -0700 Subject: [PATCH 2/2] btrfs-progs: remove stride length from on-disk format MIME-Version: 1.0 Message-Id: <20231005-rst-update-v1-2-7ea5b3c6ac61@wdc.com> References: <20231005-rst-update-v1-0-7ea5b3c6ac61@wdc.com> In-Reply-To: <20231005-rst-update-v1-0-7ea5b3c6ac61@wdc.com> To: linux-btrfs@vger.kernel.org Cc: Johannes Thumshirn X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1696575490; l=2060; i=johannes.thumshirn@wdc.com; s=20230613; h=from:subject:message-id; bh=SezYm591g47TP1PjvlufnmlUdPRvpPMK5Q5FnaynkmE=; b=XP0YJdJ8nYsNnKsdiQETcLTkSQL6lICvdXLzsF84ESdz4OKWGtXfg7uQdRWa29ZACbg4F9wvj XtAcUj9X5xOAmTVKkr8kzYnUdoLniwpdiLjNNB32OqXc2OWeI1rpRY5 X-Developer-Key: i=johannes.thumshirn@wdc.com; a=ed25519; pk=TGmHKs78FdPi+QhrViEvjKIGwReUGCfa+3LEnGoR2KM= Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Fixes: 0e6b800eb9d6 ("btrfs-progs: add raid stripe tree definitions") Signed-off-by: Johannes Thumshirn --- kernel-shared/accessors.h | 8 -------- kernel-shared/uapi/btrfs_tree.h | 2 -- 2 files changed, 10 deletions(-) diff --git a/kernel-shared/accessors.h b/kernel-shared/accessors.h index 688edf9e909f..bc613a55ba73 100644 --- a/kernel-shared/accessors.h +++ b/kernel-shared/accessors.h @@ -282,7 +282,6 @@ BTRFS_SETGET_FUNCS(free_space_flags, struct btrfs_free_space_info, flags, 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_offset, struct btrfs_raid_stride, offset, 64); -BTRFS_SETGET_FUNCS(raid_stride_length, struct btrfs_raid_stride, length, 64); static inline struct btrfs_raid_stride *btrfs_raid_stride_nr( struct btrfs_stripe_extent *dps, @@ -309,13 +308,6 @@ static inline u64 btrfs_raid_stride_offset_nr(struct extent_buffer *eb, return btrfs_raid_stride_offset(eb, btrfs_raid_stride_nr(dps, nr)); } -static inline u64 btrfs_raid_stride_length_nr(struct extent_buffer *eb, - struct btrfs_stripe_extent *dps, - int nr) -{ - return btrfs_raid_stride_length(eb, btrfs_raid_stride_nr(dps, nr)); -} - /* struct btrfs_inode_ref */ BTRFS_SETGET_FUNCS(inode_ref_name_len, struct btrfs_inode_ref, name_len, 16); BTRFS_SETGET_FUNCS(inode_ref_index, struct btrfs_inode_ref, index, 64); diff --git a/kernel-shared/uapi/btrfs_tree.h b/kernel-shared/uapi/btrfs_tree.h index 8d8898b93c07..32f2c2d7c29f 100644 --- a/kernel-shared/uapi/btrfs_tree.h +++ b/kernel-shared/uapi/btrfs_tree.h @@ -707,8 +707,6 @@ struct btrfs_raid_stride { __le64 devid; /* offset from the devextent start */ __le64 offset; - /* length of the stride on disk */ - __le64 length; } __attribute__ ((__packed__)); /* The stripe_extent::encoding, 1:1 mapping of enum btrfs_raid_types */