From patchwork Wed Feb 3 06:07:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 8198471 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C5B3FBEEE5 for ; Wed, 3 Feb 2016 06:12:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F225E20253 for ; Wed, 3 Feb 2016 06:12:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1674F2022D for ; Wed, 3 Feb 2016 06:12:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933479AbcBCGML (ORCPT ); Wed, 3 Feb 2016 01:12:11 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33275 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933441AbcBCGMF (ORCPT ); Wed, 3 Feb 2016 01:12:05 -0500 Received: by mail-pf0-f193.google.com with SMTP id c10so88964pfc.0; Tue, 02 Feb 2016 22:12:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Y9r1pJegalMnJAFXr7+Rs/rcwiPVlEgFOL3QPfR+xRE=; b=cew7qgXyhObK6qvFZNPc/XlyKWH/Kh2NBlEkkOwJyLgxwfBqoSEOddeDuVeL3oFV9O yYSNz/pEU9uR4nxUB454DSPwRqwzK9gTSXcgDB9d9K641vA42BHSFNc1Px76Tws5B7IA J7CSKPRIe1RN7VBsSV3/N7OIVUjLAmg1qMhOZO2mDZXWq8l/J+6CIOz5U5g52QYdsl4w GKJoWlaiitmik5I3KJftTjRQQmEfnZFWxRj4bIGIipn8eSIvuoQbES/rg7U+jvJf2GIO JPZ/WxoGzgHizE1rokOXM+pYhOxo0lfNvEXecs2YhwXmR90CecBoFRzqUe+EbIe81pAI miBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Y9r1pJegalMnJAFXr7+Rs/rcwiPVlEgFOL3QPfR+xRE=; b=cg0jq8lrQFoUyCtBjZS+UAD7i2sq8W14izq79LohSxv7C1SIrcHuP3sUntNPuA1rM7 vbRoFaiUU6pGAcM6ouyQvGiR0lsuVOTvmWDfLnDEY8z2jAVa7uzPIdaJgSfuv4S2K1z2 RuiZLIYIUvqeCuesCR/eXhSREV8Up/VXR76NlTZ1ekWNmzT55mm5LXMB0X7yw5YP9XbL IwSw79ovaaFaF0Rfuee5iiaqvtau9KHEUU8y2KeZTC347qjtNmkW4DnqC6JEOCAoPAiT JXg8ngnHC6rwmHmoMdofaKUEicsDmagu1PoiVCNarQr/lR8bN9bGEuuueb7fG33FnA51 dqqQ== X-Gm-Message-State: AG10YOQnrRxXnVeHTr4UznJYq6AdKI8/nGxdVeUDS2mR6J6ydpI24Tuwc4NzaU29WhWTIg== X-Received: by 10.98.16.12 with SMTP id y12mr29896292pfi.6.1454479924555; Tue, 02 Feb 2016 22:12:04 -0800 (PST) Received: from localhost.localdomain ([106.51.31.224]) by smtp.gmail.com with ESMTPSA id kw10sm6817612pab.0.2016.02.02.22.12.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Feb 2016 22:12:04 -0800 (PST) From: Deepa Dinamani To: linux-fsdevel@vger.kernel.org, y2038@lists.linaro.org Cc: Arnd Bergmann , Dave Chinner , "Theodore Ts'o" , linux-kernel@vger.kernel.org, "Yan, Zheng" , Sage Weil , Ilya Dryomov , ceph-devel@vger.kernel.org Subject: [PATCH 08/10] fs: ceph: replace CURRENT_TIME by current_fs_time() Date: Tue, 2 Feb 2016 22:07:48 -0800 Message-Id: <1454479670-8204-9-git-send-email-deepa.kernel@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454479670-8204-1-git-send-email-deepa.kernel@gmail.com> References: <1454479670-8204-1-git-send-email-deepa.kernel@gmail.com> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP CURRENT_TIME macro is not appropriate for filesystems as it doesn't use the right granularity for filesystem timestamps. Use current_fs_time() instead. Signed-off-by: Deepa Dinamani Cc: "Yan, Zheng" Cc: Sage Weil Cc: Ilya Dryomov Cc: ceph-devel@vger.kernel.org --- fs/ceph/file.c | 4 ++-- fs/ceph/inode.c | 2 +- fs/ceph/xattr.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 86a9c38..9b338ff 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -783,7 +783,7 @@ ceph_direct_read_write(struct kiocb *iocb, struct iov_iter *iter, int num_pages = 0; int flags; int ret; - struct timespec mtime = CURRENT_TIME; + struct timespec mtime = current_fs_time(inode->i_sb); size_t count = iov_iter_count(iter); loff_t pos = iocb->ki_pos; bool write = iov_iter_rw(iter) == WRITE; @@ -988,7 +988,7 @@ ceph_sync_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos, int flags; int check_caps = 0; int ret; - struct timespec mtime = CURRENT_TIME; + struct timespec mtime = current_fs_time(inode->i_sb); size_t count = iov_iter_count(from); if (ceph_snap(file_inode(file)) != CEPH_NOSNAP) diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index fb4ba2e..63d0198 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1959,7 +1959,7 @@ int ceph_setattr(struct dentry *dentry, struct iattr *attr) if (dirtied) { inode_dirty_flags = __ceph_mark_dirty_caps(ci, dirtied, &prealloc_cf); - inode->i_ctime = CURRENT_TIME; + inode->i_ctime = current_fs_time(inode->i_sb); } release &= issued; diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index 819163d..1e1c00a 100644 --- a/fs/ceph/xattr.c +++ b/fs/ceph/xattr.c @@ -999,7 +999,7 @@ retry: dirty = __ceph_mark_dirty_caps(ci, CEPH_CAP_XATTR_EXCL, &prealloc_cf); ci->i_xattrs.dirty = true; - inode->i_ctime = CURRENT_TIME; + inode->i_ctime = current_fs_time(inode->i_sb); } spin_unlock(&ci->i_ceph_lock); @@ -1136,7 +1136,7 @@ retry: dirty = __ceph_mark_dirty_caps(ci, CEPH_CAP_XATTR_EXCL, &prealloc_cf); ci->i_xattrs.dirty = true; - inode->i_ctime = CURRENT_TIME; + inode->i_ctime = current_fs_time(inode->i_sb); spin_unlock(&ci->i_ceph_lock); if (lock_snap_rwsem) up_read(&mdsc->snap_rwsem);