From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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) 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> 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 List-ID: 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 --- 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. */ -- 1.9.1