From patchwork Wed Nov 25 20:38:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11932173 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C1FEC6379D for ; Wed, 25 Nov 2020 20:39:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D9311207BC for ; Wed, 25 Nov 2020 20:39:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="obWqG2Nk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730245AbgKYUie (ORCPT ); Wed, 25 Nov 2020 15:38:34 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:42518 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730181AbgKYUie (ORCPT ); Wed, 25 Nov 2020 15:38:34 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0APKOwfu027994; Wed, 25 Nov 2020 20:38:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=afLSJsApfnk8Spq4NBW0T2POdgCrg76mAoCA2IOmFoA=; b=obWqG2NknyVGSEi1hbVy90ruzzzaXKIpevHnLuHpW8JR7MEBRbjouPehB8b2nQbgqCOK Mb7Jc9o6tdmpGRPn8Pt05GBzzRNSIavZYkXlLx7kZd7FSq9r0j48qjjf/JmG3ILqAz3X NZjhcBYOmobKLjuwrBnxk2hVo1UJCBESkn/AhUv/1oAUOAimbZe8FTmShk2A1zYrQVhE VfWS/FVT9t8lEk8bKr69us3F1w21YyXCxDdd1AzQ3HWECmBWb0/vvsczs0lA6E/Khw1Q mAhPjW+T+XVTTktW/ZHuoKEhm64xFTBayiWGxM/55LkfbI5u2oie8IBzxOPZ5ZkNNFjs 1w== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2130.oracle.com with ESMTP id 351kwhbb9v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 25 Nov 2020 20:38:32 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0APKQ4cE066276; Wed, 25 Nov 2020 20:38:32 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 351n2jdyus-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Nov 2020 20:38:32 +0000 Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0APKcVcN004559; Wed, 25 Nov 2020 20:38:31 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 25 Nov 2020 12:38:31 -0800 Subject: [PATCH v3 0/2] xfs_db: add minimal directory navigation From: "Darrick J. Wong" To: sandeen@sandeen.net, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Date: Wed, 25 Nov 2020 12:38:30 -0800 Message-ID: <160633671056.635630.15067741092455507598.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9816 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 bulkscore=0 mlxlogscore=999 spamscore=0 phishscore=0 malwarescore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011250127 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9816 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxscore=0 impostorscore=0 suspectscore=0 adultscore=0 bulkscore=0 phishscore=0 malwarescore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011250127 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Hi all, Improve the usability of xfs_db by enabling users to navigate to inodes by path and to list the contents of directories. v2: Various cleanups and reorganizing suggested by dchinner v3: Rebase to 5.10-rc0 If you're going to start using this mess, you probably ought to just pull from my git trees, which are linked below. This is an extraordinary way to destroy everything. Enjoy! Comments and questions are, as always, welcome. --D xfsprogs git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=xfs_db-directory-navigation fstests git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=xfs_db-directory-navigation --- db/Makefile | 3 db/command.c | 1 db/command.h | 1 db/namei.c | 612 ++++++++++++++++++++++++++++++++++++++++++++++ libxfs/libxfs_api_defs.h | 1 man/man8/xfs_db.8 | 20 ++ 6 files changed, 637 insertions(+), 1 deletion(-) create mode 100644 db/namei.c