From patchwork Thu May 18 11:47:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13246635 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1F9BC77B7A for ; Thu, 18 May 2023 11:48:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 95035900004; Thu, 18 May 2023 07:48:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8FF9E280001; Thu, 18 May 2023 07:48:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 79FA3900006; Thu, 18 May 2023 07:48:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 6BC9B900004 for ; Thu, 18 May 2023 07:48:08 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 474421C6D4A for ; Thu, 18 May 2023 11:48:08 +0000 (UTC) X-FDA: 80803202256.14.ADA3372 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf14.hostedemail.com (Postfix) with ESMTP id 8528110000C for ; Thu, 18 May 2023 11:48:06 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="sBtX/DS8"; spf=pass (imf14.hostedemail.com: domain of jlayton@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=jlayton@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684410486; a=rsa-sha256; cv=none; b=r6nhyvLMnC6BVuvnxrk4jPl58WD8vn+GRIfPagkBDIEZQHXbCTD2pKJJpG0cM40GkpRvjE Gc17Gy5BzYmArwhsd3qVw2RYAMag9jOlL0y8jVP+Dro/Dj/5x957L47BpkzD9tIL6ix9B4 IkyV8w2TSRItT04MJsCX5p0V6vbGlMo= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="sBtX/DS8"; spf=pass (imf14.hostedemail.com: domain of jlayton@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=jlayton@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684410486; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=wC97rnTGhU08Xi36MCKHDB64Jn4BbrMStcM5esdGwCA=; b=ZeV7TOLRBPt34kcff7/ZlFuiM2h3mFOPc76ntQm8yHnJ9izc8LcM0GfsodcFgscH0JUbSi 0Df0RWteRziXbKtqwuW3l5K3GVeh/wF5x2PJeEMGOiZf9mPbOZnQy0y/ZfRmOjIVz8jgBE thK08A9gfmmIBmbyfamuEEtethOteXc= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9ABC364ED7; Thu, 18 May 2023 11:48:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9BF6C433A4; Thu, 18 May 2023 11:48:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684410485; bh=ygTtM/LLLrcVV+TnSxcIj03jHvShAv8O7IAKtsJLgdY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sBtX/DS8qpYR222xc7Siz+3XNG6alHqDdMu7MV+26Qjmd8IJFQ+qaydwfuMFOhuA1 KxXP0esLbNeifgJdpeFxiv1fQH0DPzRx86DlXW3J17VzulWVHzz1r9Xuka4FGPuCmb JOeUMIm1tq3Bdh0lGCBGuxlMHWAfk3jBqfP0Ecs37r44cPoi09hsgmgYKI4FU7ux4P wsAI1c72iO7FPaRPhfxstBsz0LfFCNhjvpMne5sFcc624+ud6oPFpZriopJ7uc5VAa eIK/RQkcw/HvwoOAzexj4FMO/EpqE/41/V6io7aZYlB5/UlGLMmjIUEmb8l6WnW/TA OZpkiIuGtUXCw== From: Jeff Layton To: Alexander Viro , Christian Brauner , "Darrick J. Wong" , Hugh Dickins , Andrew Morton , Dave Chinner , Chuck Lever Cc: Jan Kara , Amir Goldstein , David Howells , Neil Brown , Matthew Wilcox , Andreas Dilger , Theodore T'so , Chris Mason , Josef Bacik , David Sterba , Namjae Jeon , Steve French , Sergey Senozhatsky , Tom Talpey , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-mm@kvack.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org Subject: [PATCH v4 7/9] xfs: switch to multigrain timestamps Date: Thu, 18 May 2023 07:47:40 -0400 Message-Id: <20230518114742.128950-8-jlayton@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230518114742.128950-1-jlayton@kernel.org> References: <20230518114742.128950-1-jlayton@kernel.org> MIME-Version: 1.0 X-Rspam-User: X-Stat-Signature: y1aizc3zdccuj44bxgb5dqp884ubwtkt X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 8528110000C X-HE-Tag: 1684410486-365435 X-HE-Meta: U2FsdGVkX1/OEmTK8LGPBaQ6vE42VKJHZVMy0HuVeK44EdaB6h3QUHe8EVZwbD5jNPAjYGjdC/cAIn/VPPMrFdJG1On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gKx/Tq5vfZui0z6MFwmaCHt3BALPE4coIol8TfrapUJt4eigW4w0g6F9CB8kglXIfV5FSfWMuRuJOlLuJLHptcViKzycK9wep92OpZx+KmIk0qVG74hScHkO1CJwmInPVAMkWfBapqVVRmQ7IbpSB5J4Ky802M9ginLxSm+TQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Signed-off-by: Jeff Layton --- fs/xfs/libxfs/xfs_inode_buf.c | 2 +- fs/xfs/xfs_inode_item.c | 2 +- fs/xfs/xfs_iops.c | 4 ++-- fs/xfs/xfs_super.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/xfs/libxfs/xfs_inode_buf.c b/fs/xfs/libxfs/xfs_inode_buf.c index 758aacd8166b..c29e961fac34 100644 --- a/fs/xfs/libxfs/xfs_inode_buf.c +++ b/fs/xfs/libxfs/xfs_inode_buf.c @@ -316,7 +316,7 @@ xfs_inode_to_disk( to->di_atime = xfs_inode_to_disk_ts(ip, inode->i_atime); to->di_mtime = xfs_inode_to_disk_ts(ip, inode->i_mtime); - to->di_ctime = xfs_inode_to_disk_ts(ip, inode->i_ctime); + to->di_ctime = xfs_inode_to_disk_ts(ip, ctime_peek(inode)); to->di_nlink = cpu_to_be32(inode->i_nlink); to->di_gen = cpu_to_be32(inode->i_generation); to->di_mode = cpu_to_be16(inode->i_mode); diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c index ca2941ab6cbc..018f187387f0 100644 --- a/fs/xfs/xfs_inode_item.c +++ b/fs/xfs/xfs_inode_item.c @@ -381,7 +381,7 @@ xfs_inode_to_log_dinode( memset(to->di_pad3, 0, sizeof(to->di_pad3)); to->di_atime = xfs_inode_to_log_dinode_ts(ip, inode->i_atime); to->di_mtime = xfs_inode_to_log_dinode_ts(ip, inode->i_mtime); - to->di_ctime = xfs_inode_to_log_dinode_ts(ip, inode->i_ctime); + to->di_ctime = xfs_inode_to_log_dinode_ts(ip, ctime_peek(inode)); to->di_nlink = inode->i_nlink; to->di_gen = inode->i_generation; to->di_mode = inode->i_mode; diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index 24718adb3c16..f101b543a33f 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c @@ -573,10 +573,10 @@ xfs_vn_getattr( stat->gid = vfsgid_into_kgid(vfsgid); stat->ino = ip->i_ino; stat->atime = inode->i_atime; - stat->mtime = inode->i_mtime; - stat->ctime = inode->i_ctime; stat->blocks = XFS_FSB_TO_BB(mp, ip->i_nblocks + ip->i_delayed_blks); + fill_multigrain_cmtime(request_mask, inode, stat); + if (xfs_has_v3inodes(mp)) { if (request_mask & STATX_BTIME) { stat->result_mask |= STATX_BTIME; diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 7e706255f165..71c04cec974b 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -1992,7 +1992,7 @@ static struct file_system_type xfs_fs_type = { .init_fs_context = xfs_init_fs_context, .parameters = xfs_fs_parameters, .kill_sb = kill_block_super, - .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP, + .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP | FS_MULTIGRAIN_TS, }; MODULE_ALIAS_FS("xfs");