From patchwork Thu Apr 30 22:46:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allison Henderson X-Patchwork-Id: 11521827 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D07E4913 for ; Thu, 30 Apr 2020 22:47:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B8BEE2074A for ; Thu, 30 Apr 2020 22:47:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="0STxmtgG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727097AbgD3WrM (ORCPT ); Thu, 30 Apr 2020 18:47:12 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:48398 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727092AbgD3WrK (ORCPT ); Thu, 30 Apr 2020 18:47:10 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03UMhfqJ047471 for ; Thu, 30 Apr 2020 22:47:09 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-2020-01-29; bh=auLu4E7jafcZXoiir7sWzdxLX7GhCz+Bs7hlrQNgwnE=; b=0STxmtgGvJdc9Co5fkf14hP/FGHfXSDpXKYJUK7Oh2Wf54+8RdIgOfin3/OUmiCdu0TQ rK6u8/6BubOhk5gUNcbjVT5hXN1Rr8BQthNw8HyFM0VOf7vWXlSTNfuwlSGPkrz1k8uf p369oLjyA7BNhs8jTSW9zeKJ0UFOBHsqGSqnj5oyzLzUQZStu+cP6nydLgWo3Obz4yvu 3DJOx65O/4xhPAFA2EOErxDjRZ/xXbWlXDOkeieDvh+4bY/bkxKvqXTvcmRt2HaAwZX5 crqWjVHYyJKQnVAu8jJ80INpHMiNq6lUAQGQfOw21BlSKW7ZcE5xXff+GAZh6Fg2DO5Z RQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 30r7f5r26h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 30 Apr 2020 22:47:09 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03UMgGXc141594 for ; Thu, 30 Apr 2020 22:47:09 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3020.oracle.com with ESMTP id 30qtg23dqe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 30 Apr 2020 22:47:08 +0000 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 03UMl8R2011751 for ; Thu, 30 Apr 2020 22:47:08 GMT Received: from localhost.localdomain (/67.1.142.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 30 Apr 2020 15:47:07 -0700 From: Allison Collins To: linux-xfs@vger.kernel.org Subject: [PATCH v9 11/43] xfsprogs: replace ATTR_KERNOTIME with XFS_DA_OP_NOTIME Date: Thu, 30 Apr 2020 15:46:28 -0700 Message-Id: <20200430224700.4183-12-allison.henderson@oracle.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200430224700.4183-1-allison.henderson@oracle.com> References: <20200430224700.4183-1-allison.henderson@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9607 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 adultscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 spamscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004300167 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9607 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 mlxlogscore=999 clxscore=1015 phishscore=0 impostorscore=0 suspectscore=1 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004300167 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org op_flags with the XFS_DA_OP_* flags is the usual place for in-kernel only flags, so move the notime flag there. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Chandan Rajendra Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Allison Collins --- libxfs/xfs_attr.c | 4 ++-- libxfs/xfs_attr.h | 8 +------- libxfs/xfs_da_btree.h | 2 ++ 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/libxfs/xfs_attr.c b/libxfs/xfs_attr.c index 7adc547..6298891 100644 --- a/libxfs/xfs_attr.c +++ b/libxfs/xfs_attr.c @@ -186,7 +186,7 @@ xfs_attr_try_sf_addname( * Commit the shortform mods, and we're done. * NOTE: this is also the error path (EEXIST, etc). */ - if (!error && (args->flags & ATTR_KERNOTIME) == 0) + if (!error && !(args->op_flags & XFS_DA_OP_NOTIME)) xfs_trans_ichgtime(args->trans, dp, XFS_ICHGTIME_CHG); if (mp->m_flags & XFS_MOUNT_WSYNC) @@ -389,7 +389,7 @@ xfs_attr_set( if (mp->m_flags & XFS_MOUNT_WSYNC) xfs_trans_set_sync(args->trans); - if ((args->flags & ATTR_KERNOTIME) == 0) + if (!(args->op_flags & XFS_DA_OP_NOTIME)) xfs_trans_ichgtime(args->trans, dp, XFS_ICHGTIME_CHG); /* diff --git a/libxfs/xfs_attr.h b/libxfs/xfs_attr.h index a6de050..0f36939 100644 --- a/libxfs/xfs_attr.h +++ b/libxfs/xfs_attr.h @@ -33,19 +33,13 @@ struct xfs_attr_list_context; #define ATTR_CREATE 0x0010 /* pure create: fail if attr already exists */ #define ATTR_REPLACE 0x0020 /* pure set: fail if attr does not exist */ -#define ATTR_KERNOTIME 0x1000 /* [kernel] don't update inode timestamps */ - -#define ATTR_KERNEL_FLAGS \ - (ATTR_KERNOTIME) - #define XFS_ATTR_FLAGS \ { ATTR_DONTFOLLOW, "DONTFOLLOW" }, \ { ATTR_ROOT, "ROOT" }, \ { ATTR_TRUST, "TRUST" }, \ { ATTR_SECURE, "SECURE" }, \ { ATTR_CREATE, "CREATE" }, \ - { ATTR_REPLACE, "REPLACE" }, \ - { ATTR_KERNOTIME, "KERNOTIME" } + { ATTR_REPLACE, "REPLACE" } /* * The maximum size (into the kernel or returned from the kernel) of an diff --git a/libxfs/xfs_da_btree.h b/libxfs/xfs_da_btree.h index dd1ac52..d93cb83 100644 --- a/libxfs/xfs_da_btree.h +++ b/libxfs/xfs_da_btree.h @@ -88,6 +88,7 @@ typedef struct xfs_da_args { #define XFS_DA_OP_ADDNAME 0x0004 /* this is an add operation */ #define XFS_DA_OP_OKNOENT 0x0008 /* lookup/add op, ENOENT ok, else die */ #define XFS_DA_OP_CILOOKUP 0x0010 /* lookup to return CI name if found */ +#define XFS_DA_OP_NOTIME 0x0020 /* don't update inode timestamps */ #define XFS_DA_OP_INCOMPLETE 0x0040 /* lookup INCOMPLETE attr keys */ #define XFS_DA_OP_FLAGS \ @@ -96,6 +97,7 @@ typedef struct xfs_da_args { { XFS_DA_OP_ADDNAME, "ADDNAME" }, \ { XFS_DA_OP_OKNOENT, "OKNOENT" }, \ { XFS_DA_OP_CILOOKUP, "CILOOKUP" }, \ + { XFS_DA_OP_NOTIME, "NOTIME" }, \ { XFS_DA_OP_INCOMPLETE, "INCOMPLETE" } /*