From mboxrd@z Thu Jan 1 00:00:00 1970 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=-9.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 24E5DC38A2A for ; Thu, 7 May 2020 12:19:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F09D32083B for ; Thu, 7 May 2020 12:19:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="cLhI14+F" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726445AbgEGMTg (ORCPT ); Thu, 7 May 2020 08:19:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725857AbgEGMTg (ORCPT ); Thu, 7 May 2020 08:19:36 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65CE4C05BD43 for ; Thu, 7 May 2020 05:19:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=cJ9FV2BYv03Jffho3aViq2W7xKEk+Y7IqtEdXxp+IOw=; b=cLhI14+FNLkXcMXcHD1w4RLTOg ureCfA/yOlC8Q3rQmbNFIvzrLuc9omn0UlD3lqIdX7q2D9yboK23Fi7QUN6pAhjkX7lxc5Yk5XOyR N6OBXlhi7DTBA+tH+rEMjpclTeeNdufumsmvMuv4gHNHDGsJ+UlUrECUMKsnr1qtvVEgNEbih76MU jUDoucRp+MOiE6IrgaZiQbYXI04mciCk2zJuJD9fRwlsbae63Jf7MupYAKGrMzuRK5eUzuuCGoGO5 XauUVUnquGnxpsVgkxBMkq+N+zWVa5WFKbOorjSnQmHocnRLo3hzVucUh3ssx/B3zrxcUkTM6U20W 6d5jLGTA==; Received: from [2001:4bb8:180:9d3f:c70:4a89:bc61:2] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWfV1-0005A9-UC; Thu, 07 May 2020 12:19:36 +0000 From: Christoph Hellwig To: sandeen@sandeen.net Cc: linux-xfs@vger.kernel.org, Dave Chinner , Chandan Rajendra , "Darrick J . Wong" Subject: [PATCH 17/58] xfs: replace ATTR_KERNOTIME with XFS_DA_OP_NOTIME Date: Thu, 7 May 2020 14:18:10 +0200 Message-Id: <20200507121851.304002-18-hch@lst.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200507121851.304002-1-hch@lst.de> References: <20200507121851.304002-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Source kernel commit: 1d7330199400404512b44734d3c792aa4ad82322 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: Christoph Hellwig --- 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 62bed271..52429827 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 a6de0506..0f369399 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 dd1ac522..d93cb838 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" } /* -- 2.26.2