RE: [PATCH v3] exfat: speed up iterate/lookup by fixing start point of traversing cluster chain

2021-03-21 Thread Sungjong Seo
quot;, > Before : 0m08.69s real 0m00.27s user 0m05.91s system > After : 0m07.01s real 0m00.25s user 0m04.34s system > > Signed-off-by: Hyeongseok Kim Looks good. Thanks for your contribution. Reviewed-by: Sungjong Seo > --- > fs/exfat/dir.c | 19

RE: [PATCH v2] exfat: speed up iterate/lookup by fixing start point of traversing cluster chain

2021-03-19 Thread Sungjong Seo
> When directory iterate and lookup is called, there's a buggy rewinding of > start point for traversing cluster chain to the parent directory entry's > first cluster. This caused repeated cluster chain traversing from the > first entry of the parent directory that would show worse performance if >

RE: [PATCH] exfat: speed up iterate/lookup by fixing start point of traversing fat chain

2021-03-17 Thread Sungjong Seo
> When directory iterate and lookup is called, there is a buggy rewinding of > start point for traversing fat chain to the directory entry's first > cluster. This caused repeated fat chain traversing from the first entry of > the directory that would show worse performance if huge amounts of files

RE: [PATCH] exfat: improve write performance when dirsync enabled

2021-03-16 Thread Sungjong Seo
k Kim Looks good. Thanks for your work. Acked-by: Sungjong Seo

RE: [PATCH v4 2/2] exfat: add support ioctl and FITRIM function

2021-03-02 Thread Sungjong Seo
gt; fs/exfat/balloc.c | 80 + > fs/exfat/dir.c | 5 +++ > fs/exfat/exfat_fs.h | 4 +++ > fs/exfat/file.c | 53 ++ > 4 files changed, 142 insertions(+) > It looks better than v3. Thanks for your work! Ac

RE: [PATCH v4 1/2] exfat: introduce bitmap_lock for cluster bitmap access

2021-03-02 Thread Sungjong Seo
work! Acked-by: Sungjong Seo

RE: [PATCH] exfat: fix erroneous discard when clear cluster bit

2021-03-01 Thread Sungjong Seo
h is 2, leading > to discard unrelated sectors included in target+2 cluster. > > Fixes: 1e49a94cf707 ("exfat: add bitmap operations") > Signed-off-by: Hyeongseok Kim > --- > fs/exfat/balloc.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Looks good.

RE: [PATCH] exfat: improve performance of exfat_free_cluster when using dirsync mount option

2021-01-06 Thread Sungjong Seo
KiB > IO unplugs:1 Timer unplugs: 0 > > Signed-off-by: Hyeongseok Kim Looks good. Thanks for your work! Acked-by: Sungjong Seo

RE: [PATCH v3] exfat: Avoid allocating upcase table using kcalloc()

2020-12-07 Thread Sungjong Seo
do_syscall_64+0x4d/0x90 > entry_SYSCALL_64_after_hwframe+0x44/0xa9 > > Convert kcalloc/kfree to their kv* variants to eliminate the issue. > > Cc: sta...@vger.kernel.org # v5.7+ > Signed-off-by: Artem Labazov <123321art...@gmail.com> Looks good. Thanks for your contri

RE: [PATCH] exfat: Avoid allocating upcase table using kcalloc()

2020-12-06 Thread Sungjong Seo
> > I have not yet received a report of the same issue. > > But I agree that this problem is likely to occur even if it is low > > probability. > > Perhaps I should clarify my setup a little bit more. > The issue can be reliably reproduced on my laptop. It has 8 GBs of RAM > (pretty common amount

RE: [PATCH] exfat: Avoid allocating upcase table using kcalloc()

2020-12-01 Thread Sungjong Seo
> The table for Unicode upcase conversion requires an order-5 allocation, > which may fail on a highly-fragmented system: > > pool-udisksd: page allocation failure: order:5, > mode:0x40dc0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), > nodemask=(null),cpuset=/,mems_allowed=0 > CPU: 4 PID: 3756880 Comm: po

RE: [PATCH 2/3] exfat: remove useless check in exfat_move_file()

2020-09-28 Thread Sungjong Seo
And as far as I understand, it seems to check once more "the cluster number" even though it comes through vfs so that it tries detecting abnormal of on-disk. Anyway, I agonized if it is really needed. In conclusion, old code could be eliminated and your patch looks reasonable. Thanks A

RE: [PATCH] exfat: remove 'rwoffset' in exfat_inode_info

2020-09-24 Thread Sungjong Seo
> On 2020/09/12 14:01, Sungjong Seo wrote: > >> Remove 'rwoffset' in exfat_inode_info and replace it with the > >> parameter(cpos) of exfat_readdir. > >> Since rwoffset of is referenced only by exfat_readdir, it is not > >> necessary a exfat_inode_

RE: [PATCH v2] exfat: remove 'rwoffset' in exfat_inode_info

2020-09-24 Thread Sungjong Seo
n the index > of dir-entry via dir_entry->entry. > > Signed-off-by: Tetsuhiro Kohada Acked-by: Sungjong Seo > --- > Changes in v2 > - 'cpos' point to the next of entry-set > - return the index of dir-entry via dir_entry->entry > - fix commit-me

RE: [PATCH 2/3] exfat: remove useless check in exfat_move_file()

2020-09-15 Thread Sungjong Seo
> In exfat_move_file(), the identity of source and target directory has been > checked by the caller. > Also, it gets stream.start_clu from file dir-entry, which is an invalid > determination. > > Signed-off-by: Tetsuhiro Kohada > --- > fs/exfat/namei.c | 5 - > 1 file changed, 5 deletions(-

RE: [PATCH 3/3] exfat: replace memcpy with structure assignment

2020-09-15 Thread Sungjong Seo
> Use structure assignment instead of memcpy. > > Signed-off-by: Tetsuhiro Kohada Acked-by: Sungjong Seo > --- > fs/exfat/dir.c | 7 ++- > fs/exfat/inode.c | 2 +- > fs/exfat/namei.c | 15 +++ > 3 files changed, 10 insertions(+), 14 deletions(-) &g

RE: [PATCH 1/3] exfat: remove useless directory scan in exfat_add_entry()

2020-09-15 Thread Sungjong Seo
> There is nothing in directory just created, so there is no need to scan. > > Signed-off-by: Tetsuhiro Kohada Acked-by: Sungjong Seo > --- > fs/exfat/namei.c | 11 +-- > 1 file changed, 1 insertion(+), 10 deletions(-) > > diff --git a/fs/exfat/namei.c

RE: [PATCH] exfat: remove 'rwoffset' in exfat_inode_info

2020-09-11 Thread Sungjong Seo
> Remove 'rwoffset' in exfat_inode_info and replace it with the > parameter(cpos) of exfat_readdir. > Since rwoffset of is referenced only by exfat_readdir, it is not > necessary a exfat_inode_info's member. > > Signed-off-by: Tetsuhiro Kohada > --- > fs/exfat/dir.c | 16 ++-- >

RE: [PATCH] exfat: eliminate dead code in exfat_find()

2020-09-03 Thread Sungjong Seo
> The exfat_find_dir_entry() called by exfat_find() doesn't return -EEXIST. > Therefore, the root-dir information setting is never executed. > > Signed-off-by: Tetsuhiro Kohada Acked-by: Sungjong Seo > --- > fs/exfat/dir.c | 1 - &g

RE: [PATCH 2/2] exfat: unify name extraction

2020-08-21 Thread Sungjong Seo
> Thanks for your reply. > > On 2020/08/09 2:19, Sungjong Seo wrote: > > [snip] > >> @@ -963,80 +942,38 @@ int exfat_find_dir_entry(struct super_block > >> *sb, struct exfat_inode_info *ei, > >>num_empty = 0; > >>

RE: [PATCH v3] exfat: remove EXFAT_SB_DIRTY flag

2020-08-08 Thread Sungjong Seo
> On 2020/06/18 22:11, Sungjong Seo wrote: > >> BTW > >> Even with this patch applied, VOL_DIRTY remains until synced in the > >> above case. > >> It's not easy to reproduce as rmdir, but I'll try to fix it in the > future. > > > &

RE: [PATCH 2/2] exfat: unify name extraction

2020-08-08 Thread Sungjong Seo
> Name extraction in exfat_find_dir_entry() also doesn't care NameLength, so > the name may be incorrect. > Replace the name extraction in exfat_find_dir_entry() with using > exfat_entry_set_cache and exfat_get_uniname_from_name_entries(), > like exfat_readdir(). > Replace the name extraction with

RE: [PATCH 1/2] exfat: add NameLength check when extracting name

2020-08-08 Thread Sungjong Seo
> The current implementation doesn't care NameLength when extracting the > name from Name dir-entries, so the name may be incorrect. > (Without null-termination, Insufficient Name dir-entry, etc) Add a > NameLength check when extracting the name from Name dir-entries to extract > correct name. > An

RE: [PATCH v3] exfat: integrates dir-entry getting and validation

2020-08-08 Thread Sungjong Seo
benign secondary' > dir-entries. > > Pre-Validated 'file' and 'stream-ext' dir-entries are provided as member > variables of exfat_entry_set_cache. > > And, rename TYPE_EXTEND to TYPE_NAME. > > Suggested-by: Sungjong Seo > Suggested-by: Namjae Jeon

RE: [RFC]PATCH] exfat: integrates dir-entry getting and validation

2020-07-12 Thread Sungjong Seo
ype-validation with simplified. > This will also recognize a dir-entry set that contains 'benign secondary' > dir-entries. > > And, rename TYPE_EXTEND to TYPE_NAME. > > Suggested-by: Sungjong Seo > Signed-off-by: Tetsuhiro Kohada > --- > fs/exfat/dir.c | 14

RE: [PATCH v2] exfat: optimize exfat_zeroed_cluster()

2020-07-02 Thread Sungjong Seo
> Replace part of exfat_zeroed_cluster() with exfat_update_bhs(). > And remove exfat_sync_bhs(). > > Signed-off-by: Tetsuhiro Kohada Reviewed-by: Sungjong Seo Looks good. Thanks. > --- > Changes in v2 > - Rebase to latest exfat-dev > &

RE: [PATCH v3] exfat: remove EXFAT_SB_DIRTY flag

2020-06-18 Thread Sungjong Seo
> > Since this patch does not resolve 'VOL_DIRTY in ENOTEMPTY' problem you > > mentioned, it would be better to remove the description above for that > > and to make new patch. > > I mentioned rmdir as an example. > However, this problem is not only with rmdirs. > VOL_DIRTY remains when some funct

[PATCH] exfat: flush dirty metadata in fsync

2020-06-18 Thread Sungjong Seo
file. Signed-off-by: Sungjong Seo --- fs/exfat/dir.c | 2 +- fs/exfat/exfat_fs.h | 1 + fs/exfat/file.c | 19 ++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c index 02acbb6ddf02..b71c540d88f2 100644 --- a/fs/exfat/dir.c

RE: [PATCH v2] exfat: call sync_filesystem for read-only remount

2020-06-17 Thread Sungjong Seo
e exfat is remounted as > read-only, exfat doesn't have a chance to commit metadata and vfs > invalidates page caches in a block device. > > Signed-off-by: Hyunchul Lee Acked-by: Sungjong Seo > --- > Changes from v1: > - Does not check the return value of sync_filesystem

RE: [PATCH v3] exfat: remove EXFAT_SB_DIRTY flag

2020-06-17 Thread Sungjong Seo
above for that and to make new patch. > Remove the EXFAT_SB_DIRTY check to ensure synchronization. > And, remove the code related to the flag. > > Signed-off-by: Tetsuhiro Kohada Reviewed-by: Sungjong Seo > --- > Changes in v2: > - exfat_sync_fs() avoids synchronous proce

RE: [PATCH v2] exfat: remove EXFAT_SB_DIRTY flag

2020-06-15 Thread Sungjong Seo
when non-empty-dir is detected, > return error without setting EXFAT_SB_DIRTY. > If performe 'sync' in this state, VOL_DIRTY will not be cleared. > > Remove the EXFAT_SB_DIRTY check to ensure synchronization. > And, remove the code related to the flag. > > Sugges

RE: [PATCH] exfat: remove EXFAT_SB_DIRTY flag

2020-06-14 Thread Sungjong Seo
> On 2020/06/12 17:34, Sungjong Seo wrote: > >> remove EXFAT_SB_DIRTY flag and related codes. > >> > >> This flag is set/reset in exfat_put_super()/exfat_sync_fs() to avoid > >> sync_blockdev(). > >> However ... > >> - exfat_put_supe

RE: [PATCH] exfat: remove EXFAT_SB_DIRTY flag

2020-06-12 Thread Sungjong Seo
> remove EXFAT_SB_DIRTY flag and related codes. > > This flag is set/reset in exfat_put_super()/exfat_sync_fs() to avoid > sync_blockdev(). > However ... > - exfat_put_super(): > Before calling this, the VFS has already called sync_filesystem(), so sync > is never performed here. > - exfat_sync_fs

RE: [PATCH 3/4 v4] exfat: add boot region verification

2020-06-01 Thread Sungjong Seo
> 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 Reviewed-by: Sungjong Seo > ---

RE: [PATCH 4/4 v3] exfat: standardize checksum calculation

2020-06-01 Thread Sungjong Seo
> 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 Reviewe

RE: [PATCH 2/4 v3] exfat: separate the boot sector analysis

2020-06-01 Thread Sungjong Seo
> Separate the boot sector analysis to read_boot_sector(). > And add a check for the fs_name field. > Furthermore, add a strict consistency check, because overlapping areas can > cause serious corruption. > > Signed-off-by: Tetsuhiro Kohada Reviewed-by: Sungjong Seo >

RE: [PATCH 1/4 v3] exfat: redefine PBR as boot_sector

2020-06-01 Thread Sungjong Seo
> Aggregate PBR related definitions and redefine as "boot_sector" to comply > with the exFAT specification. > And, rename variable names including 'pbr'. > > Signed-off-by: Tetsuhiro Kohada Reviewed-by: Sungjong Seo > --- > Changes in v2: > - re

RE: [PATCH] exfat: optimize dir-cache

2020-06-01 Thread Sungjong Seo
initions. > > Signed-off-by: Tetsuhiro Kohada > Reviewed-by: Sungjong Seo > --- > fs/exfat/dir.c | 197 +--- > fs/exfat/exfat_fs.h | 27 +++--- > fs/exfat/file.c | 15 ++-- > fs/exfat/inode.c| 53 +--- > f

RE: [PATCH 1/4] exfat: redefine PBR as boot_sector

2020-05-28 Thread Sungjong Seo
> > [snip] > >> +/* EXFAT: Main and Backup Boot Sector (512 bytes) */ struct > >> +boot_sector { > >> + __u8jmp_boot[BOOTSEC_JUMP_BOOT_LEN]; > >> + __u8oem_name[BOOTSEC_OEM_NAME_LEN]; > > > > According to the exFAT specification, fs_name and BOOTSEC_FS_NAME_LEN > > look better. > > Oops.

RE: [PATCH 1/4] exfat: redefine PBR as boot_sector

2020-05-27 Thread Sungjong Seo
> Aggregate PBR related definitions and redefine as "boot_sector" to comply > with the exFAT specification. > And, rename variable names including 'pbr'. > > Signed-off-by: Tetsuhiro Kohada > --- > fs/exfat/exfat_fs.h | 2 +- > fs/exfat/exfat_raw.h | 79 +++-

RE: [PATCH] exfat: optimize dir-cache

2020-05-27 Thread Sungjong Seo
> 2020-05-27 17:00 GMT+09:00, > kohada.tetsuh...@dc.mitsubishielectric.co.jp > : > > Thank you for your comment. > > > > >> +for (i = 0; i < es->num_bh; i++) { > > >> +if (es->modified) > > >> +exfat_update_bh(es->sb, es->bh[i], sync); > > > > > > Overall, i

RE: [PATCH] exfat: optimize dir-cache

2020-05-25 Thread Sungjong Seo
> Optimize directory access based on exfat_entry_set_cache. > - Hold bh instead of copied d-entry. > - Modify bh->data directly instead of the copied d-entry. > - Write back the retained bh instead of rescanning the d-entry-set. > And > - Remove unused cache related definitions. > > Signed-off