Re: [Y2038] [PATCH 09/20] ext4: Initialize timestamps limits

2019-08-08 Thread Deepa Dinamani
> Rather than printing a warning at mount time (which may be confusing > to users for a problem they may never see), it makes sense to only > print such a warning in the vanishingly small case that someone actually > tries to modify the inode timestamp but it doesn't fit, rather than on > the theor

Re: [Y2038] [PATCH 09/20] ext4: Initialize timestamps limits

2019-08-03 Thread Arnd Bergmann
On Sat, Aug 3, 2019 at 6:03 PM Theodore Y. Ts'o wrote: > > On Sat, Aug 03, 2019 at 11:30:22AM +0200, Arnd Bergmann wrote: > > > > I see in the ext4 code that we always try to expand i_extra_size > > to s_want_extra_isize in ext4_mark_inode_dirty(), and that > > s_want_extra_isize is always at leas

Re: [Y2038] [PATCH 09/20] ext4: Initialize timestamps limits

2019-08-03 Thread Theodore Y. Ts'o
On Sat, Aug 03, 2019 at 11:30:22AM +0200, Arnd Bergmann wrote: > > I see in the ext4 code that we always try to expand i_extra_size > to s_want_extra_isize in ext4_mark_inode_dirty(), and that > s_want_extra_isize is always at least s_min_extra_isize, so > we constantly try to expand the inode to

Re: [Y2038] [PATCH 09/20] ext4: Initialize timestamps limits

2019-08-03 Thread Arnd Bergmann
On Fri, Aug 2, 2019 at 11:39 PM Theodore Y. Ts'o wrote: > > On Fri, Aug 02, 2019 at 09:00:52PM +0200, Arnd Bergmann wrote: > > > > I must have misunderstood what the field says. I expected that > > with s_min_extra_isize set beyond the nanosecond fields, there > > would be a guarantee that all ino

Re: [Y2038] [PATCH 09/20] ext4: Initialize timestamps limits

2019-08-03 Thread Andreas Dilger
On Aug 2, 2019, at 15:39, Theodore Y. Ts'o wrote: > >> On Fri, Aug 02, 2019 at 09:00:52PM +0200, Arnd Bergmann wrote: >> >> I must have misunderstood what the field says. I expected that >> with s_min_extra_isize set beyond the nanosecond fields, there >> would be a guarantee that all inodes hav

Re: [Y2038] [PATCH 09/20] ext4: Initialize timestamps limits

2019-08-02 Thread Theodore Y. Ts'o
On Fri, Aug 02, 2019 at 09:00:52PM +0200, Arnd Bergmann wrote: > > I must have misunderstood what the field says. I expected that > with s_min_extra_isize set beyond the nanosecond fields, there > would be a guarantee that all inodes have at least as many > extra bytes already allocated. What circ

Re: [Y2038] [PATCH 09/20] ext4: Initialize timestamps limits

2019-08-02 Thread Arnd Bergmann
On Fri, Aug 2, 2019 at 5:43 PM Theodore Y. Ts'o wrote: > > On Fri, Aug 02, 2019 at 12:39:41PM +0200, Arnd Bergmann wrote: > > Is it correct to assume that this kind of file would have to be > > created using the ext3.ko file system implementation that was > > removed in linux-4.3, but not usiing e

Re: [Y2038] [PATCH 09/20] ext4: Initialize timestamps limits

2019-08-02 Thread Theodore Y. Ts'o
On Fri, Aug 02, 2019 at 12:39:41PM +0200, Arnd Bergmann wrote: > Is it correct to assume that this kind of file would have to be > created using the ext3.ko file system implementation that was > removed in linux-4.3, but not usiing ext2.ko or ext4.ko (which > would always set the extended timestamp

Re: [Y2038] [PATCH 09/20] ext4: Initialize timestamps limits

2019-08-02 Thread Arnd Bergmann
On Fri, Aug 2, 2019 at 12:43 AM Theodore Y. Ts'o wrote: > > On Thu, Aug 01, 2019 at 12:18:28PM -0700, Deepa Dinamani wrote: > > > Say you have a filesystem with s_inode_size > 128 where not all of the > > > ondisk inodes have been upgraded to i_extra_isize > 0 and therefore > > > don't support nan

Re: [Y2038] [PATCH 09/20] ext4: Initialize timestamps limits

2019-08-01 Thread Theodore Y. Ts'o
On Thu, Aug 01, 2019 at 12:18:28PM -0700, Deepa Dinamani wrote: > > Say you have a filesystem with s_inode_size > 128 where not all of the > > ondisk inodes have been upgraded to i_extra_isize > 0 and therefore > > don't support nanoseconds or times beyond 2038. I think this happens on > > ext3 fi

Re: [Y2038] [PATCH 09/20] ext4: Initialize timestamps limits

2019-08-01 Thread Deepa Dinamani
On Wed, Jul 31, 2019 at 8:26 AM Darrick J. Wong wrote: > > On Mon, Jul 29, 2019 at 06:49:13PM -0700, Deepa Dinamani wrote: > > ext4 has different overflow limits for max filesystem > > timestamps based on the extra bytes available. > > > > The timestamp limits are calculated according to the > > e

Re: [Y2038] [PATCH 09/20] ext4: Initialize timestamps limits

2019-07-31 Thread Darrick J. Wong
On Mon, Jul 29, 2019 at 06:49:13PM -0700, Deepa Dinamani wrote: > ext4 has different overflow limits for max filesystem > timestamps based on the extra bytes available. > > The timestamp limits are calculated according to the > encoding table in > a4dad1ae24f85i(ext4: Fix handling of extended tv_s

[Y2038] [PATCH 09/20] ext4: Initialize timestamps limits

2019-07-29 Thread Deepa Dinamani
ext4 has different overflow limits for max filesystem timestamps based on the extra bytes available. The timestamp limits are calculated according to the encoding table in a4dad1ae24f85i(ext4: Fix handling of extended tv_sec): * extra msb of adjust for signed * epoch 32-