lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250613062339.27763-1-cixi.geng@linux.dev>
Date: Fri, 13 Jun 2025 14:23:39 +0800
From: Cixi Geng <cixi.geng@...ux.dev>
To: linkinjeon@...nel.org,
	sj1557.seo@...sung.com
Cc: yuezhang.mo@...y.com,
	linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	zhengxu.zhang@...soc.com
Subject: [PATCH] exfat: fdatasync flag should be same like generic_write_sync()

From: Zhengxu Zhang <zhengxu.zhang@...soc.com>

Test: androbench by default setting, use 64GB sdcard.
 the random write speed:
	without this patch 3.5MB/s
	with this patch 7MB/s

After patch "11a347fb6cef", the random write speed decreased significantly.
the .write_iter() interface had been modified, and check the differences with
generic_file_write_iter(), when calling generic_rite_sync() and
exfat_file_write_iter() to call vfs_fsync_range(), the fdatasync flag is wrong,
and make not use the fdatasync mode, and make random write speed decreased.

so make the fdatasync flag like generic_write_sync().

Fixes: 11a347fb6cef ("exfat: change to get file size from DataLength")

Signed-off-by: Zhengxu Zhang <zhengxu.zhang@...soc.com>
---
 fs/exfat/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/exfat/file.c b/fs/exfat/file.c
index 841a5b18e3df..01d983fa7f55 100644
--- a/fs/exfat/file.c
+++ b/fs/exfat/file.c
@@ -625,7 +625,7 @@ static ssize_t exfat_file_write_iter(struct kiocb *iocb, struct iov_iter *iter)
 
 	if (iocb_is_dsync(iocb) && iocb->ki_pos > pos) {
 		ssize_t err = vfs_fsync_range(file, pos, iocb->ki_pos - 1,
-				iocb->ki_flags & IOCB_SYNC);
+				(iocb->ki_flags & IOCB_SYNC) ? 0 : 1);
 		if (err < 0)
 			return err;
 	}
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ