From patchwork Tue May 8 04:41:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allison Henderson X-Patchwork-Id: 10385337 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3367A60353 for ; Tue, 8 May 2018 04:43:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24FEE28CA9 for ; Tue, 8 May 2018 04:43:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19D9728CBD; Tue, 8 May 2018 04:43:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B174028CBF for ; Tue, 8 May 2018 04:43:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752671AbeEHEnm (ORCPT ); Tue, 8 May 2018 00:43:42 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:33552 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752682AbeEHEnc (ORCPT ); Tue, 8 May 2018 00:43:32 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w484fAq6066291 for ; Tue, 8 May 2018 04:43:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references; s=corp-2017-10-26; bh=av7/UPXPRx4a2GOgL8sMTXdK31rZr2m1hTT4QzN5QOw=; b=Gpw51Z2pHl4kIvrjnLHx7GV/FOGhCjP1Ul5/PD07KI4uWYDRyfJhTNYms+BBAlgYuVaW fbXwBwuTJ9TbSpOFkDIJPGqBD6J8/RaiH9mvcfzkSRQd/FZUob6v053gb/Y7KAmsMnfP YLDyAKyJwkBAf7PS4ibxy6DRsb8CeuB/lyG5hY3qfwA+CgMSMdJIX6VJwAIRzq2KKg2b weC4N1n6rayOjbQlfh3a1an44jouBRGlpkcIjCRjUpM43y3uKPFsJEeN2qwNLxXyVI9h dEPs97P+Vt9hm00qSHiNTdCThndFiCMODEh7t+h0Pfct/MFu0WPEg30q22HzQrig759i MQ== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2hs426eur0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 08 May 2018 04:43:32 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w484hVV5024217 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 8 May 2018 04:43:31 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w484hVR9025149 for ; Tue, 8 May 2018 04:43:31 GMT Received: from localhost.localdomain (/72.210.40.165) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 07 May 2018 21:43:30 -0700 From: Allison Henderson To: linux-xfs@vger.kernel.org Subject: [PATCH 18/21] xfsprogs: Add parent pointer flag to cmd Date: Mon, 7 May 2018 21:41:16 -0700 Message-Id: <1525754479-12177-19-git-send-email-allison.henderson@oracle.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525754479-12177-1-git-send-email-allison.henderson@oracle.com> References: <1525754479-12177-1-git-send-email-allison.henderson@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8886 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=980 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805080047 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Allison Henderson Signed-off-by: --- mkfs/xfs_mkfs.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c index 78d0ce5..554e1bf 100644 --- a/mkfs/xfs_mkfs.c +++ b/mkfs/xfs_mkfs.c @@ -129,6 +129,7 @@ enum { M_UUID, M_RMAPBT, M_REFLINK, + M_PARENT, M_MAX_OPTS, }; @@ -663,6 +664,7 @@ struct opt_params mopts = { [M_UUID] = "uuid", [M_RMAPBT] = "rmapbt", [M_REFLINK] = "reflink", + [M_PARENT] = "parent", }, .subopt_params = { { .index = M_CRC, @@ -693,6 +695,13 @@ struct opt_params mopts = { .maxval = 1, .defaultval = 1, }, + { .index = M_PARENT, + .conflicts = { {NULL, LAST_CONFLICT } }, + .minval = 0, + .maxval = 1, + .defaultval = 0, + }, + }, }; @@ -865,7 +874,7 @@ usage( void ) { fprintf(stderr, _("Usage: %s\n\ /* blocksize */ [-b size=num]\n\ -/* metadata */ [-m crc=0|1,finobt=0|1,uuid=xxx,rmapbt=0|1,reflink=0|1]\n\ +/* metadata */ [-m crc=0|1,finobt=0|1,uuid=xxx,rmapbt=0|1,reflink=0|1,parent=0|1]\n\ /* data subvol */ [-d agcount=n,agsize=n,file,name=xxx,size=num,\n\ (sunit=value,swidth=value|su=num,sw=num|noalign),\n\ sectsize=num\n\ @@ -1586,6 +1595,9 @@ meta_opts_parser( case M_REFLINK: cli->sb_feat.reflink = getnum(value, opts, subopt); break; + case M_PARENT: + cli->sb_feat.parent_pointers = getnum(value, &mopts, M_PARENT); + break; default: return -EINVAL; } @@ -2887,6 +2899,8 @@ sb_set_features( sbp->sb_features_ro_compat |= XFS_SB_FEAT_RO_COMPAT_RMAPBT; if (fp->reflink) sbp->sb_features_ro_compat |= XFS_SB_FEAT_RO_COMPAT_REFLINK; + if (fp->parent_pointers) + sbp->sb_features_ro_compat |= XFS_SB_FEAT_RO_COMPAT_PARENT; /* * Sparse inode chunk support has two main inode alignment requirements.