From patchwork Thu Feb 16 21:17:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13143977 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 8A1CFC636CC for ; Thu, 16 Feb 2023 21:17:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229670AbjBPVRe (ORCPT ); Thu, 16 Feb 2023 16:17:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbjBPVRd (ORCPT ); Thu, 16 Feb 2023 16:17:33 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B39FD3B864; Thu, 16 Feb 2023 13:17:32 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 2D4C6CE2D87; Thu, 16 Feb 2023 21:17:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7EBB0C433EF; Thu, 16 Feb 2023 21:17:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676582249; bh=zYRO7r+SwI2mPlJoKhgq5W0hdNeoj4wIsL8E2RVqWyc=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=qUuXsiIjo7sC58SqOzeStDsrnOxiPx0p4FDQsH5LTSwY2M7uEva8p1BScQ7m1vUp5 fU7jKGlM0Z+95ZnSaD52kByQAhEyKvLKorE2EoW9yVmeXF6lECC+2Pmn8yal1M0ocp +Y4hGQyhLI5pmAXpO8FYcRRCY698SztCDbALRNTbif1L3y5DtejLk5T1zWdNEXDLz2 DhNylAEJ+rJUDao+9HC2CrtxVeem0gHY9pOIsodtcEgxjlhUu5WDIVECDYUR9KmNv9 q0uhyeQPCOZ1NTgXPOBgBHSX/19xXuW26bGOBkY62kV+mer876pXNoTQNT4jIpvs8D vAnOU0+O/dbZA== Date: Thu, 16 Feb 2023 13:17:29 -0800 Subject: [PATCH 1/4] misc: adjust for parent pointers with namehashes From: "Darrick J. Wong" To: djwong@kernel.org, zlang@redhat.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Message-ID: <167657884992.3481738.2422247894183594548.stgit@magnolia> In-Reply-To: <167657884979.3481738.5353655058338554587.stgit@magnolia> References: <167657884979.3481738.5353655058338554587.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Signed-off-by: Darrick J. Wong --- tests/xfs/021.out.parent | 8 ++++---- tests/xfs/122.out | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/xfs/021.out.parent b/tests/xfs/021.out.parent index 661d130239..e7ed72fc27 100644 --- a/tests/xfs/021.out.parent +++ b/tests/xfs/021.out.parent @@ -19,9 +19,9 @@ size of attr value = 65536 *** unmount FS *** dump attributes (1) -a.sfattr.hdr.totsize = 53 +a.sfattr.hdr.totsize = 113 a.sfattr.hdr.count = 3 -a.sfattr.list[0].namelen = 16 +a.sfattr.list[0].namelen = 76 a.sfattr.list[0].valuelen = 10 a.sfattr.list[0].root = 0 a.sfattr.list[0].value = "testfile.1" @@ -40,7 +40,7 @@ hdr.info.forw = 0 hdr.info.back = 0 hdr.info.magic = 0xfbee hdr.count = 4 -hdr.usedbytes = 84 +hdr.usedbytes = 144 hdr.firstused = FIRSTUSED hdr.holes = 0 hdr.freemap[0-2] = [base,size] [FREEMAP..] @@ -54,7 +54,7 @@ nvlist[1].valuelen = 65535 nvlist[1].namelen = 2 nvlist[1].name = "a3" nvlist[2].valuelen = 10 -nvlist[2].namelen = 16 +nvlist[2].namelen = 76 nvlist[2].value = "testfile.2" nvlist[3].valuelen = 8 nvlist[3].namelen = 7 diff --git a/tests/xfs/122.out b/tests/xfs/122.out index c5958d1b99..97be93274e 100644 --- a/tests/xfs/122.out +++ b/tests/xfs/122.out @@ -109,8 +109,8 @@ sizeof(struct xfs_legacy_timestamp) = 8 sizeof(struct xfs_log_dinode) = 176 sizeof(struct xfs_log_legacy_timestamp) = 8 sizeof(struct xfs_map_extent) = 32 -sizeof(struct xfs_parent_name_irec) = 32 -sizeof(struct xfs_parent_name_rec) = 16 +sizeof(struct xfs_parent_name_irec) = 96 +sizeof(struct xfs_parent_name_rec) = 76 sizeof(struct xfs_parent_ptr) = 280 sizeof(struct xfs_phys_extent) = 16 sizeof(struct xfs_pptr_info) = 104 From patchwork Thu Feb 16 21:17:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13143978 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 D2523C636CC for ; Thu, 16 Feb 2023 21:17:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230063AbjBPVRt (ORCPT ); Thu, 16 Feb 2023 16:17:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbjBPVRs (ORCPT ); Thu, 16 Feb 2023 16:17:48 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92E1B3B864; Thu, 16 Feb 2023 13:17:47 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4E32FB82922; Thu, 16 Feb 2023 21:17:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A6CDC433EF; Thu, 16 Feb 2023 21:17:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676582265; bh=E65fkd2+civEMD0c2iT5AGe5o+ua8oEpT6heoSul1gA=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=gpCC97x0P552yDGm1vxCvraNuGZayXvHZeUk4HV2RgArYuL6KKjDBnZtr051eNc48 iosEugw7QueNr9SC0D2VIEwFPsnPDprVlk+lUUfR35k5QETkb8j1orTC0Vvw4IRUIM 82q/B2bclLe3vigVpxyErQ4f50JE4MigGjR6brYpBXkelUWieUJT7R6/DnRcsOsYjy JEDuPoHWv6L+FET9/p4/XbPDwzeXnXXXahBuZkK/shdngOeXnhEILFjD7dpeQFImeE UOGYbVSOA+ziQ74P41poMsvAH/5r811I2C9ldvqD3kgtTETMLSPWIz57CqgBa3JIm6 gFunWU0Wp5EvQ== Date: Thu, 16 Feb 2023 13:17:44 -0800 Subject: [PATCH 2/4] xfs/021: adjust for short parent pointers with hashes From: "Darrick J. Wong" To: djwong@kernel.org, zlang@redhat.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Message-ID: <167657885005.3481738.10589861682942722453.stgit@magnolia> In-Reply-To: <167657884979.3481738.5353655058338554587.stgit@magnolia> References: <167657884979.3481738.5353655058338554587.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Adjust this again to handle shortened namehashes. Signed-off-by: Darrick J. Wong --- tests/xfs/021.out.parent | 20 ++++++++++---------- tests/xfs/122.out | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/xfs/021.out.parent b/tests/xfs/021.out.parent index e7ed72fc27..837b17ffdf 100644 --- a/tests/xfs/021.out.parent +++ b/tests/xfs/021.out.parent @@ -19,9 +19,9 @@ size of attr value = 65536 *** unmount FS *** dump attributes (1) -a.sfattr.hdr.totsize = 113 +a.sfattr.hdr.totsize = 59 a.sfattr.hdr.count = 3 -a.sfattr.list[0].namelen = 76 +a.sfattr.list[0].namelen = 22 a.sfattr.list[0].valuelen = 10 a.sfattr.list[0].root = 0 a.sfattr.list[0].value = "testfile.1" @@ -40,7 +40,7 @@ hdr.info.forw = 0 hdr.info.back = 0 hdr.info.magic = 0xfbee hdr.count = 4 -hdr.usedbytes = 144 +hdr.usedbytes = 88 hdr.firstused = FIRSTUSED hdr.holes = 0 hdr.freemap[0-2] = [base,size] [FREEMAP..] @@ -53,12 +53,12 @@ nvlist[1].valueblk = 0x1 nvlist[1].valuelen = 65535 nvlist[1].namelen = 2 nvlist[1].name = "a3" -nvlist[2].valuelen = 10 -nvlist[2].namelen = 76 -nvlist[2].value = "testfile.2" -nvlist[3].valuelen = 8 -nvlist[3].namelen = 7 -nvlist[3].name = "a2-----" -nvlist[3].value = "value_2\d" +nvlist[2].valuelen = 8 +nvlist[2].namelen = 7 +nvlist[2].name = "a2-----" +nvlist[2].value = "value_2\d" +nvlist[3].valuelen = 10 +nvlist[3].namelen = 22 +nvlist[3].value = "testfile.2" *** done *** unmount diff --git a/tests/xfs/122.out b/tests/xfs/122.out index 97be93274e..5233aaad5f 100644 --- a/tests/xfs/122.out +++ b/tests/xfs/122.out @@ -110,7 +110,7 @@ sizeof(struct xfs_log_dinode) = 176 sizeof(struct xfs_log_legacy_timestamp) = 8 sizeof(struct xfs_map_extent) = 32 sizeof(struct xfs_parent_name_irec) = 96 -sizeof(struct xfs_parent_name_rec) = 76 +sizeof(struct xfs_parent_name_rec) = 12 sizeof(struct xfs_parent_ptr) = 280 sizeof(struct xfs_phys_extent) = 16 sizeof(struct xfs_pptr_info) = 104 From patchwork Thu Feb 16 21:18:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13143979 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 F2129C636CC for ; Thu, 16 Feb 2023 21:18:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229637AbjBPVSF (ORCPT ); Thu, 16 Feb 2023 16:18:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229563AbjBPVSE (ORCPT ); Thu, 16 Feb 2023 16:18:04 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39C532727; Thu, 16 Feb 2023 13:18:03 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E7B49B82922; Thu, 16 Feb 2023 21:18:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9471C433D2; Thu, 16 Feb 2023 21:18:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676582280; bh=XooRrfKYY8n5zjVefIFGfHMziObRmtfKZ6kNPvr55/U=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=BK45vI0iJuBP/nBQhrrJufzZVO/rhxGrLMYvxMBwryrmmfocD01cTYqiCpOXNESWr xxX7n7rT1NQqKPIBnD7zVyKXBVgZjSNJJ2wHZS3Od0VcMfl9B0MtkwXRNHRrqhMVCf Iim4MSV1XlSk0E5fpREFvunpYMoeauMwbWX894HOwdaW1pndzumbn6hXybeo7PWSFF E33f+Lsq07amFYBzt4veXErIUKU4IGQ8/xABFSQG1NuORKUFjJDjdVuDLMG04VysCm 2bYk5a02nO/bNUHSXZSonnzo5BfmjIceU1IvyOyou3RYqY+iqy+kireDBIcpL9zH+q 6UzFqUOWCASRw== Date: Thu, 16 Feb 2023 13:18:00 -0800 Subject: [PATCH 3/4] xfs/242: fix _filter_bmap for xfs_io bmap that does rt file properly From: "Darrick J. Wong" To: djwong@kernel.org, zlang@redhat.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Message-ID: <167657885018.3481738.12498949635668558816.stgit@magnolia> In-Reply-To: <167657884979.3481738.5353655058338554587.stgit@magnolia> References: <167657884979.3481738.5353655058338554587.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong xfsprogs commit XXXXX ("xfs_io: fix bmap command not detecting realtime files with xattrs") fixed the xfs_io bmap output to display realtime file columns for realtime files with xattrs. As a result, the data and unwritten flags are in column 5 and not column 7. Signed-off-by: Darrick J. Wong --- common/punch | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/punch b/common/punch index 3b8be21a2a..9e730404e2 100644 --- a/common/punch +++ b/common/punch @@ -188,6 +188,7 @@ _filter_hole_fiemap() _coalesce_extents } +# Column 7 for datadev files and column 5 for rtdev files # 10000 Unwritten preallocated extent # 01000 Doesn't begin on stripe unit # 00100 Doesn't end on stripe unit @@ -200,6 +201,13 @@ _filter_bmap() print $1, $2, $3; next; } + $5 ~ /1[01][01][01][01]/ { + print $1, $2, "unwritten"; + next; + } + $5 ~ /0[01][01][01][01]/ { + print $1, $2, "data" + } $7 ~ /1[01][01][01][01]/ { print $1, $2, "unwritten"; next; From patchwork Thu Feb 16 21:18:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13143980 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 D4386C61DA4 for ; Thu, 16 Feb 2023 21:18:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229651AbjBPVSU (ORCPT ); Thu, 16 Feb 2023 16:18:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229563AbjBPVST (ORCPT ); Thu, 16 Feb 2023 16:18:19 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFCED497EF; Thu, 16 Feb 2023 13:18:18 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 73A91B82922; Thu, 16 Feb 2023 21:18:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36822C433EF; Thu, 16 Feb 2023 21:18:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676582296; bh=k7ZipMDuZMxV6VbdH454mer6JK5pZi2G89n0U2BIf+I=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=gajoy8iyTZIvmEwLhQCMSfFkc758gFLlBw+FVbEg4sr9tfuadPUuRGZG62l12ZvlL Oem7WbJYB705VLhiCBubo8miCRh6htJDW1fQlB+JnJ27nQ/sWZDc0K5NnItsf/3z1b 6rIMogPBAWtuAH+gU9h/eTPff2ct1GhtMzF6M6cRBU0CWg96SEiOyAHzsK5/XJwpPO /wzziaKvU7rEqoo6K2PnRJZi2sJk4QEcY3DsWdUAF+r7L7HxHzBOHaKWIAk0wsDlom kiQssbYvswq3FftXndewr3StiOtUQGWUqfzRzxnHAGYhJBW/fRCvRbMlmcZ8g3lqfM ZFcGMu36/xPHQ== Date: Thu, 16 Feb 2023 13:18:15 -0800 Subject: [PATCH 4/4] xfs/021: adjust for short valuelens From: "Darrick J. Wong" To: djwong@kernel.org, zlang@redhat.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me Message-ID: <167657885031.3481738.6815427580927744278.stgit@magnolia> In-Reply-To: <167657884979.3481738.5353655058338554587.stgit@magnolia> References: <167657884979.3481738.5353655058338554587.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Signed-off-by: Darrick J. Wong --- tests/xfs/021.out.parent | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/xfs/021.out.parent b/tests/xfs/021.out.parent index 837b17ffdf..c43dd15900 100644 --- a/tests/xfs/021.out.parent +++ b/tests/xfs/021.out.parent @@ -19,12 +19,11 @@ size of attr value = 65536 *** unmount FS *** dump attributes (1) -a.sfattr.hdr.totsize = 59 +a.sfattr.hdr.totsize = 49 a.sfattr.hdr.count = 3 a.sfattr.list[0].namelen = 22 -a.sfattr.list[0].valuelen = 10 +a.sfattr.list[0].valuelen = 0 a.sfattr.list[0].root = 0 -a.sfattr.list[0].value = "testfile.1" a.sfattr.list[1].namelen = 2 a.sfattr.list[1].valuelen = 3 a.sfattr.list[1].root = 0 @@ -40,7 +39,7 @@ hdr.info.forw = 0 hdr.info.back = 0 hdr.info.magic = 0xfbee hdr.count = 4 -hdr.usedbytes = 88 +hdr.usedbytes = 80 hdr.firstused = FIRSTUSED hdr.holes = 0 hdr.freemap[0-2] = [base,size] [FREEMAP..] @@ -57,8 +56,7 @@ nvlist[2].valuelen = 8 nvlist[2].namelen = 7 nvlist[2].name = "a2-----" nvlist[2].value = "value_2\d" -nvlist[3].valuelen = 10 +nvlist[3].valuelen = 0 nvlist[3].namelen = 22 -nvlist[3].value = "testfile.2" *** done *** unmount