[PATCH] exfat: change i_pos based exfat hash to rb tree

2021-03-28 Thread Hyeongseok Kim
0m31.69s | ++++---+ | After |300,000 | 0m33.11s | 0m06.21s | ++++---+ Signed-off-by: Hyeongseok Kim --- fs/exfat/exfat_fs.h | 12 +++--- fs/exfat/inode.c| 91 +++-- fs/exfat/namei

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

2021-03-21 Thread Hyeongseok Kim
ser 0m05.91s system After : 0m07.01s real 0m00.25s user 0m04.34s system Signed-off-by: Hyeongseok Kim --- fs/exfat/dir.c | 19 +-- fs/exfat/exfat_fs.h | 2 +- fs/exfat/namei.c| 9 - 3 files changed, 22 insertions(+), 8 deletions(-) diff --gi

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

2021-03-21 Thread Hyeongseok Kim
/dev/null", 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 --- fs/exfat/dir.c | 39 --- fs/exfat/exfat_fs.h | 2 +- fs/exfat/namei.c| 6 -

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

2021-03-17 Thread Hyeongseok Kim
ser 0m05.91s system After : 0m07.01s real 0m00.25s user 0m04.34s system Signed-off-by: Hyeongseok Kim --- fs/exfat/dir.c | 39 --- fs/exfat/exfat_fs.h | 2 +- fs/exfat/namei.c| 6 -- 3 files changed, 37 insertions(+), 10 deleti

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

2021-03-17 Thread Hyeongseok Kim
On 3/18/21 1:07 AM, Sungjong Seo wrote: /* - * return values: - * >= 0 : return dir entiry position with the name in dir - * -ENOENT : entry with the name does not exist - * -EIO : I/O error + * @ei: inode info of directory + * @p_dir: input as directory structure in

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

2021-03-14 Thread Hyeongseok Kim
0m07.01s real 0m00.25s user 0m04.34s system Signed-off-by: Hyeongseok Kim --- fs/exfat/dir.c | 42 +- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c index e1d5536de948..59d12eaa0649 100644 --

[PATCH] exfat: improve write performance when dirsync enabled

2021-03-14 Thread Hyeongseok Kim
Degradation of write speed caused by frequent disk access for cluster bitmap update on every cluster allocation could be improved by selective syncing bitmap buffer. Change to flush bitmap buffer only for the directory related operations. Signed-off-by: Hyeongseok Kim --- fs/exfat/balloc.c

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

2021-03-02 Thread Hyeongseok Kim
cluster size which 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. Acked-by: Su

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

2021-03-02 Thread Hyeongseok Kim
, remove the wrong comments in set/clear/find bitmap functions. Fixes: 1e49a94cf707 ("exfat: add bitmap operations") Signed-off-by: Hyeongseok Kim Acked-by: Sungjong Seo --- fs/exfat/balloc.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/fs/exfat/

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

2021-03-02 Thread Hyeongseok Kim
Add FITRIM ioctl to enable discarding unused blocks while mounted. As current exFAT doesn't have generic ioctl handler, add empty ioctl function first, and add FITRIM handler. Reviewed-by: Chaitanya Kulkarni Signed-off-by: Hyeongseok Kim --- fs/exfat/balloc.c

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

2021-03-02 Thread Hyeongseok Kim
s_lock which is for protecting concurrent access of file operations is too huge for cluster bitmap protection, so introduce a new bitmap_lock to narrow the lock range if only need to access cluster bitmap. Signed-off-by: Hyeongseok Kim --- fs/exfat/exfat_fs.h | 1 + fs/exfat/fatent.c | 37

[PATCH v4 0/2] Add FITRIM ioctl support for exFAT filesystem

2021-03-02 Thread Hyeongseok Kim
- Change variable declaration order as reverse tree style. - Return -EOPNOTSUPP from sb_issue_discard() just as it is. - Remove cond_resched() in while loop. - Move ioctl related code into it's helper function. Hyeongseok Kim (2): exfat: introduce bitmap_lock for cluster bitmap access exfa

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

2021-02-25 Thread Hyeongseok Kim
("exfat: add bitmap operations") Signed-off-by: Hyeongseok Kim --- fs/exfat/balloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/exfat/balloc.c b/fs/exfat/balloc.c index 761c79c3a4ba..41a1dfd9d98a 100644 --- a/fs/exfat/balloc.c +++ b/fs/exfat/balloc.c @@ -18

Re: [PATCH v2 1/2] exfat: add initial ioctl function

2021-02-16 Thread Hyeongseok Kim
On 2/17/21 2:39 PM, Namjae Jeon wrote: Hi Hyeongseok, Do you have any other opinion about this? I also think this patch should be combined with the 2/2 patch. If you agree, I'll merge these as one. Yep, Agreed. Please do that:) Thanks! Thank you for the opinion. I sent out v3.

[PATCH v3 0/1] Add FITRIM ioctl support for exFAT filesystem

2021-02-16 Thread Hyeongseok Kim
style. - Return -EOPNOTSUPP from sb_issue_discard() just as it is. - Remove cond_resched() in while loop. - Move ioctl related code into it's helper function. Hyeongseok Kim (1): exfat: add support ioctl and FITRIM function fs/exfat/balloc.c | 81 ++

[PATCH v3 1/1] exfat: add support ioctl and FITRIM function

2021-02-16 Thread Hyeongseok Kim
Add FITRIM ioctl to enable discarding unused blocks while mounted. As current exFAT doesn't have generic ioctl handler, add empty ioctl function first, and add FITRIM handler. Signed-off-by: Hyeongseok Kim --- fs/exfat/balloc.c | 81 + fs/

Re: [PATCH v2 1/2] exfat: add initial ioctl function

2021-02-16 Thread Hyeongseok Kim
On 2/17/21 9:17 AM, Chaitanya Kulkarni wrote: On 2/16/21 16:13, Hyeongseok Kim wrote: Sorry, I don't understand exactly. You're saying that these 2 patch should be merged to a single patch? Would it be better? I think so unless there is a specific reason for this to keep it isol

Re: [PATCH v2 2/2] exfat: add support FITRIM ioctl

2021-02-16 Thread Hyeongseok Kim
On 2/17/21 8:56 AM, Chaitanya Kulkarni wrote: On 2/16/21 14:36, Hyeongseok Kim wrote: +static int exfat_ioctl_fitrim(struct inode *inode, unsigned long arg) +{ + struct super_block *sb = inode->i_sb; Do you really need sb variable ? it is only used once if I'm not wrong.

Re: [PATCH v2 1/2] exfat: add initial ioctl function

2021-02-16 Thread Hyeongseok Kim
On 2/17/21 8:51 AM, Chaitanya Kulkarni wrote: On 2/16/21 14:36, Hyeongseok Kim wrote: Initialize empty ioctl function Signed-off-by: Hyeongseok Kim This patch doesn't do much, but this commit log could be better. Sorry, I don't understand exactly. You're saying that these 2

[PATCH v2 2/2] exfat: add support FITRIM ioctl

2021-02-16 Thread Hyeongseok Kim
add FITRIM ioctl to support trimming mounted filesystem Signed-off-by: Hyeongseok Kim --- fs/exfat/balloc.c | 81 + fs/exfat/exfat_fs.h | 1 + fs/exfat/file.c | 33 ++ 3 files changed, 115 insertions(+) diff --git a/fs/exfat

[PATCH v2 1/2] exfat: add initial ioctl function

2021-02-16 Thread Hyeongseok Kim
Initialize empty ioctl function Signed-off-by: Hyeongseok Kim --- fs/exfat/dir.c | 5 + fs/exfat/exfat_fs.h | 3 +++ fs/exfat/file.c | 21 + 3 files changed, 29 insertions(+) diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c index 916797077aad..e1d5536de948 100644

[PATCH v2 0/2] Add FITRIM ioctl support for exFAT filesystem

2021-02-16 Thread Hyeongseok Kim
hed() in while loop. - Move ioctl related code into it's helper function. Hyeongseok Kim (2): exfat: add initial ioctl function exfat: add support FITRIM ioctl fs/exfat/balloc.c | 81 + fs/exfat/dir.c | 5 +++ fs/exfat/exfat_fs.h | 4

Re: [PATCH 2/2] exfat: add support FITRIM ioctl

2021-02-15 Thread Hyeongseok Kim
Hi Chaitanya, Thank you for the review. On 2/16/21 4:33 AM, Chaitanya Kulkarni wrote: On 2/14/21 20:28, Hyeongseok Kim wrote: + +int exfat_trim_fs(struct inode *inode, struct fstrim_range *range) +{ + struct super_block *sb = inode->i_sb; Reverse tree style for function varia

[PATCH 2/2] exfat: add support FITRIM ioctl

2021-02-14 Thread Hyeongseok Kim
add FITRIM ioctl to support trimming mounted filesystem Signed-off-by: Hyeongseok Kim --- fs/exfat/balloc.c | 89 + fs/exfat/exfat_fs.h | 1 + fs/exfat/file.c | 33 + 3 files changed, 123 insertions(+) diff --git a/fs/exfat

[PATCH 1/2] exfat: add initial ioctl function

2021-02-14 Thread Hyeongseok Kim
Initialize empty ioctl function Signed-off-by: Hyeongseok Kim --- fs/exfat/dir.c | 5 + fs/exfat/exfat_fs.h | 3 +++ fs/exfat/file.c | 21 + 3 files changed, 29 insertions(+) diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c index 916797077aad..e1d5536de948 100644

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

2021-01-31 Thread Hyeongseok Kim
:0Writes Requeued:0 Reads Completed: 0,0KiB Writes Completed: 13,6KiB Read Merges: 0,0KiB Write Merges: 0,0KiB IO unplugs:1Timer unplugs: 0 Signed-off-by: Hyeongseok Kim --- fs

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

2021-01-05 Thread Hyeongseok Kim
Signed-off-by: Hyeongseok Kim --- fs/exfat/balloc.c | 4 ++-- fs/exfat/exfat_fs.h | 2 +- fs/exfat/fatent.c | 42 -- 3 files changed, 39 insertions(+), 9 deletions(-) diff --git a/fs/exfat/balloc.c b/fs/exfat/balloc.c index a987919686c0

[PATCH] exfat: fix wrong size update of stream entry by typo

2020-07-08 Thread Hyeongseok Kim
The stream.size field is updated to the value of create timestamp of the file entry. Fix this to use correct stream entry pointer. Fixes: 29bbb14bfc80 ("exfat: fix incorrect update of stream entry in __exfat_truncate()") Signed-off-by: Hyeongseok Kim --- fs/exfat/file.c | 2 +- 1 fi