From patchwork Thu Jun 9 05:04:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 9166259 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A348560890 for ; Thu, 9 Jun 2016 05:09:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 92C3026490 for ; Thu, 9 Jun 2016 05:09:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 875ED26E1A; Thu, 9 Jun 2016 05:09:58 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 56B2928294 for ; Thu, 9 Jun 2016 05:09:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946042AbcFIFHl (ORCPT ); Thu, 9 Jun 2016 01:07:41 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:34207 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1426199AbcFIFFy (ORCPT ); Thu, 9 Jun 2016 01:05:54 -0400 Received: by mail-pa0-f66.google.com with SMTP id ug1so1915645pab.1; Wed, 08 Jun 2016 22:05:54 -0700 (PDT) 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=Q7ZFeuY8Y3eU4puOXnIwlpFrmUjRcllugi4h1+16hEU=; b=Tyk+kkJH/pS3NcGyXXOv8GfunycdWLPHeS9TtrBiSejJEZdtblp0Y5kwCNRGVtfIyH BjLSV6cJ7ly74cifudi/84f+ZG5PWN1RvGjyLyObkQ7G0hgB1JxaYshuZSwSpinYHi6f 9kQMw234eDzPZvS3H1x3X13iyXypuQmddHNeMEeCIN1AKheljh99T8Eyalnh5T+G9N3B zEn8zPZvi7lUc/DvIJWECgTpa6rU/cUu+CBARDH4RTVTVP79c7zVVMCKuNQ0Vc31cZEP ILdep7M5lmjHNFVVhrWh54xlLgD5xeFO/F2cheGVIvbrl+2zJW7AQrwdBgsy+s7d+22L Ba7w== 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=Q7ZFeuY8Y3eU4puOXnIwlpFrmUjRcllugi4h1+16hEU=; b=lbm4BsRAh6NRxSe2yz/MOYLtO3oeoDBcGwS2W3X4XP0ddbhiHqIW6Cw4eZJCHVwGLg m5zJRsS0PJ3f7f2Z4opIS50n2rAskl+mGbHNG+c8zJnzzAFUYjaTOd+1tdH9WRb+hAmZ lEsgZLfAENnhlwlzWWsiyoOrJVJnUOP1qyoIlSVw0U9OfBSllra+ZToq24vB0pqh/2C6 /1tgHwfBC3xRKpLGOzmOYqzXhY82OQRbgGa8OXV+2YN/O9jKWosgrxHcTp6LbvEkIhOT v3E1uNeYBPNRIK3yqhLjUjXi13gc8hw/dAtEwOWe5CC6Uos21tK1xJm6oFDULNmJ7F8V P/MA== X-Gm-Message-State: ALyK8tKyI+qZkJyQU/cQwumxi/pE1RxvzECnErJ0oEq2bjDy1pqxs6gU8j3Tl9mmjaanHA== X-Received: by 10.66.246.198 with SMTP id xy6mr10210145pac.58.1465448753653; Wed, 08 Jun 2016 22:05:53 -0700 (PDT) Received: from deepa-ubuntu.hsd1.ca.comcast.net (c-73-252-251-201.hsd1.ca.comcast.net. [73.252.251.201]) by smtp.gmail.com with ESMTPSA id 129sm6220808pfe.3.2016.06.08.22.05.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Jun 2016 22:05:53 -0700 (PDT) From: Deepa Dinamani To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Thomas Gleixner , Al Viro , Linus Torvalds , y2038@lists.linaro.org, Ilya Dryomov , Sage Weil , Alex Elder , ceph-devel@vger.kernel.org Subject: [PATCH 12/21] block: rbd: Replace non inode CURRENT_TIME with current_fs_time() Date: Wed, 8 Jun 2016 22:04:56 -0700 Message-Id: <1465448705-25055-13-git-send-email-deepa.kernel@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465448705-25055-1-git-send-email-deepa.kernel@gmail.com> References: <1465448705-25055-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-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. This is also in preparation for the patch that transitions vfs timestamps to use 64 bit time and hence make them y2038 safe. As part of the effort current_fs_time() will be extended to do range checks. Hence, it is necessary for all file system timestamps to use current_fs_time(). Signed-off-by: Deepa Dinamani Cc: Ilya Dryomov Cc: Sage Weil Cc: Alex Elder Cc: ceph-devel@vger.kernel.org --- drivers/block/rbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 81666a5..4dcafe4 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1888,7 +1888,7 @@ static void rbd_osd_req_format_write(struct rbd_obj_request *obj_request) { struct ceph_osd_request *osd_req = obj_request->osd_req; - osd_req->r_mtime = CURRENT_TIME; + osd_req->r_mtime = current_fs_time(osd_req->r_inode->i_sb); osd_req->r_data_offset = obj_request->offset; }