From patchwork Fri Apr 8 15:47:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 8784261 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 6CE44C0553 for ; Fri, 8 Apr 2016 15:47:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 948CC2021A for ; Fri, 8 Apr 2016 15:47:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AF7212017D for ; Fri, 8 Apr 2016 15:47:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758351AbcDHPrn (ORCPT ); Fri, 8 Apr 2016 11:47:43 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35188 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758183AbcDHPrn (ORCPT ); Fri, 8 Apr 2016 11:47:43 -0400 Received: by mail-pf0-f193.google.com with SMTP id r187so9802113pfr.2 for ; Fri, 08 Apr 2016 08:47:37 -0700 (PDT) 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=BBqUumUP24SPBQsiRiUlb70X+I97ZSSTYg894smJCew=; b=kT92I2kIL8IunVFK22Q94C3+Um3FoEc8hER5HJLE109QZbFxdHtuvQHOhMYHpo1WJa XpaGCBrW/XMPW4gVZupn8Fz6D0qaIWaRAJ4F4xUw2bkO/4S6USVGgJWnHfnZK2/HDhTj fnnEoJCkBLqXWjYbqSjOUvf/miipzaY/0O6I3O+0fLIdxK+CH3sgvg78/Vh7EKABSd4Q /QFLfIZYA2wo2Xffi/4WVfewWI/nhAq+AOSlXVrWRTWa6lUj8Y4zJNMlRfWiU1aOe7Mw Gj76U4DTwe0zfHObqqTI9WNGRBms021TeDtGzQy+Y5xaEJUjkl4Al5kh1PWdjMTGXLZT gAAQ== 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=BBqUumUP24SPBQsiRiUlb70X+I97ZSSTYg894smJCew=; b=aOuCqtNtmXcLhNXZrxz0lGBrDsbOP6gA8p/9oVH0oSbmqGeH+71uJn4QNCTB5S3a4E kK2AupeHCc933FfteCUwatVKSR2WnMOKw4VKFKyUB8LP3hKzK9V/ShDCxRQ/OMHTm0bv V7rHBmn/X1wvkpMqUZN43nRf3QC7srh/WQomKHEC6Kv0kDncN+jl/wGpQANNPQZpn6mU Wz0X3ZnDEPwRaxrYB2n2TpWecT5UUf0iDkOZRbp71TUpdXm1iQZfedbKGY5QlpM1hMBJ Px43IbLHzGSZqceANFk3a7Lo0VD05GMO1LWYbFHrB6fs8XfySnGjmVzKIVUhliDY4R1l K+AQ== X-Gm-Message-State: AD7BkJJOISK0jz4sHSyD7Wb5SEDNPudf5612MKuRCqrZPLCIzNYIdpNb0XpPLUHNXQYAaA== X-Received: by 10.98.89.157 with SMTP id k29mr13663396pfj.4.1460130451887; Fri, 08 Apr 2016 08:47:31 -0700 (PDT) Received: from deepa-ubuntu.hsd1.ca.comcast.net (c-73-252-251-201.hsd1.ca.comcast.net. [73.252.251.201]) by smtp.gmail.com with ESMTPSA id n19sm19617652pfi.53.2016.04.08.08.47.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Apr 2016 08:47:31 -0700 (PDT) From: Deepa Dinamani To: linux-fsdevel@vger.kernel.org, y2038@lists.linaro.org Cc: tglx@linutronix.de, arnd@arndb.de, viro@zeniv.linux.org.uk Subject: [PATCH 2/2] vfs: Add vfs_time accessors Date: Fri, 8 Apr 2016 08:47:11 -0700 Message-Id: <1460130431-7865-3-git-send-email-deepa.kernel@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460130431-7865-1-git-send-email-deepa.kernel@gmail.com> References: <1460130431-7865-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=-7.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 Reviewed-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 fc09058..d0bf64f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1440,6 +1440,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. */