From patchwork Fri Feb 12 09:45:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 8289731 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 9F0F1BEEE5 for ; Fri, 12 Feb 2016 09:49:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D04AA203AC for ; Fri, 12 Feb 2016 09:49:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E674620380 for ; Fri, 12 Feb 2016 09:49:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751969AbcBLJsP (ORCPT ); Fri, 12 Feb 2016 04:48:15 -0500 Received: from mail-pf0-f182.google.com ([209.85.192.182]:35019 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751730AbcBLJsN (ORCPT ); Fri, 12 Feb 2016 04:48:13 -0500 Received: by mail-pf0-f182.google.com with SMTP id c10so45825617pfc.2; Fri, 12 Feb 2016 01:48:13 -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=A12DHDh88YbJ67dZoTRippWHp91LNUMgayDdzQ2bT9Q=; b=lNYtAY4IOASusP5VJ2uDEGY1+2PGS5F5xuI9xidnZAUYSRmdv9Go46ICijYuBEEcrD tIb3RkyTGljSra5mx2HRY6TAfzCwTzBA3clecCTF6A5/N5SSjDUS/3eli3t5yPCZpnR/ DkDIlNNNEtSTm2/CEXP1/IPmEulH9+g3sb8b7SCpsJiPS4EopPUnh6PegndfTDO78GzR PMph1aynq9NJ9eRz2WRnPv0mQGSjU9HgIXXGUvLAiXOjTS4f30rkMQ1nnvq7QUtm5zi2 H+KjEq/hOTBMiHi3lxKVO7n/1VbZlG9Dajv6AeTZyxcVDwBs2RudNflGPgxxY9c72Ugo CvrQ== 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=A12DHDh88YbJ67dZoTRippWHp91LNUMgayDdzQ2bT9Q=; b=YyZ4WK2BkhNDSWCNhA5hreT3bALdas9Brf5oCUimrzovyRd+F7h+YHLsxepnpQxzdi yfLPADXsAkLIDBnrl9nRrC04bdZUWvQ/T6vt7Tn9DYZphi4JOexJWSx0LwoXXrredZEN 4ZPNmwVFSVp/A6Aa0fwYYzT70WM6VyD4qKV0m51bnzeDGmgENhRy73K1shr9J8lOX0ZR DpavVwddeZ896Zpma9+QMxzj7TmWzTHGq/Ah5KIA8A5qFx6QpRQSSlW9jxHE5dNPCsdh 52rH/D+KON1I+JD93GFT6dXscbyCqIw4VtmrbZeooHiw4U6VEo2DKTrfWsCjWZmnl0e1 P3JQ== X-Gm-Message-State: AG10YOS2xRNvUShGzAtg+dbIjpmLD/x9g0beVy6oRVePgDJ2yWjhpkp7N9VF1hVvqdmDmg== X-Received: by 10.98.10.149 with SMTP id 21mr744639pfk.75.1455270493137; Fri, 12 Feb 2016 01:48:13 -0800 (PST) Received: from localhost.localdomain ([106.51.31.162]) by smtp.gmail.com with ESMTPSA id ah10sm18066745pad.23.2016.02.12.01.47.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Feb 2016 01:48:12 -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 v2b 1/5] vfs: Add vfs_time accessors Date: Fri, 12 Feb 2016 01:45:45 -0800 Message-Id: <1455270349-3187-2-git-send-email-deepa.kernel@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455270349-3187-1-git-send-email-deepa.kernel@gmail.com> References: <20160212092153.GA2368@deepa-ubuntu> <1455270349-3187-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 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 4af612f..1623c95 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1412,6 +1412,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. */