Re: [PATCH 12/20] fs: fat: Initialize filesystem timestamp ranges

2019-07-30 Thread OGAWA Hirofumi
Deepa Dinamani writes: >> At least, it is wrong to call fat_time_fat2unix() before setup parameters >> in sbi. > > All the parameters that fat_time_fat2unix() cares in sbi is accessed through > > static inline int fat_tz_offset(struct msdos_sb_info *sbi) > { > return (sbi->options.tz_set ? >

Re: [PATCH 12/20] fs: fat: Initialize filesystem timestamp ranges

2019-07-30 Thread Deepa Dinamani
On Tue, Jul 30, 2019 at 2:31 AM OGAWA Hirofumi wrote: > > Deepa Dinamani writes: > > > +/* DOS dates from 1980/1/1 through 2107/12/31 */ > > +#define FAT_DATE_MIN (0<<9 | 1<<5 | 1) > > +#define FAT_DATE_MAX (127<<9 | 12<<5 | 31) > > +#define FAT_TIME_MAX (23<<11 | 59<<5 | 29) > > + > > /* > >

Re: [PATCH 12/20] fs: fat: Initialize filesystem timestamp ranges

2019-07-30 Thread OGAWA Hirofumi
Deepa Dinamani writes: > +/* DOS dates from 1980/1/1 through 2107/12/31 */ > +#define FAT_DATE_MIN (0<<9 | 1<<5 | 1) > +#define FAT_DATE_MAX (127<<9 | 12<<5 | 31) > +#define FAT_TIME_MAX (23<<11 | 59<<5 | 29) > + > /* > * A deserialized copy of the on-disk structure laid out in struct > *

[PATCH 12/20] fs: fat: Initialize filesystem timestamp ranges

2019-07-29 Thread Deepa Dinamani
Fill in the appropriate limits to avoid inconsistencies in the vfs cached inode times when timestamps are outside the permitted range. Some FAT variants indicate that the years after 2099 are not supported. Since commit 7decd1cb0305 ("fat: Fix and cleanup timestamp conversion"), we support the