2020-01-02 08:25:18

by Namjae Jeon

[permalink] [raw]
Subject: [PATCH v9 12/13] exfat: add exfat in fs/Kconfig and fs/Makefile

Add exfat in fs/Kconfig and fs/Makefile.

Signed-off-by: Namjae Jeon <[email protected]>
Signed-off-by: Sungjong Seo <[email protected]>
---
fs/Kconfig | 3 ++-
fs/Makefile | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/Kconfig b/fs/Kconfig
index 7b623e9fc1b0..5edd87eb5c13 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -139,9 +139,10 @@ endmenu
endif # BLOCK

if BLOCK
-menu "DOS/FAT/NT Filesystems"
+menu "DOS/FAT/EXFAT/NT Filesystems"

source "fs/fat/Kconfig"
+source "fs/exfat/Kconfig"
source "fs/ntfs/Kconfig"

endmenu
diff --git a/fs/Makefile b/fs/Makefile
index 98be354fdb61..2c7ea7e0a95b 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -83,6 +83,7 @@ obj-$(CONFIG_HUGETLBFS) += hugetlbfs/
obj-$(CONFIG_CODA_FS) += coda/
obj-$(CONFIG_MINIX_FS) += minix/
obj-$(CONFIG_FAT_FS) += fat/
+obj-$(CONFIG_EXFAT) += exfat/
obj-$(CONFIG_BFS_FS) += bfs/
obj-$(CONFIG_ISO9660_FS) += isofs/
obj-$(CONFIG_HFSPLUS_FS) += hfsplus/ # Before hfs to find wrapped HFS+
--
2.17.1


2020-01-02 12:59:30

by Pali Rohár

[permalink] [raw]
Subject: Re: [PATCH v9 12/13] exfat: add exfat in fs/Kconfig and fs/Makefile

On Thursday 02 January 2020 16:20:35 Namjae Jeon wrote:
> Add exfat in fs/Kconfig and fs/Makefile.
>
> Signed-off-by: Namjae Jeon <[email protected]>
> Signed-off-by: Sungjong Seo <[email protected]>
> ---
> fs/Kconfig | 3 ++-
> fs/Makefile | 1 +
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/Kconfig b/fs/Kconfig
> index 7b623e9fc1b0..5edd87eb5c13 100644
> --- a/fs/Kconfig
> +++ b/fs/Kconfig
> @@ -139,9 +139,10 @@ endmenu
> endif # BLOCK
>
> if BLOCK
> -menu "DOS/FAT/NT Filesystems"
> +menu "DOS/FAT/EXFAT/NT Filesystems"
>
> source "fs/fat/Kconfig"
> +source "fs/exfat/Kconfig"
> source "fs/ntfs/Kconfig"
>
> endmenu
> diff --git a/fs/Makefile b/fs/Makefile
> index 98be354fdb61..2c7ea7e0a95b 100644
> --- a/fs/Makefile
> +++ b/fs/Makefile
> @@ -83,6 +83,7 @@ obj-$(CONFIG_HUGETLBFS) += hugetlbfs/
> obj-$(CONFIG_CODA_FS) += coda/
> obj-$(CONFIG_MINIX_FS) += minix/
> obj-$(CONFIG_FAT_FS) += fat/
> +obj-$(CONFIG_EXFAT) += exfat/
> obj-$(CONFIG_BFS_FS) += bfs/
> obj-$(CONFIG_ISO9660_FS) += isofs/
> obj-$(CONFIG_HFSPLUS_FS) += hfsplus/ # Before hfs to find wrapped HFS+

Seems that all filesystems have _FS suffix in their config names. So
should not have exfat config also same convention? CONFIG_EXFAT_FS?

--
Pali Rohár
[email protected]

2020-01-02 13:10:45

by Namjae Jeon

[permalink] [raw]
Subject: Re: [PATCH v9 12/13] exfat: add exfat in fs/Kconfig and fs/Makefile

>> index 98be354fdb61..2c7ea7e0a95b 100644
>> --- a/fs/Makefile
>> +++ b/fs/Makefile
>> @@ -83,6 +83,7 @@ obj-$(CONFIG_HUGETLBFS) += hugetlbfs/
>> obj-$(CONFIG_CODA_FS) += coda/
>> obj-$(CONFIG_MINIX_FS) += minix/
>> obj-$(CONFIG_FAT_FS) += fat/
>> +obj-$(CONFIG_EXFAT) += exfat/
>> obj-$(CONFIG_BFS_FS) += bfs/
>> obj-$(CONFIG_ISO9660_FS) += isofs/
>> obj-$(CONFIG_HFSPLUS_FS) += hfsplus/ # Before hfs to find wrapped HFS+
>
> Seems that all filesystems have _FS suffix in their config names. So
> should not have exfat config also same convention? CONFIG_EXFAT_FS?
Yeah, I know, However, That name conflicts with staging/exfat.
So I subtracted _FS suffix.
>
> --
> Pali Rohár
> [email protected]
>

2020-01-02 13:12:59

by Pali Rohár

[permalink] [raw]
Subject: Re: [PATCH v9 12/13] exfat: add exfat in fs/Kconfig and fs/Makefile

On Thursday 02 January 2020 22:07:16 Namjae Jeon wrote:
> >> index 98be354fdb61..2c7ea7e0a95b 100644
> >> --- a/fs/Makefile
> >> +++ b/fs/Makefile
> >> @@ -83,6 +83,7 @@ obj-$(CONFIG_HUGETLBFS) += hugetlbfs/
> >> obj-$(CONFIG_CODA_FS) += coda/
> >> obj-$(CONFIG_MINIX_FS) += minix/
> >> obj-$(CONFIG_FAT_FS) += fat/
> >> +obj-$(CONFIG_EXFAT) += exfat/
> >> obj-$(CONFIG_BFS_FS) += bfs/
> >> obj-$(CONFIG_ISO9660_FS) += isofs/
> >> obj-$(CONFIG_HFSPLUS_FS) += hfsplus/ # Before hfs to find wrapped HFS+
> >
> > Seems that all filesystems have _FS suffix in their config names. So
> > should not have exfat config also same convention? CONFIG_EXFAT_FS?
> Yeah, I know, However, That name conflicts with staging/exfat.
> So I subtracted _FS suffix.

Maybe it is a good idea to drop conflicting implementation prior merging
this series? Or at least renaming conflicting name?

You already wrote that it is "random previous snaphot" which does not
sounds as something we would like to use or support.

--
Pali Rohár
[email protected]

2020-01-02 14:20:23

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v9 12/13] exfat: add exfat in fs/Kconfig and fs/Makefile

On Thu, Jan 02, 2020 at 10:07:16PM +0900, Namjae Jeon wrote:
> >> index 98be354fdb61..2c7ea7e0a95b 100644
> >> --- a/fs/Makefile
> >> +++ b/fs/Makefile
> >> @@ -83,6 +83,7 @@ obj-$(CONFIG_HUGETLBFS) += hugetlbfs/
> >> obj-$(CONFIG_CODA_FS) += coda/
> >> obj-$(CONFIG_MINIX_FS) += minix/
> >> obj-$(CONFIG_FAT_FS) += fat/
> >> +obj-$(CONFIG_EXFAT) += exfat/
> >> obj-$(CONFIG_BFS_FS) += bfs/
> >> obj-$(CONFIG_ISO9660_FS) += isofs/
> >> obj-$(CONFIG_HFSPLUS_FS) += hfsplus/ # Before hfs to find wrapped HFS+
> >
> > Seems that all filesystems have _FS suffix in their config names. So
> > should not have exfat config also same convention? CONFIG_EXFAT_FS?
> Yeah, I know, However, That name conflicts with staging/exfat.
> So I subtracted _FS suffix.

If it's a problem, please send me a patch to rename the staging/exfat/
config option so that you can use the "real" one someday soon.

thanks,

greg k-h

2020-01-02 23:49:32

by Namjae Jeon

[permalink] [raw]
Subject: RE: [PATCH v9 12/13] exfat: add exfat in fs/Kconfig and fs/Makefile

> On Thu, Jan 02, 2020 at 10:07:16PM +0900, Namjae Jeon wrote:
> > >> index 98be354fdb61..2c7ea7e0a95b 100644
> > >> --- a/fs/Makefile
> > >> +++ b/fs/Makefile
> > >> @@ -83,6 +83,7 @@ obj-$(CONFIG_HUGETLBFS) +=
hugetlbfs/
> > >> obj-$(CONFIG_CODA_FS) += coda/
> > >> obj-$(CONFIG_MINIX_FS) += minix/
> > >> obj-$(CONFIG_FAT_FS) += fat/
> > >> +obj-$(CONFIG_EXFAT) += exfat/
> > >> obj-$(CONFIG_BFS_FS) += bfs/
> > >> obj-$(CONFIG_ISO9660_FS) += isofs/
> > >> obj-$(CONFIG_HFSPLUS_FS) += hfsplus/ # Before hfs to find
wrapped
> HFS+
> > >
> > > Seems that all filesystems have _FS suffix in their config names. So
> > > should not have exfat config also same convention? CONFIG_EXFAT_FS?
> > Yeah, I know, However, That name conflicts with staging/exfat.
> > So I subtracted _FS suffix.
>
> If it's a problem, please send me a patch to rename the staging/exfat/
> config option so that you can use the "real" one someday soon.
Okay, I will:)
Thanks a lot!
>
> thanks,
>
> greg k-h

2020-01-04 05:30:21

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH v9 12/13] exfat: add exfat in fs/Kconfig and fs/Makefile

Hi Namjae,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linux/master]
[also build test ERROR on hch-configfs/for-next linus/master v5.5-rc4 next-20191219]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/Namjae-Jeon/add-the-latest-exfat-driver/20200104-035709
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 1522d9da40bdfe502c91163e6d769332897201fa
config: c6x-allyesconfig (attached as .config)
compiler: c6x-elf-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=c6x

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <[email protected]>

All errors (new ones prefixed by >>):

fs/exfat/misc.c: In function 'exfat_time_unix2fat':
>> fs/exfat/misc.c:157:16: error: 'UNIX_SECS_2108' undeclared (first use in this function); did you mean 'UNIX_SECS_1980'?
if (second >= UNIX_SECS_2108) {
^~~~~~~~~~~~~~
UNIX_SECS_1980
fs/exfat/misc.c:157:16: note: each undeclared identifier is reported only once for each function it appears in

vim +157 fs/exfat/misc.c

25430145db94f9 Namjae Jeon 2020-01-02 131
25430145db94f9 Namjae Jeon 2020-01-02 132 #define TIMEZONE_CUR_OFFSET() ((sys_tz.tz_minuteswest / (-15)) & 0x7F)
25430145db94f9 Namjae Jeon 2020-01-02 133 /* Convert linear UNIX date to a FAT time/date pair. */
25430145db94f9 Namjae Jeon 2020-01-02 134 void exfat_time_unix2fat(struct exfat_sb_info *sbi, struct timespec64 *ts,
25430145db94f9 Namjae Jeon 2020-01-02 135 struct exfat_date_time *tp)
25430145db94f9 Namjae Jeon 2020-01-02 136 {
25430145db94f9 Namjae Jeon 2020-01-02 137 time_t second = ts->tv_sec;
25430145db94f9 Namjae Jeon 2020-01-02 138 time_t day, month, year;
25430145db94f9 Namjae Jeon 2020-01-02 139 time_t ld; /* leap day */
25430145db94f9 Namjae Jeon 2020-01-02 140
25430145db94f9 Namjae Jeon 2020-01-02 141 /* Treats as local time with proper time */
25430145db94f9 Namjae Jeon 2020-01-02 142 second -= sys_tz.tz_minuteswest * SECS_PER_MIN;
25430145db94f9 Namjae Jeon 2020-01-02 143 tp->timezone.valid = 1;
25430145db94f9 Namjae Jeon 2020-01-02 144 tp->timezone.off = TIMEZONE_CUR_OFFSET();
25430145db94f9 Namjae Jeon 2020-01-02 145
25430145db94f9 Namjae Jeon 2020-01-02 146 /* Jan 1 GMT 00:00:00 1980. But what about another time zone? */
25430145db94f9 Namjae Jeon 2020-01-02 147 if (second < UNIX_SECS_1980) {
25430145db94f9 Namjae Jeon 2020-01-02 148 tp->second = 0;
25430145db94f9 Namjae Jeon 2020-01-02 149 tp->minute = 0;
25430145db94f9 Namjae Jeon 2020-01-02 150 tp->hour = 0;
25430145db94f9 Namjae Jeon 2020-01-02 151 tp->day = 1;
25430145db94f9 Namjae Jeon 2020-01-02 152 tp->month = 1;
25430145db94f9 Namjae Jeon 2020-01-02 153 tp->year = 0;
25430145db94f9 Namjae Jeon 2020-01-02 154 return;
25430145db94f9 Namjae Jeon 2020-01-02 155 }
25430145db94f9 Namjae Jeon 2020-01-02 156
25430145db94f9 Namjae Jeon 2020-01-02 @157 if (second >= UNIX_SECS_2108) {
25430145db94f9 Namjae Jeon 2020-01-02 158 tp->second = 59;
25430145db94f9 Namjae Jeon 2020-01-02 159 tp->minute = 59;
25430145db94f9 Namjae Jeon 2020-01-02 160 tp->hour = 23;
25430145db94f9 Namjae Jeon 2020-01-02 161 tp->day = 31;
25430145db94f9 Namjae Jeon 2020-01-02 162 tp->month = 12;
25430145db94f9 Namjae Jeon 2020-01-02 163 tp->year = 127;
25430145db94f9 Namjae Jeon 2020-01-02 164 return;
25430145db94f9 Namjae Jeon 2020-01-02 165 }
25430145db94f9 Namjae Jeon 2020-01-02 166
25430145db94f9 Namjae Jeon 2020-01-02 167 day = second / SECS_PER_DAY - DAYS_DELTA_DECADE;
25430145db94f9 Namjae Jeon 2020-01-02 168 year = day / 365;
25430145db94f9 Namjae Jeon 2020-01-02 169
25430145db94f9 Namjae Jeon 2020-01-02 170 MAKE_LEAP_YEAR(ld, year);
25430145db94f9 Namjae Jeon 2020-01-02 171 if (year * 365 + ld > day)
25430145db94f9 Namjae Jeon 2020-01-02 172 year--;
25430145db94f9 Namjae Jeon 2020-01-02 173
25430145db94f9 Namjae Jeon 2020-01-02 174 MAKE_LEAP_YEAR(ld, year);
25430145db94f9 Namjae Jeon 2020-01-02 175 day -= year * 365 + ld;
25430145db94f9 Namjae Jeon 2020-01-02 176
25430145db94f9 Namjae Jeon 2020-01-02 177 if (IS_LEAP_YEAR(year) && day == accum_days_in_year[3]) {
25430145db94f9 Namjae Jeon 2020-01-02 178 month = 2;
25430145db94f9 Namjae Jeon 2020-01-02 179 } else {
25430145db94f9 Namjae Jeon 2020-01-02 180 if (IS_LEAP_YEAR(year) && day > accum_days_in_year[3])
25430145db94f9 Namjae Jeon 2020-01-02 181 day--;
25430145db94f9 Namjae Jeon 2020-01-02 182 for (month = 1; month < 12; month++) {
25430145db94f9 Namjae Jeon 2020-01-02 183 if (accum_days_in_year[month + 1] > day)
25430145db94f9 Namjae Jeon 2020-01-02 184 break;
25430145db94f9 Namjae Jeon 2020-01-02 185 }
25430145db94f9 Namjae Jeon 2020-01-02 186 }
25430145db94f9 Namjae Jeon 2020-01-02 187 day -= accum_days_in_year[month];
25430145db94f9 Namjae Jeon 2020-01-02 188
25430145db94f9 Namjae Jeon 2020-01-02 189 tp->second = second % SECS_PER_MIN;
25430145db94f9 Namjae Jeon 2020-01-02 190 tp->minute = (second / SECS_PER_MIN) % 60;
25430145db94f9 Namjae Jeon 2020-01-02 191 tp->hour = (second / SECS_PER_HOUR) % 24;
25430145db94f9 Namjae Jeon 2020-01-02 192 tp->day = day + 1;
25430145db94f9 Namjae Jeon 2020-01-02 193 tp->month = month;
25430145db94f9 Namjae Jeon 2020-01-02 194 tp->year = year;
25430145db94f9 Namjae Jeon 2020-01-02 195 }
25430145db94f9 Namjae Jeon 2020-01-02 196

:::::: The code at line 157 was first introduced by commit
:::::: 25430145db94f9ef1c017b0b2e3f4729888576d7 exfat: add misc operations

:::::: TO: Namjae Jeon <[email protected]>
:::::: CC: 0day robot <[email protected]>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/[email protected] Intel Corporation


Attachments:
(No filename) (6.31 kB)
.config.gz (49.52 kB)
Download all attachments