From patchwork Fri Feb 12 09:52:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 8289831 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 284849F3CD for ; Fri, 12 Feb 2016 09:55:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4489A203C4 for ; Fri, 12 Feb 2016 09:55:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2461B203AC for ; Fri, 12 Feb 2016 09:54:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751747AbcBLJyj (ORCPT ); Fri, 12 Feb 2016 04:54:39 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:35723 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751730AbcBLJyh (ORCPT ); Fri, 12 Feb 2016 04:54:37 -0500 Received: by mail-pa0-f50.google.com with SMTP id ho8so44657673pac.2; Fri, 12 Feb 2016 01:54:36 -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=cyUToIsjBVCFK0InUtNmoAiA+tFd/oDJv/hKqOrijgw=; b=VczdwU/CeAIgKF9dlb34p0wZ8IXufDk5UpuXdIafCtgaGV/JPhpKSsKChnaRjn5vy8 GbHaAXFlUzU1bvQ3dY5KpHSc7eCG7iMSnNdaSHJcg1p53qY6dqfqOBzjg+bpJe+tggy3 acbJrj1vW2iB4j+rYF7w0ye4FdGnZnl5qVppo4wQHMmjMdVqirOBXbK1n0J69m4uKfiB R8dkifMAMIsD7MMGEVBiHUhOpAjSPKv8ZQjIwK1qSH4xM9pbHH1vcY0TTn7oHG6BQD5D RiUQV0OqcMxFigcAS1qg+CkKPk3o8Wq+3bzjB6t4MwJSp36mKpoWgkRtpSyERQKUpLLI eOTw== 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=cyUToIsjBVCFK0InUtNmoAiA+tFd/oDJv/hKqOrijgw=; b=E9L0Y/aahGtu4eVHK40bFQhD/eqm4vmvKQ0l33PAdfxnMT21lkuI+PLTrQRWgA6c43 J2fAaaWltNwTvgxTtsWpWhizsjW4n/9FB3mXdWqEHA3HMerFUWKTMaLLwALFfTPY0oL8 9sqZjeSEAADApOrQBn8Svn/dOGiNyMGMMP+s11a3Rf7txF2dFcBSnTypNYSy/emTTiMq PYY97Hszqehv4gXUrxonKGz/EtqDF8E5f4FJ+xgJM4m54SX80ApZxE/rFNBzhT5xynO0 GvwYFhmKekT8gZXQzvEKDMboOYWLEzrUfuXRPWlcJ3dcE/7H0IQRC+f3cQxH79cXqka0 O42g== X-Gm-Message-State: AG10YOSozHZe8gXFVBZH1Q12hB66NbCCo1W8QDH53TVU9DJw3gvs+eLGuXD+BIZRmdijGQ== X-Received: by 10.66.162.233 with SMTP id yd9mr730223pab.51.1455270876605; Fri, 12 Feb 2016 01:54:36 -0800 (PST) Received: from localhost.localdomain ([106.51.31.162]) by smtp.gmail.com with ESMTPSA id xz6sm18090024pab.42.2016.02.12.01.53.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Feb 2016 01:54:36 -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 v2c 1/8] vfs: Add vfs_time abstractions Date: Fri, 12 Feb 2016 01:52:46 -0800 Message-Id: <1455270773-3249-2-git-send-email-deepa.kernel@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455270773-3249-1-git-send-email-deepa.kernel@gmail.com> References: <20160212092153.GA2368@deepa-ubuntu> <1455270773-3249-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 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 struct timespec64 from struct timespec without breaking the individual filesystems after they have incorporated these. Add vfs_time data type aliases to help convert vfs timestamps to use 64 bit times. These create an abstraction layer so that vfs inode times can be switched to struct timespec64 instead of struct timespec. 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 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/include/linux/fs.h b/include/linux/fs.h index 4af612f..56e6373 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1412,6 +1412,27 @@ static inline struct timespec current_fs_time_sec(struct super_block *sb) return (struct timespec) { get_seconds(), 0 }; } +/* Place holder defines until it is safe to use timespec64 + * in the vfs layer. + * timespec64 data type and functions will be used at that + * time directly by all filesystems and these defines will be deleted. + */ +static inline struct timespec64 vfs_time_to_timespec64(struct timespec inode_ts) +{ + return timespec_to_timespec64(inode_ts); +} + +static inline struct timespec timespec64_to_vfs_time(struct timespec64 ts) +{ + return timespec64_to_timespec(ts); +} + + +#define vfs_time timespec + +#define vfs_time_compare timespec_compare +#define vfs_time_equal timespec_equal + /* * Snapshotting support. */