Commit Graph

10 Commits

Author SHA1 Message Date
Namjae Jeon
6b09f3cef3 exfat: fix build error on 32bit & 4.19 lower kernel version
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
2020-07-03 12:40:25 +09:00
Tetsuhiro Kohada
773256e416 exfat: write multiple sectors at once
Write multiple sectors at once when updating dir-entries.
Add exfat_update_bhs() for that. It wait for write completion once
instead of sector by sector.
It's only effective if sync enabled.

Signed-off-by: Tetsuhiro Kohada <kohada.t2@gmail.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
2020-07-03 12:40:14 +09:00
Tetsuhiro Kohada
117088f39d exfat: remove EXFAT_SB_DIRTY flag
This flag is set/reset in exfat_put_super()/exfat_sync_fs()
to avoid sync_blockdev().
- exfat_put_super():
Before calling this, the VFS has already called sync_filesystem(),
so sync is never performed here.
- exfat_sync_fs():
After calling this, the VFS calls sync_blockdev(), so, it is meaningless
to check EXFAT_SB_DIRTY or to bypass sync_blockdev() here.

Remove the EXFAT_SB_DIRTY check to ensure synchronization.
And remove the code related to the flag.

Signed-off-by: Tetsuhiro Kohada <kohada.t2@gmail.com>
Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
2020-06-17 22:08:32 +09:00
Tetsuhiro Kohada
149ef0460e exfat: standardize checksum calculation
To clarify that it is a 16-bit checksum, the parts related to the 16-bit
checksum are renamed and change type to u16.
Furthermore, replace checksum calculation in exfat_load_upcase_table()
with exfat_calc_checksum32().

Signed-off-by: Tetsuhiro Kohada <kohada.t2@gmail.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
2020-06-04 15:42:47 +09:00
Tetsuhiro Kohada
af08f9af6f exfat: add boot region verification
Add Boot-Regions verification specified in exFAT specification.
Note that the checksum type is strongly related to the raw structure,
so the'u32 'type is used to clarify the number of bits.

Signed-off-by: Tetsuhiro Kohada <kohada.t2@gmail.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
2020-06-04 15:42:44 +09:00
Tetsuhiro Kohada
9772742131 exfat: replace 'time_ms' with 'time_cs'
Replace time_ms  with time_cs in the file directory entry structure
and related functions.

The unit of create_time_ms/modify_time_ms in File Directory Entry are not
'milli-second', but 'centi-second'.
The exfat specification uses the term '10ms', but instead use 'cs' as in
msdos_fs.h.

Signed-off-by: Tetsuhiro Kohada <kohada.t2@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2020-05-03 23:11:32 +09:00
Eric Sandeen
09241c144b exfat: truncate atimes to 2s granularity
exfat atimes are restricted to only 2s granularity so after
we set an atime, round it down to the nearest 2s and set the
sub-second component of the timestamp to 0.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
2020-04-21 10:17:24 +09:00
Joe Perches
e08ed90147 exfat: Use a more common logging style
Remove the direct use of KERN_<LEVEL> in functions by creating
separate exfat_<level> macros.

Miscellanea:

o Remove several unnecessary terminating newlines in formats
o Realign arguments and fit to 80 columns where appropriate

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
2020-04-06 12:50:48 +09:00
Namjae Jeon
4e3295fb51 exfat: fix build support from 4.1 to liunx 5.5 kernel
Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
2020-02-08 19:13:34 +09:00
Namjae Jeon
9273f3d387 exfat: initial commit
Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
2020-02-03 21:47:19 +09:00