From patchwork Fri Feb 12 09:36:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 8289501 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 882AA9F1C0 for ; Fri, 12 Feb 2016 09:40:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AE1D6203B5 for ; Fri, 12 Feb 2016 09:40:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D8E6C20270 for ; Fri, 12 Feb 2016 09:40:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751636AbcBLJhF (ORCPT ); Fri, 12 Feb 2016 04:37:05 -0500 Received: from mail-pf0-f172.google.com ([209.85.192.172]:36364 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751320AbcBLJg7 (ORCPT ); Fri, 12 Feb 2016 04:36:59 -0500 Received: by mail-pf0-f172.google.com with SMTP id e127so45014233pfe.3; Fri, 12 Feb 2016 01:36:59 -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=J/Jhp8PEWrE+aU21jyRS8RvoXwayK5JCeBNc2jQTpeg=; b=ruQ5T7vhP/mnS5bd0W+GACnjnqjAhrsiZhFdwQCkbZGBO/n++jvR4friO9s2u74w3f 0LNkpEn/J+yCpQxp2X0rG4H+49WrmbyPAJpi4DT30ZUs1wqcbFr2mgE3u4ahSJObKeee FJNAHfIxv7l8zwBr9+jndPOMA5ukvpwtow7oCTNXSQy5iEC2SRtxRcayM9fqshEuBlNE jHpgyV2F+H94QmezkJaDMFMgpWPsJ/PxdDdZQYykuGN4zDKdxqRFiMp2NoWGYq8aCpvg 2lFE3wRofQbg3nkvThdxRuRgOciTQKAXmko9jAhC6GfkiIe445YG2IAs01oGbHGTizWu tfTA== 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=J/Jhp8PEWrE+aU21jyRS8RvoXwayK5JCeBNc2jQTpeg=; b=C1DjSnaI56+KcDU41x9QFFuvBZEomEWDdLRADyh2xDEWuCh/NISsbXmJtjS7gs9vjE 501rpRjNBJUQ8XtnMdSl4lWNlOec/CmfM2an3gXVJFVnN1NbJooIf29VtEJjI1/Va46s uyTcryLM+STfVuYbABQSTu/nSmVvndpXLLmKsidtJyPTMMZMzpfDuu095QeMaAtQCDD8 YGKNA+lo1x0DzDW0is4zG9SpnWnIDEM8gCowuG2UcQyrZgolgvFmPmadP+7xl62weCOa NqgLVKtV4Hq6zzqlxY5QLybSF2gmS2QxHEfSEK/FXDTYjNd0awHL/ivWloSeJEWiFhqc owQQ== X-Gm-Message-State: AG10YOQeLFXm0BDkjvaSzvo6XsNwzB/ExvlTl5qH13pCN/2ifO9x0TIDpfAj2ExzFDbd8A== X-Received: by 10.98.68.73 with SMTP id r70mr728564pfa.136.1455269818830; Fri, 12 Feb 2016 01:36:58 -0800 (PST) Received: from localhost.localdomain ([106.51.31.162]) by smtp.gmail.com with ESMTPSA id g25sm17972250pfg.35.2016.02.12.01.36.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Feb 2016 01:36:58 -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 Subject: [RFC v2a 07/12] fs: btrfs: Use vfs_time data type for btrfs_update_time() Date: Fri, 12 Feb 2016 01:36:01 -0800 Message-Id: <1455269766-2994-8-git-send-email-deepa.kernel@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455269766-2994-1-git-send-email-deepa.kernel@gmail.com> References: <20160212092153.GA2368@deepa-ubuntu> <1455269766-2994-1-git-send-email-deepa.kernel@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.9 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=ham 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 The VFS inode timestamps are not y2038 safe as they use struct timespec. These will be changed to use struct timespec64 instead and that is y2038 safe. But, since the above data type conversion will break the end file systems, use vfs_time aliases here to access inode times. This is set as a vfs callback function for inode operations. This accepts inode timestamp as an argument. And, needs to switch to 64 bit time representation along with vfs. Signed-off-by: Deepa Dinamani --- fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 59c0e22..6f0417b 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5942,7 +5942,7 @@ static int btrfs_dirty_inode(struct inode *inode) * This is a copy of file_update_time. We need this so we can return error on * ENOSPC for updating the inode in the case of file write and mmap writes. */ -static int btrfs_update_time(struct inode *inode, struct timespec *now, +static int btrfs_update_time(struct inode *inode, struct vfs_time *now, int flags) { struct btrfs_root *root = BTRFS_I(inode)->root;