From patchwork Wed Mar 2 15:31:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 8482051 Return-Path: X-Original-To: patchwork-linux-fsdevel@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 7B9ECC0554 for ; Wed, 2 Mar 2016 15:32:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B7FF220103 for ; Wed, 2 Mar 2016 15:32:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D941220154 for ; Wed, 2 Mar 2016 15:32:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752713AbcCBPcL (ORCPT ); Wed, 2 Mar 2016 10:32:11 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33067 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752539AbcCBPcK (ORCPT ); Wed, 2 Mar 2016 10:32:10 -0500 Received: by mail-pf0-f193.google.com with SMTP id 63so610301pfe.0 for ; Wed, 02 Mar 2016 07:32:09 -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=7fOnfmDEFwtsXUzg5iW8vWTAEXsrTT/lofaMaYKxgmA=; b=hNBerBS11LO5t/sxIfwpkFlbI1sKIPrgDlVRi0sFbHGT8lWpVZdI+tJ7i0swaXHST5 kns/Ugfc+lQuvZc8cs/LMUIahyvVpdC3Ufy+4HHltanYj9y54yOUgNSCTy8VtD+errwf kw1KkUSE15/8nVWbHooVpTCr9NE0arbBGNCNVZ1z+cybCdkpoSZvvYvFtkjECLOSo3jh /TyXaCnZPlx6R6Qn4iUidt/J/W1utGj1IV+C+AoydHRHTYO0aDprVx4OoOkmZdn/9UEP 1RpPR3u9JZ3hFrRqOUkCA5gfqiWe7sv6Yiy64AaU78RzYcQ6Hlgt4kcmNJ/UmvyS7LHA 9phw== 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=7fOnfmDEFwtsXUzg5iW8vWTAEXsrTT/lofaMaYKxgmA=; b=Jps0Z/IbwZ5AbS4cCmfBQE7lvMZD4oU+Wp+6F8Qn+nhZq2uuW355UO8Wq+MMj5D1zW liGe4UDbaFlEgoi/aP+xpuyDdzbVJo5GHZvQwDJ7k8cEANFZdhyjpffcaOCKzw2hlZky Xfq8sp/eFGND0qkPZDmi6ypEOxM6GviZcgWDZ5qPhAfuSXJ9MEjmauLTGgtqfazS52H9 I92QfWqKgJydKIAutbVZL2WX6ppI0GLMQaeM572BUCg095EeeoZL5UnvM7xUVUy4VQ0C XoKMoYYejs93GYzKGWJOJM+4OrtGJZbx+UT+UIwI030xvtedMCszqL+X5RpKPQ2bz0lZ HH/Q== X-Gm-Message-State: AD7BkJL1V7q5KvAznLNQgCKlGDMEAYUlCw+sBj4qGMWPFDCZio2aXgz7XXjFu6DC4dTLPg== X-Received: by 10.98.15.17 with SMTP id x17mr39907869pfi.52.1456932729231; Wed, 02 Mar 2016 07:32:09 -0800 (PST) Received: from localhost.localdomain ([106.51.225.232]) by smtp.gmail.com with ESMTPSA id xn8sm804770pab.15.2016.03.02.07.32.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Mar 2016 07:32:08 -0800 (PST) From: Deepa Dinamani To: linux-fsdevel@vger.kernel.org, y2038@lists.linaro.org Cc: viro@zeniv.linux.org.uk, tglx@linutronix.de, arnd@arndb.de Subject: [PATCH 2/2] vfs: Add vfs_time accessors Date: Wed, 2 Mar 2016 07:31:50 -0800 Message-Id: <1456932710-10926-3-git-send-email-deepa.kernel@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1456932710-10926-1-git-send-email-deepa.kernel@gmail.com> References: <1456932710-10926-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.8 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 Add vfs_time accessors to help convert vfs timestamps to use 64 bit times. These create an abstraction layer so that vfs inode times can be switched to use struct timespec64 from struct timespec without breaking the individual filesystems after they have incorporated these. Use uapi exposed data types, timespec and timespec64 here to keep minimal timestamp data type conversions in API's interfacing with vfs. Signed-off-by: Deepa Dinamani Acked-by: Arnd Bergmann --- include/linux/fs.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/linux/fs.h b/include/linux/fs.h index e0b29d4..5bbddfc 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1409,6 +1409,21 @@ static inline struct timespec current_fs_time_sec(struct super_block *sb) return (struct timespec) { get_seconds(), 0 }; } +/* Place holder defines to ensure safe transition to timespec64 + * in the vfs layer. + * These can be deleted after all filesystems and vfs are switched + * over to using 64 bit time. + */ +static inline struct timespec vfs_time_to_timespec(struct timespec inode_ts) +{ + return inode_ts; +} + +static inline struct timespec timespec_to_vfs_time(struct timespec ts) +{ + return ts; +} + /* * Snapshotting support. */