[lkml]   [2016]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Y2038] [RFC v2] vfs 64 bit time transition proposals
> 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 indicated
> in the previous discussion (I was skeptical here initially, but
> you were right). The main downside is that each patch has to
> carefully consider what happens at the point when the type gets
> flipped, so that printk format strings are correct and assignments
> to local variables don't truncate the range. It also requires
> changing the types again after the VFS change, but that is
> something we can automate using coccinelle.

2c has the same downside as this.
It also has to carefully consider what happens when you switch end filesystems
to timespec64, be it for printks or assignments.
I would say that the effort to do this was the same for 2a and 2c.

And, 2c also needs to get rid of the abstraction macros when vfs is transitioned
to using timespec64.

> 2b has the main advantage of not changing behavior with the flip, so
> we can convert all file systems to use vfs_time relatively easily
> and then later make them actually use 64-bit timestamps with
> a patch that each file system developer can do for themselves.
> One downside is that it leads to rather ugly code as discussed
> before, examples are in "[RFC v2b 5/5] fs: xfs: change inode
> times to use vfs_time data type" and "[RFC v2b 3/5] fs: btrfs:
> Use vfs_time accessors".

Here is the breakup of the number of changes required from the table
in the cover letter(

* # 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 + row 5 + row 6 + row 7 * (~3)
= 34 + 80 + 141 + 74 + 85 + 240 = 654
* # Changes needed in 2c = Changes in 2b + some more

It is clear to see from the above table that number of such changes will be
considerably more for approaches 2b and 2c.

And, 2b is not even close to what we want to achieve and will again confuse
developers even more as there will be 2 sets of abstraction apis now:
1. vfs_time apis
2. timespec64 to timespec/ timespec to timespec64 apis
Since there is no clean up effort here after vfs is switched over, we are just
making all filesystems that use these apis harder to read.

> 2c gets us the furthest along the way for the conversion, close
> to where we want to end up in the long run, so we could do that
> to file systems one by one. The behavior change is immediate,
> so there are fewer possible surprises than with 2a, but it
> also means the most upfront work.

2c abstractions can be used in more than one way.
And, 2c also introduces a new timestamp data type along with
timespec64 in the filesystem code.
The above two factors can make it confusing for the developers
until we transition vfs and remove abstractions from individual
filesystems. And, this is a problem as we want to remove
abstractions in a different kernel release than the one we do the
transition in, as we discussed previously.

2a still seems like the right choice to me.
And, will have the least number of changes.

As Arnd thinks all of them are doable, if anybody else has other
concerns we missed
please comment.


 \ /
  Last update: 2016-02-13 08:21    [W:0.105 / U:8.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site