[Y2038] [PATCH v2] usb: misc: usbtest: Remove timeval usage

2015-10-26 Thread Deepa Dinamani
to isolate the handling of the testing timing measurement. The official testusb userspace tool can be changed in a separate patch to reflect the __u32 changes as well. It can use the usbtest_param_32 struct, since 32 bit seconds is long enough for test durations. Signed-off-by: Deepa Dinamani

[Y2038] [PATCH] usb: usbtest: Add new ioctl interface

2015-10-23 Thread Deepa Dinamani
On Thu, Oct 22, 2015 at 1:45 PM, Arnd Bergmann <a...@arndb.de> wrote: > On Thursday 22 October 2015 09:43:25 Deepa Dinamani wrote: > > On Thu, Oct 22, 2015 at 2:36 AM, Arnd Bergmann <a...@arndb.de> wrote: > > > On Wednesday 21 October 2015 18:03:02 Deepa Dinamani

[Y2038] [PATCH] usb: usbtest: Add new ioctl interface

2015-10-22 Thread Deepa Dinamani
On Thu, Oct 22, 2015 at 2:36 AM, Arnd Bergmann <a...@arndb.de> wrote: > On Wednesday 21 October 2015 18:03:02 Deepa Dinamani wrote: > > On Wed, Oct 21, 2015 at 4:17 PM, Arnd Bergmann <a...@arndb.de> wrote: > > > On Wednesday 21 October 2015 15:17:14 Deepa Dinamani w

[Y2038] [PATCH] drivers: md: use ktime_get_real_seconds()

2015-11-11 Thread Deepa Dinamani
2106. Assumption is that the usage of v0.90 will be deprecated by year 2106. Timestamp fields in the on disk meta data for v1.0 version already use 64 bit data types. Remove the truncation of the bits while writing to or reading from these from the disk. Signed-off-by: Deepa Dinamani <deepa.

Re: [Y2038] [PATCH] drivers: md: use ktime_get_real_seconds()

2015-11-12 Thread Deepa Dinamani
On Thu, Nov 12, 2015 at 1:56 PM, Arnd Bergmann <a...@arndb.de> wrote: > On Wednesday 11 November 2015 19:23:33 Deepa Dinamani wrote: > > get_seconds() API is not y2038 safe on 32 bit systems and the API > > is deprecated. Replace it with calls to ktime_get_real_seconds() &g

Re: [Y2038] [PATCH 1/2] fs:hpfs:Remove internal using time_t

2015-11-17 Thread Deepa Dinamani
> On Nov 17, 2015, at 1:07 AM, Arnd Bergmann wrote: > >> On Tuesday 17 November 2015 17:04:42 deng.ch...@zte.com.cn wrote: >> Many time_t issues in filesystems is involved with VFS i_mtime/i_ctime. >> for example: >> >> static void hpfs_update_directory_times(struct inode

Re: [Y2038] [Outreachy kernel] Re: [PATCH] staging: ft1000: replace timeval with ktime_t

2015-10-16 Thread Deepa Dinamani
Should I then fix this patch as per your suggestion or let it be? -Deepa > On Oct 16, 2015, at 4:30 PM, Arnd Bergmann wrote: > >> On Saturday 17 October 2015 00:57:45 Arnd Bergmann wrote: >> >> A more likely cleanup would be the removal of the debug interface, >> replacing it

Re: [Y2038] [Outreachy kernel] Re: [PATCH] staging: ft1000: replace timeval with ktime_t

2015-10-17 Thread Deepa Dinamani
> On Oct 17, 2015, at 04:29, Arnd Bergmann <a...@arndb.de> wrote: > >> On Friday 16 October 2015 22:55:11 Greg KH wrote: >>> On Fri, Oct 16, 2015 at 05:32:25PM -0700, Deepa Dinamani wrote: >>> Should I then fix this patch as per your suggestion or let it be?

[Y2038] [RFC 1/4] fs: vfs: add accessors for inode times

2015-12-06 Thread Deepa Dinamani
to these types through macros only. So when the actually internal representation changes, it will be transparent everywhere outside of the macros. The internal representation changes will support larger timestamp range. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linu

[Y2038] [RFC 0/4] fs: support for 64-bit timestamps

2015-12-06 Thread Deepa Dinamani
will be in a separate series. Deepa Dinamani (4): fs: vfs: add accessors for inode times fs: Add new data type for inode times fs: Add support for 64 bit time fs: macros and functions support 64 bit time include/linux/fs.h | 42 --- include/linux/stat.h | 12

[Y2038] [RFC 3/4] fs: Add support for 64 bit time

2015-12-06 Thread Deepa Dinamani
as inode structure is cached in memory. The other structures are transient and such a change would not be beneficial. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/fs.h | 33 ++--- include/linux/stat.h | 12 +--- 2 files chang

[Y2038] [RFCv2 3/4] fs: Add support for 64 bit time

2015-12-06 Thread Deepa Dinamani
as inode structure is cached in memory. The other structures are transient and such a change would not be beneficial. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/fs.h | 33 ++--- include/linux/stat.h | 12 +--- 2 files chang

[Y2038] [RFCv2 2/4] fs: Add new data type for inode times

2015-12-06 Thread Deepa Dinamani
to overcome the above limitations. Also add time conversion api's between struct timespec64 and struct inode_time. This is required as the 64-bit time functions typically return struct timespec64 types. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/time64.

[Y2038] [RFCv2 4/4] fs: macros and functions support 64 bit time

2015-12-06 Thread Deepa Dinamani
The current file system macros and time functions are not y2038 safe because of the use of struct timespec. Change these to use timespec64. The change will be globally enabled along with all the other 64-bit time file system changes. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.

[Y2038] [RFCv2 0/4] fs: support for 64-bit timestamps

2015-12-06 Thread Deepa Dinamani
will be in a separate series. Changes since v1: * struct inode_time added unconditionally * uniform use of CONFIG_FS_USES_64BIT_TIME Deepa Dinamani (4): fs: vfs: add accessors for inode times fs: Add new data type for inode times fs: Add support for 64 bit time fs: macros and functions support 64 bit time

Re: [Y2038] [RFCv2 3/4] fs: Add support for 64 bit time

2015-12-07 Thread Deepa Dinamani
On Mon, Dec 7, 2015 at 1:30 AM, Arnd Bergmann <a...@arndb.de> wrote: > On Sunday 06 December 2015 22:04:05 Deepa Dinamani wrote: >> The current representation of inode times in struct inode, struct iattr, >> struct kstat: struct timespec are not y2038 safe. >> >&

Re: [Y2038] [RFCv2 3/4] fs: Add support for 64 bit time

2015-12-11 Thread Deepa Dinamani
>> >> @@ -616,9 +622,15 @@ struct inode { >> >> }; >> >> dev_t i_rdev; >> >> loff_t i_size; >> >> +#ifdef CONFIG_FS_USES_64BIT_TIME >> >> + struct inode_time i_atime; >> >> + struct inode_time i_mtime; >> >> + struct

[Y2038] [RFC 15/15] fs: Drop CONFIG_FS_USES_64BIT_TIME

2016-01-06 Thread Deepa Dinamani
All file system code is using 64 bit time already and this config is no longer required. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/Kconfig | 10 -- 1 file changed, 10 deletions(-) diff --git a/fs/Kconfig b/fs/Kconfig index bfeefce..922893f 100644 --- a/fs/K

[Y2038] [RFC 11/15] fs: ext4: replace inode_timespec with timespec64

2016-01-06 Thread Deepa Dinamani
Substitute inode_timespec aliases with timespec64. Since CONFIG_FS_USES_64BIT_TIME is enabled, internally all inode_timespec references are using timespec64 already. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/ext4/ext4.h| 14 +++--- fs/ext4/extents.

[Y2038] [RFC 05/15] fs: cifs: Add support for cifs to use 64 bit time

2016-01-06 Thread Deepa Dinamani
. This means we can get away with 32 bit unsigned sec field. But, the sec field uses long long to maintain uniformity in the kernel, where everyone uses the theoretical max. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/cifs/cache.c | 16 - fs/cifs/cifsencrypt.

[Y2038] [RFC 04/15] vfs: Add support for vfs code to use 64 bit time

2016-01-06 Thread Deepa Dinamani
to timespec_trunc() to fs_time_trunc(). The latter supports range checking on timestamps. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/attr.c| 15 +++--- fs/bad_inode.c | 10 +++-- fs/binfmt_misc.c | 7 +-- fs/i

[Y2038] [RFC 03/15] kernel: time: Add macros and functions to support 64 bit time

2016-01-06 Thread Deepa Dinamani
kernel does not internally use timestamps and it cannot decide how catastrophic these timestamp clamps can be for the on disk file system or user space applications that use it. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/libfs.c | 5 ++ fs/s

[Y2038] [RFC 06/15] fs: fat: convert fat to 64 bit time

2016-01-06 Thread Deepa Dinamani
CONFIG_FS_USES_64BIT_TIME is turned on. Use a larger data type for seconds in fat_time_fat2unix(). This extends timestamps beyond the year 2038. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/fat/dir.c | 7 +-- fs/fat/fat.h | 8 +--- fs/fat/file.c

[Y2038] [RFC 07/15] fs: ext4: convert to use 64 bit time

2016-01-06 Thread Deepa Dinamani
struct timespec is not y2038 safe. The ext4 uses time_extra fields to extend {a,c,m,cr} times until 2446. Use struct inode_timespec to replace timespec. inode_timespec will eventually be replaced by struct timespec64 when CONFIG_FS_USES_64BIT_TIME is enabled. Signed-off-by: Deepa Dinamani

[Y2038] [RFC 14/15] vfs: Remove inode_timespec aliases

2016-01-06 Thread Deepa Dinamani
Now that CONFIG_FS_USES_64BIT_TIME is enabled, the aliases for inode_timespec are no longer used and can be removed. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/time64.h | 21 - 1 file changed, 21 deletions(-) diff --git a/include/linux/ti

[Y2038] [RFC 09/15] fs: cifs: replace inode_timespec with timespec64

2016-01-06 Thread Deepa Dinamani
Substitute inode_timespec aliases with timespec64. Since CONFIG_FS_USES_64BIT_TIME is enabled, internally all inode_timespec references are using timespec64 already. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/cifs/cache.c | 4 ++-- fs/cifs/cifsglob.h | 6 +++--- f

Re: [Y2038] [RFC 13/15] kernel: time: change inode_timespec to timespec64

2016-01-07 Thread Deepa Dinamani
On Thu, Jan 07, 2016 at 09:50:30AM +0100, Michael Adam wrote: > Hi, > > the patch contains a conflict resolution artifact.. > Thanks, I've fixed it in my tree now. I will wait to hear other comments before I send an update. -Deepa ___ Y2038 mailing

[Y2038] [PATCH 3/4] vfs: Add support for vfs code to use 64 bit time.

2015-12-19 Thread Deepa Dinamani
. Change all calls to timespec_trunc() to fs_time_trunc(). The later will be extended to support range checking on timestamps. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/attr.c| 14 +++--- fs/bad_inode.c | 9 +++-- fs/binfmt_misc.c | 7 +-- fs/i

[Y2038] [PATCH 4/4] fs: cifs: Add support for cifs to use 64 bit time

2015-12-19 Thread Deepa Dinamani
for all file systems to share. This will be in a separate patch series. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/cifs/cache.c | 16 +++- fs/cifs/cifsencrypt.c | 2 +- fs/cifs/cifsglob.h| 6 ++--- fs/cifs/cifsproto.h | 7 +++--- fs/cifs/cifssmb.c

[Y2038] [PATCH 1/4] vfs: Add 64 bit time support

2015-12-19 Thread Deepa Dinamani
will be removed and timespec64 data types and API's will be used directly. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/fs.h | 69 ++ include/linux/stat.h | 6 ++--- include/linux/time64.

[Y2038] [PATCH 0/4] fs: Add support 64 bit timestamps

2015-12-19 Thread Deepa Dinamani
in the previous series Deepa Dinamani (4): vfs: Add 64 bit time support kernel: time: Add macros and functions to support 64 bit time vfs: Add support for vfs code to use 64 bit time. fs: cifs: Add support for cifs to use 64 bit time fs/attr.c | 14 +- fs/bad_inode.c

[Y2038] [PATCH v2 0/4] fs: Add 64 bit time support

2015-12-19 Thread Deepa Dinamani
. The change to timestamp conversion functions(to and from unix format to others) and range checks will be part of a separate series. Changes since v1: * move SYSTEM_TIME macros to fs.h * add 64 bit version of CURRENT_TIME macros. Deepa Dinamani (4): vfs: Add 64 bit time support kernel: time: Add

Re: [Y2038] [RFC 02/15] vfs: Change all structures to support 64 bit time

2016-01-11 Thread Deepa Dinamani
> On Jan 11, 2016, at 04:33, Dave Chinner <da...@fromorbit.com> wrote: > >> On Wed, Jan 06, 2016 at 09:35:59PM -0800, Deepa Dinamani wrote: >> The current representation of inode times in struct inode, struct iattr, >> and struct kstat use struct timespec. timespe

Re: [Y2038] [PATCH 01/21] fs: Replace CURRENT_TIME_SEC with current_fs_time()

2016-06-10 Thread Deepa Dinamani
On Fri, Jun 10, 2016 at 3:21 PM, Arnd Bergmann <a...@arndb.de> wrote: > On Wednesday, June 8, 2016 10:04:45 PM CEST Deepa Dinamani wrote: >> CURRENT_TIME_SEC is not y2038 safe. current_fs_time() will >> be transitioned to use 64 bit time along with vfs in a >> separate

Re: [Y2038] [PATCH 06/21] fs: udf: Replace CURRENT_TIME with current_fs_time()

2016-06-09 Thread Deepa Dinamani
On Thu, Jun 9, 2016 at 12:41 AM, Jan Kara <j...@suse.cz> wrote: > On Wed 08-06-16 22:04:50, Deepa Dinamani wrote: >> Logical Volume Integrity format is described to have the >> same timestamp format for "Recording Date and time" as >> the other [a,c,m]times

Re: [Y2038] [PATCH 17/21] audit: Use timespec64 to represent audit timestamps

2016-06-09 Thread Deepa Dinamani
On Thu, Jun 9, 2016 at 7:31 AM, Steve Grubb <sgr...@redhat.com> wrote: > On Wednesday, June 08, 2016 10:05:01 PM Deepa Dinamani wrote: >> Audit timestamps are recorded in string format into >> an audit buffer for a given context. >> These mark the entry timestamps for

Re: [Y2038] [PATCH 02/21] fs: ext4: Use current_fs_time() for inode timestamps

2016-06-14 Thread Deepa Dinamani
On Fri, Jun 10, 2016 at 3:19 PM, Arnd Bergmann <a...@arndb.de> wrote: > On Thursday, June 9, 2016 11:45:01 AM CEST Linus Torvalds wrote: >> On Wed, Jun 8, 2016 at 10:04 PM, Deepa Dinamani <deepa.ker...@gmail.com> >> wrote: >> > CURRENT_TIME_SEC

Re: [Y2038] [PATCH 15/21] time: Add time64_to_tm()

2016-06-15 Thread Deepa Dinamani
On Tue, Jun 14, 2016 at 2:18 PM, John Stultz <john.stu...@linaro.org> wrote: > On Wed, Jun 8, 2016 at 10:04 PM, Deepa Dinamani <deepa.ker...@gmail.com> > wrote: >> time_to_tm() takes time_t as an argument. >> time_t is not y2038 safe. >> Add time64_to_tm(

[Y2038] [PATCH 12/21] block: rbd: Replace non inode CURRENT_TIME with current_fs_time()

2016-06-08 Thread Deepa Dinamani
of the effort current_fs_time() will be extended to do range checks. Hence, it is necessary for all file system timestamps to use current_fs_time(). Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: Ilya Dryomov <idryo...@gmail.com> Cc: Sage Weil <s...@redhat.com> Cc: Alex Elder <

[Y2038] [PATCH 02/21] fs: ext4: Use current_fs_time() for inode timestamps

2016-06-08 Thread Deepa Dinamani
is not required. Use current_fs_time() to obtain timestamps unconditionally. Quota files are assumed to be on the same filesystem. Hence, use current_fs_time() for these files as well. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: "Theodore Ts'o" <ty...@mit.edu> Cc: Andre

[Y2038] [PATCH 05/21] fs: jfs: Replace CURRENT_TIME_SEC by current_fs_time()

2016-06-08 Thread Deepa Dinamani
jfs uses nanosecond granularity for filesystem timestamps. Only this assignemt is not using nanosecond granularity. Use current_fs_time() to get the right nanosecond granularity. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: Dave Kleikamp <sha...@kernel.org> Cc:

[Y2038] [PATCH 18/21] fs: nfs: Make nfs boot time y2038 safe

2016-06-08 Thread Deepa Dinamani
() for the boot_time value. boot_time is used to construct the nfs client boot verifier. This will now wrap in 2106 instead of 2038 on 32-bit systems. The server only relies on the value being persistent until reboot so the wrapping should be fine. Signed-off-by: Deepa Dinamani <deepa.

[Y2038] [PATCH 17/21] audit: Use timespec64 to represent audit timestamps

2016-06-08 Thread Deepa Dinamani
1024 characters. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: Paul Moore <p...@paul-moore.com> Cc: Eric Paris <epa...@redhat.com> Cc: linux-au...@redhat.com --- include/linux/audit.h | 4 ++-- kernel/audit.c| 10 +- kernel/audit.h| 2 +-

[Y2038] [PATCH 20/21] libceph: Replace CURRENT_TIME with ktime_get_real_ts

2016-06-08 Thread Deepa Dinamani
struct timespec64 in a separate patch. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: "Yan, Zheng" <z...@redhat.com> Cc: Sage Weil <s...@redhat.com> Cc: Ilya Dryomov <idryo...@gmail.com> Cc: ceph-de...@vger.kernel.org --- net/ceph/osd_client.c | 4 ++--

[Y2038] [PATCH 13/21] fs: ocfs2: Use time64_t to represent orphan scan times

2016-06-08 Thread Deepa Dinamani
of real time as only delta scan times are relevant and these values are not persistent across reboots. The format string for the debug print is still using long as this is only the time elapsed since the last scan and long is sufficient to represent this value. Signed-off-by: Deepa Dinamani

[Y2038] [PATCH 21/21] time: Delete CURRENT_TIME_SEC and CURRENT_TIME macro

2016-06-08 Thread Deepa Dinamani
All uses of these macors have been replaced by other time functions. These macros are also not y2038 safe. And, all its usecases can be fulfilled by y2038 safe ktime_get_* variants. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: John Stultz <john.stu...@linaro.org> Cc: Tho

[Y2038] [PATCH v2 02/24] fs: Replace CURRENT_TIME with current_time() for inode timestamps

2016-06-21 Thread Deepa Dinamani
to change timestamps in different inodes, it is because they share the same time granularity. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Acked-by: Felipe Balbi <ba...@kernel.org> Acked-by: Steven Whitehouse <swhit...@redhat.com> Acked-by: Ryusuke Konishi <konishi.

[Y2038] [PATCH 04/21] fs: Replace CURRENT_TIME with current_fs_time() for inode timestamps

2016-06-21 Thread Deepa Dinamani
them y2038 safe. As part of the effort current_fs_time() will be extended to do range checks. Hence, it is necessary for all file system timestamps to use current_fs_time(). Also, current_fs_time() will be transitioned along with vfs to be y2038 safe. Signed-off-by: Deepa Dinamani <deepa.

[Y2038] [PATCH v2 00/24] Delete CURRENT_TIME and CURRENT_TIME_SEC macros

2016-06-21 Thread Deepa Dinamani
handled in a series separate from transitioning vfs to use. Changes from v1: * Change current_fs_time(struct super_block *) to current_time(struct inode *) * Note that change to add time64_to_tm() is already part of John's kernel tree: https://lkml.org/lkml/2016/6/17/875 . Deepa Dinamani (24

[Y2038] [PATCH 01/21] fs: Replace CURRENT_TIME_SEC with current_fs_time()

2016-06-21 Thread Deepa Dinamani
when range checking is introduced. This works because alloc_super() fills in the the s_time_gran in super block to NSEC_PER_SEC. Also note that filesystem specific times like the birthtime, creation time that were using same interfaces to obtain time retain same logistics. Signed-off-by: Deepa

[Y2038] [PATCH 00/21] Delete CURRENT_TIME and CURRENT_TIME_SEC macros

2016-06-21 Thread Deepa Dinamani
macro bug fixes are being handled in a series separate from transitioning vfs to use 64 bit timestamps. Some reviewers have requested not to change line wrapping only for the longer function call names, so checkpatch warnings for such cases are ignored in the patch series. Deepa Dinamani (21): fs

[Y2038] [PATCH v2 05/24] fs: jfs: Replace CURRENT_TIME_SEC by current_time()

2016-06-19 Thread Deepa Dinamani
jfs uses nanosecond granularity for filesystem timestamps. Only this assignemt is not using nanosecond granularity. Use current_time() to get the right granularity. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: Dave Kleikamp <sha...@kernel.org> Cc:

Re: [Y2038] [PATCH v2 19/24] fnic: Use time64_t to represent trace timestamps

2016-06-22 Thread Deepa Dinamani
On Wed, Jun 22, 2016 at 7:09 AM, Arnd Bergmann <a...@arndb.de> wrote: > On Sunday, June 19, 2016 5:27:18 PM CEST Deepa Dinamani wrote: >> trace timestamps use struct timespec and CURRENT_TIME which >> are not y2038 safe. >> These timestamps are only part of t

Re: [Y2038] [PATCH v2 09/24] fs: udf: Replace CURRENT_TIME with current_time()

2016-06-22 Thread Deepa Dinamani
On Wed, Jun 22, 2016 at 6:54 AM, Arnd Bergmann <a...@arndb.de> wrote: > On Sunday, June 19, 2016 5:27:08 PM CEST Deepa Dinamani wrote: >> mutex_lock(>s_alloc_mutex); >> lvidiu->impIdent.identSuffix[0] = UDF_OS_CLASS_UNIX; >> lvidiu->impId

Re: [Y2038] [RFC 02/15] vfs: Change all structures to support 64 bit time

2016-01-13 Thread Deepa Dinamani
On Tue, Jan 12, 2016 at 07:29:57PM +1100, Dave Chinner wrote: > On Mon, Jan 11, 2016 at 09:42:36PM -0800, Deepa Dinamani wrote: > > > On Jan 11, 2016, at 04:33, Dave Chinner <da...@fromorbit.com> wrote: > > > > > >> On Wed, Jan 06, 2016 at 09:35:59PM -0800, D

Re: [Y2038] [RFC 02/15] vfs: Change all structures to support 64 bit time

2016-01-17 Thread Deepa Dinamani
Based on the discussion, here is how I propose to proceed: 1. Series for timestamp range check and clamping 2. Bug fixing patches like change all CURRENT_TIME use cases to current_fs_time() 3. Patches for vfs to use timespec64 internally (maybe a series, if required) 4. Patches that change all

[Y2038] [RFC 02/15] vfs: Change all structures to support 64 bit time

2016-01-18 Thread Deepa Dinamani
On Mon, Jan 18, 2016 at 2:56 AM, Arnd Bergmann <a...@arndb.de> wrote: > On Sunday 17 January 2016 22:09:26 Deepa Dinamani wrote: >> Based on the discussion, here is how I propose to proceed: >> >> 1. Series for timestamp range check and clamping >> 2. B

[Y2038] [PATCH v3 17/24] fs: ocfs2: Replace CURRENT_TIME with ktime_get_real_seconds()

2016-06-25 Thread Deepa Dinamani
CURRENT_TIME is not y2038 safe. Use y2038 safe ktime_get_real_seconds() here for timestamps. struct heartbeat_block's hb_seq and deletetion time are already 64 bits wide and accommodate times beyond y2038. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: Mark Fasheh <mfas...

[Y2038] [PATCH v3 19/24] fs: nfs: Make nfs boot time y2038 safe

2016-06-25 Thread Deepa Dinamani
of ktime_t for the authsys_parms stamp field. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: Trond Myklebust <trond.mykleb...@primarydata.com> Cc: Anna Schumaker <anna.schuma...@netapp.com> Cc: linux-...@vger.kernel.org --- fs/nfs/client.c | 2 +- fs/nfs/netns.h

[Y2038] [PATCH v3 22/24] fs: ceph: Replace current_fs_time for request stamp

2016-06-25 Thread Deepa Dinamani
() to truncate the timestamp, using the right granularity from the superblock. This api will be transitioned to be y2038 safe along with vfs. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: "Yan, Zheng" <z...@redhat.com> Cc: Sage Weil <s...@redhat.com> Cc: Ilya

[Y2038] [PATCH v3 23/24] time: Delete current_fs_time() function

2016-06-25 Thread Deepa Dinamani
All uses of the current_fs_time() function have been replaced by other time interfaces. And, its use cases can be fulfilled by current_time() or ktime_get_* variants. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: John Stultz <john.stu...@linaro.org> Cc: Thomas

[Y2038] [PATCH v3 15/24] drivers: staging: lustre: Replace CURRENT_TIME with current_time()

2016-06-25 Thread Deepa Dinamani
current_time() will be extended to do range checks. Hence, it is necessary for all file system timestamps to use current_time(). Also change format string for prints so that these are valid when vfs is transitioned to use 64 bit timestamps. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com&

[Y2038] [PATCH v3 16/24] fs: ocfs2: Use time64_t to represent orphan scan times

2016-06-25 Thread Deepa Dinamani
of real time as only delta scan times are relevant and these values are not persistent across reboots. The format string for the debug print is still using long as this is only the time elapsed since the last scan and long is sufficient to represent this value. Signed-off-by: Deepa Dinamani

[Y2038] [PATCH v3 18/24] audit: Use timespec64 to represent audit timestamps

2016-06-25 Thread Deepa Dinamani
1024 characters. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: Paul Moore <p...@paul-moore.com> Cc: Eric Paris <epa...@redhat.com> Cc: linux-au...@redhat.com Acked-by: Paul Moore <p...@paul-moore.com> Acked-by: Richard Guy Briggs <r...@redhat.com> -

[Y2038] [PATCH v3 20/24] block: Replace CURRENT_TIME with ktime_get_real_ts

2016-06-25 Thread Deepa Dinamani
struct timespec64 in a separate patch. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: Ilya Dryomov <idryo...@gmail.com> Cc: Sage Weil <s...@redhat.com> Cc: Alex Elder <el...@kernel.org> Cc: ceph-de...@vger.kernel.org --- drivers/block/rbd.c | 2 +- 1 file ch

[Y2038] [PATCH v3 24/24] time: Delete CURRENT_TIME_SEC

2016-06-25 Thread Deepa Dinamani
All uses of CURRENT_TIME_SEC macro have been replaced by other time functions. This macro is also not y2038 safe. And, all its use cases can be fulfilled by y2038 safe ktime_get_* variants. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: John Stultz <john.stu...@linaro.org>

[Y2038] [PATCH v3 06/24] fs: jfs: Replace CURRENT_TIME_SEC by current_time()

2016-06-25 Thread Deepa Dinamani
jfs uses nanosecond granularity for filesystem timestamps. Only this assignment is not using nanosecond granularity. Use current_time() to get the right granularity. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: Dave Kleikamp <sha...@kernel.org> Cc:

[Y2038] [PATCH v3 01/24] vfs: Add current_time() api

2016-06-25 Thread Deepa Dinamani
-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/inode.c | 23 +++ include/linux/fs.h | 1 + 2 files changed, 24 insertions(+) diff --git a/fs/inode.c b/fs/inode.c index e171f7b..80b6898 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -2043,3 +2043,26 @

[Y2038] [PATCH v3 04/24] fs: Replace CURRENT_TIME_SEC with current_time() for inode timestamps

2016-06-25 Thread Deepa Dinamani
range checking is introduced. This works because alloc_super() fills in the the s_time_gran in super block to NSEC_PER_SEC. Also note that filesystem specific times like the birthtime, creation time that were using same interfaces to obtain time retain same logistics. Signed-off-by: Deepa

[Y2038] [PATCH v3 10/24] fs: udf: Replace CURRENT_TIME with current_time()

2016-06-25 Thread Deepa Dinamani
make them y2038 safe. As part of the effort current_time() will be extended to do range checks. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: Jan Kara <j...@suse.com> Reviewed-by: Jan Kara <j...@suse.cz> --- fs/udf/super.c | 9 ++--- 1 file changed, 6 inserti

[Y2038] [PATCH v3 08/24] fs: ubifs: Replace CURRENT_TIME_SEC with current_time

2016-06-25 Thread Deepa Dinamani
super_block. The granularity check to call current_fs_time() or CURRENT_TIME_SEC is not required. Use current_time() directly to update inode timestamp. Use timespec_trunc during file system creation, before the first inode is created. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc:

[Y2038] [PATCH v3 07/24] fs: ext4: Use current_time() for inode timestamps

2016-06-25 Thread Deepa Dinamani
() or CURRENT_TIME_SEC is not required. Use current_time() directly to obtain timestamps unconditionally, and remove ext4_current_time(). Quota files are assumed to be on the same filesystem. Hence, use current_time() for these files as well. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: "Th

[Y2038] [PATCH v3 09/24] fs: btrfs: Use ktime_get_real_ts for root ctime

2016-06-25 Thread Deepa Dinamani
timespec64 as well. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: Chris Mason <c...@fb.com> Cc: Josef Bacik <jba...@fb.com> Cc: David Sterba <dste...@suse.com> Cc: linux-bt...@vger.kernel.org Acked-by: David Sterba <dste...@suse.com> --- fs/btrfs/root-tre

Re: [Y2038] [PATCH v2 07/24] fs: ubifs: Replace CURRENT_TIME_SEC with current_time

2016-06-24 Thread Deepa Dinamani
>> @@ -84,6 +84,8 @@ static int create_default_filesystem(struct ubifs_info *c) >> int min_leb_cnt = UBIFS_MIN_LEB_CNT; >> long long tmp64, main_bytes; >> __le64 tmp_le64; >> + __le32 tmp_le32; >> + struct timespec ts; >> >> /* Some functions called from

Re: [Y2038] [PATCH v2 06/24] fs: ext4: Use current_time() for inode timestamps

2016-06-24 Thread Deepa Dinamani
>> @@ -3727,6 +3727,7 @@ static int ext4_cross_rename(struct inode *old_dir, >> struct dentry *old_dentry, >> }; >> u8 new_file_type; >> int retval; >> + struct timespec ctime; >> >> if ((ext4_encrypted_inode(old_dir) || >>

[Y2038] [PATCH v2 10/10] fs: btrfs: Replace CURRENT_TIME by current_fs_time()

2016-02-06 Thread Deepa Dinamani
CURRENT_TIME macro is not appropriate for filesystems as it doesn't use the right granularity for filesystem timestamps. Use current_fs_time() instead. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: Chris Mason <c...@fb.com> Cc: Josef Bacik <jba...@fb.com> Cc:

[Y2038] [RFC v2a 11/12] net: ceph: use vfs_time data type instead of timespec

2016-02-12 Thread Deepa Dinamani
are passed in as arguments to functions using inode timestamps. Hence, these need to change along with vfs to support 64 bit timestamps. vfs_time helps do this transition. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/ceph/messenger.h | 1 + include/linux/ceph/osd_cl

[Y2038] [RFC v2a 10/12] fs: ceph: Replace timespec data type with vfs_time

2016-02-12 Thread Deepa Dinamani
type for accessing inode timestamps. This is necessary as these accesses need to switch to using 64 bit timestamps along with vfs. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/ceph/cache.c | 2 +- fs/ceph/caps.c | 6 +++--- fs/ceph/dir.c| 4 ++-- fs/ceph/

[Y2038] [RFC v2a 07/12] fs: btrfs: Use vfs_time data type for btrfs_update_time()

2016-02-12 Thread Deepa Dinamani
callback function for inode operations. This accepts inode timestamp as an argument. And, needs to switch to 64 bit time representation along with vfs. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[Y2038] [RFC v2a 08/12] fs: btrfs: Change timespec data types to use vfs_time

2016-02-12 Thread Deepa Dinamani
to be represented corretly. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/btrfs/file.c| 6 +++--- fs/btrfs/ioctl.c | 4 ++-- fs/btrfs/root-tree.c | 2 +- fs/btrfs/transaction.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/file.c b/fs

[Y2038] [RFC v2a 12/12] fs: xfs: change inode times to use vfs_time data type

2016-02-12 Thread Deepa Dinamani
and this needs to change along with vfs inode times. All the accesses to or from struct inode timestamps and current_fs_time() are also changed to vfs_time. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/xfs/xfs_inode.c | 2 +- fs/xfs/xfs_iops.c| 2 +-

[Y2038] [RFC v2c 1/8] vfs: Add vfs_time abstractions

2016-02-12 Thread Deepa Dinamani
interfacing with vfs. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- 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/linu

[Y2038] [RFC v2a 02/12] fs: cifs: Change cifs_fscache_inode_auxdata to use vfs_time data type

2016-02-12 Thread Deepa Dinamani
in is a constant with sufficient space to accommodate auxdata. 3. The keylen subtracted from datalen is a constant and also leaves in sufficient space for increase. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/cifs/cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 del

[Y2038] [RFC v2a 00/12] vfs 64 bit time transition proposal

2016-02-12 Thread Deepa Dinamani
only includes patches for steps 1 and 2. Concerns 1.Before the vfs layer is done, it might be confusing to developers as individual filesystems now will have two options for access: timespec and vfs_time type. Deepa Dinamani (12): vfs: Add vfs_time abstractions fs: cifs: Change

[Y2038] [RFC v2] vfs 64 bit time transition proposals

2016-02-12 Thread Deepa Dinamani
Introduction This is a follow on to the series: https://lkml.org/lkml/2016/1/7/20 [1]. This is aimed at reaching a consensus on how to transition the vfs timestamps to use 64 bit time. This demonstrates three ways (2a, 2b and 2c) of solving this problem. Each of the proposals has its own cover

[Y2038] [RFC v2c 7/8] fs: ceph: Use vfs timestamp abstraction helpers

2016-02-12 Thread Deepa Dinamani
. All the timestamps are converted to use struct timespec64 data type. And, all the vfs timestamps are converted to timespec64 at the boundary of vfs. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/ceph/addr.c | 20 ++--- fs/ceph/cache.c | 6 +

[Y2038] [RFC v2c 5/8] fs: btrfs: Change btrfs_inode.i_otime to vfs_time data type

2016-02-12 Thread Deepa Dinamani
or 0. Hence, i_otime needs to use accessor functions to access inode timestamps. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/btrfs/btrfs_inode.h | 2 +- fs/btrfs/inode.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/btrfs_inode.

[Y2038] [RFC v2c 3/8] fs: cifs: Change cifs_fattr timestamps data type to timespec64

2016-02-12 Thread Deepa Dinamani
. Assigned from current_fs_time(), which will match vfs_time alias. 4. Assigned from cnvrtDosUnixTm(). And, this function does not care about the data type sizes of tv_sec and tv_nsec fields. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/cifs/cifsencrypt.c | 4 ++-- f

[Y2038] [RFC v2c 2/8] fs: cifs: Change auxdata to struct timespec64 data type

2016-02-12 Thread Deepa Dinamani
bit systems, making the alignment requirements also same as on 64 bit systems, except for i386 where alignment requirements pack the struct tighter. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/cifs/cache.c | 16 ++-- 1 file changed, 10 insertions(+), 6 del

[Y2038] [RFC v2c 4/8] fs: cifs: Make cnvrtDosUnixTm() y2038 safe

2016-02-12 Thread Deepa Dinamani
max on DOS times is 2107, its api's only support until the year 2099. This means we can get away with 32 bit unsigned sec field. But, the sec field uses long long to maintain uniformity in the kernel, where everyone uses the theoretical max. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.

[Y2038] [RFC v2c 6/8] fs: btrfs: Use vfs timestamp abstraction helper

2016-02-12 Thread Deepa Dinamani
() is a inode_ops callback. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/btrfs/file.c| 7 --- fs/btrfs/inode.c | 2 +- fs/btrfs/ioctl.c | 4 ++-- fs/btrfs/root-tree.c | 2 +- fs/btrfs/transaction.c | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff

Re: [Y2038] [PATCH 10/10] fs: btrfs: Replace CURRENT_TIME by current_fs_time()

2016-02-05 Thread Deepa Dinamani
lt;dste...@suse.cz> wrote: > On Tue, Feb 02, 2016 at 10:07:50PM -0800, Deepa Dinamani wrote: >> CURRENT_TIME macro is not appropriate for filesystems as it >> doesn't use the right granularity for filesystem timestamps. >> Use current_fs_time() instead. >> >> Signed

[Y2038] [RFC v2] vfs 64 bit time transition proposals

2016-02-13 Thread Deepa Dinamani
Changing a few things and accounting for false positives (assuming worst case and rounding up for case 2a, rounding down for 2b) > * # Changes needed in 2a = row 1 + row 7 + row 8 + row 9 + row 10 > = 34 + 80 + 10 + 3 + 3 = 130 > * # Changes needed in 2b = row 1 + row 4 +

[Y2038] [RFC v2] vfs 64 bit time transition proposals

2016-02-13 Thread Deepa Dinamani
Changing a few things, accounting for false positives (assuming worst case and rounding up for case 2a, rounding down for 2b) > * # Changes needed in 2a = row 1 + row 7 + row 8 + row 9 + row 10 > = 34 + 80 + 10 + 3 + 3 = 130 > * # Changes needed in 2b = row 1 + row 4 +

Re: [Y2038] [RFC v2] vfs 64 bit time transition proposals

2016-02-12 Thread Deepa Dinamani
> Regarding the three versions, I think all of them are doable > doable, and they all have their upsides and downsides but no > showstoppers. I agree that all the approaches are doable. > Let me summarize what I see in the patches: > > 2a is the smallest set of changes in number of lines, as you

[Y2038] [PATCH 00/10] Remove CURRENT_TIME and CURRENT_TIME_SEC - PART 1

2016-02-02 Thread Deepa Dinamani
y2038 safe timespec64 in [2]. 2. Function will use y2038 safe 64 bit functions in [2]. 3. Function will be extended to perform range checks in [3]. Any use of these macros outside of filesystem timestamps will be replaced by function calls to appropriate time functions. Deepa Dinamani (10): fs

[Y2038] [PATCH 01/10] fs: Add current_fs_time_sec() function

2016-02-02 Thread Deepa Dinamani
super block as a parameter to allow for future range checking of filesystem timestamps. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: Alexander Viro <v...@zeniv.linux.org.uk> Cc: linux-fsde...@vger.kernel.org --- include/linux/fs.h | 5 + 1 file changed, 5 inserti

[Y2038] [PATCH 04/10] fs: cifs: Replace CURRENT_TIME with ktime_get_real_ts()

2016-02-02 Thread Deepa Dinamani
() here as this is not filesystem time. ktime_get_real_ts() returns the timestamp in ns which can be used to calculate network time for NTLMv2 authentication timestamp. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: Steve French <sfre...@samba.org> Cc: linux-c...@vger.k

[Y2038] [PATCH 05/10] fs: cifs: Replace CURRENT_TIME by get_seconds

2016-02-02 Thread Deepa Dinamani
server and client, and the largest timezone difference is in the range of one day. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: Steve French <sfre...@samba.org> Cc: linux-c...@vger.kernel.org Cc: samba-techni...@lists.samba.org --- fs/cifs/cifssmb.c | 10 +- 1 fil

[Y2038] [PATCH 07/10] fs: ext4: Replace CURRENT_TIME with ext4_current_time()

2016-02-02 Thread Deepa Dinamani
CURRENT_TIME macro is not appropriate for filesystems as it doesn't use the right granularity for filesystem timestamps. Use ext4_current_time() instead which is appropriate for ext4 timestamps. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: "Theodore Ts'o" <ty...@m

  1   2   3   4   5   6   7   >