From patchwork Tue Jan 8 20:42:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10752865 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 900951515 for ; Tue, 8 Jan 2019 20:42:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B47D28CDF for ; Tue, 8 Jan 2019 20:42:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C9D628CD9; Tue, 8 Jan 2019 20:42:14 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, 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 E5D8F28CD9 for ; Tue, 8 Jan 2019 20:42:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728955AbfAHUmN (ORCPT ); Tue, 8 Jan 2019 15:42:13 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:49784 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728723AbfAHUmN (ORCPT ); Tue, 8 Jan 2019 15:42:13 -0500 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 x08KYRA0159673; Tue, 8 Jan 2019 20:42:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=ma05UzsOKXE4xRb3DF5bcPM6JCC7FhODO8BOqDqNadA=; b=yLXFax7LYnc/QDXZwYOuy9AzCbOZGyBKzUlrJUBtZ3ilBDb4fuSm73Xk9dNkUZG8N0tw K22+HvFY5fl6vfcYdBQScgHKw0u8ErIuUSPrI+BvlcCYH6nofXgrLoNRQHP3inwTQbGG f7lfzkiMYsynyHivbUXdHNoD1BUjDIjWfeafj73uXcJAshTTfR4J7De5JgIs9fHwVIO9 NViRD+/wSarA2+XFTaUci2YhXgRrdLpyuFk7SP1k+luRsGIonsh2JK2VqHtvJatcGLWl 9lLmpkTjPu/xN3AvTpKxmqUPF63w1lY9N9Qdd0Mx2lUXvTxTjQU/kNfI+hn9RgmFd0lk LA== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2ptm0u5wmf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 08 Jan 2019 20:42:11 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x08KgA93004782 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 8 Jan 2019 20:42:10 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x08KgAru010043; Tue, 8 Jan 2019 20:42:10 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 08 Jan 2019 12:42:10 -0800 Date: Tue, 8 Jan 2019 12:42:09 -0800 From: "Darrick J. Wong" To: linux-xfs@vger.kernel.org, sandeen@sandeen.net Subject: [PATCH 6/5] libxfs(progs): fix attr include mess Message-ID: <20190108204209.GT12689@magnolia> References: <154697976479.2839.3584921201780682011.stgit@magnolia> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <154697976479.2839.3584921201780682011.stgit@magnolia> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9130 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901080159 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 From: Darrick J. Wong Remove all the userspace xfs_attr shim cruft so that we have one definition of ATTR_* macros so that we can actually use xfs_attr.c routines and include xfs_attr.h without problems. Signed-off-by: Darrick J. Wong --- include/libxfs.h | 10 +--------- libxfs/libxfs_api_defs.h | 5 +++++ libxfs/libxfs_priv.h | 8 -------- libxfs/xfs_attr.c | 1 + libxfs/xfs_attr_leaf.c | 1 + 5 files changed, 8 insertions(+), 17 deletions(-) diff --git a/include/libxfs.h b/include/libxfs.h index 2bdef706..32dbb1c6 100644 --- a/include/libxfs.h +++ b/include/libxfs.h @@ -214,14 +214,6 @@ libxfs_bmbt_disk_get_all( int libxfs_rtfree_extent(struct xfs_trans *, xfs_rtblock_t, xfs_extlen_t); bool libxfs_verify_rtbno(struct xfs_mount *mp, xfs_rtblock_t rtbno); -/* XXX: need parts of xfs_attr.h in userspace */ -#define LIBXFS_ATTR_ROOT 0x0002 /* use attrs in root namespace */ -#define LIBXFS_ATTR_SECURE 0x0008 /* use attrs in security namespace */ -#define LIBXFS_ATTR_CREATE 0x0010 /* create, but fail if attr exists */ -#define LIBXFS_ATTR_REPLACE 0x0020 /* set, but fail if attr not exists */ - -int xfs_attr_remove(struct xfs_inode *dp, const unsigned char *name, int flags); -int xfs_attr_set(struct xfs_inode *dp, const unsigned char *name, - unsigned char *value, int valuelen, int flags); +#include "xfs_attr.h" #endif /* __LIBXFS_H__ */ diff --git a/libxfs/libxfs_api_defs.h b/libxfs/libxfs_api_defs.h index e10d78cd..2d5ff88f 100644 --- a/libxfs/libxfs_api_defs.h +++ b/libxfs/libxfs_api_defs.h @@ -150,4 +150,9 @@ #define xfs_fs_geometry libxfs_fs_geometry #define xfs_init_local_fork libxfs_init_local_fork +#define LIBXFS_ATTR_ROOT ATTR_ROOT +#define LIBXFS_ATTR_SECURE ATTR_SECURE +#define LIBXFS_ATTR_CREATE ATTR_CREATE +#define LIBXFS_ATTR_REPLACE ATTR_REPLACE + #endif /* __LIBXFS_API_DEFS_H__ */ diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h index b45d07eb..59cd3333 100644 --- a/libxfs/libxfs_priv.h +++ b/libxfs/libxfs_priv.h @@ -104,14 +104,6 @@ extern char *progname; */ #define PTR_FMT "%p" -/* XXX: need to push these out to make LIBXFS_ATTR defines */ -#define ATTR_ROOT 0x0002 -#define ATTR_SECURE 0x0008 -#define ATTR_CREATE 0x0010 -#define ATTR_REPLACE 0x0020 -#define ATTR_KERNOTIME 0 -#define ATTR_KERNOVAL 0 - #define XFS_IGET_CREATE 0x1 #define XFS_IGET_UNTRUSTED 0x2 diff --git a/libxfs/xfs_attr.c b/libxfs/xfs_attr.c index b8838302..170e64cf 100644 --- a/libxfs/xfs_attr.c +++ b/libxfs/xfs_attr.c @@ -20,6 +20,7 @@ #include "xfs_trans.h" #include "xfs_bmap.h" #include "xfs_bmap_btree.h" +#include "xfs_attr.h" #include "xfs_attr_leaf.h" #include "xfs_attr_remote.h" #include "xfs_trans_space.h" diff --git a/libxfs/xfs_attr_leaf.c b/libxfs/xfs_attr_leaf.c index 5683d294..48f4b28d 100644 --- a/libxfs/xfs_attr_leaf.c +++ b/libxfs/xfs_attr_leaf.c @@ -21,6 +21,7 @@ #include "xfs_bmap.h" #include "xfs_attr_sf.h" #include "xfs_attr_remote.h" +#include "xfs_attr.h" #include "xfs_attr_leaf.h" #include "xfs_trace.h" #include "xfs_cksum.h"