xref: /OK3568_Linux_fs/buildroot/package/ntfs-3g/0002-Enable-big-writes-by-default.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From 827f55d8bc7ee9f7a6f617b0914ac1370cfaa3b8 Mon Sep 17 00:00:00 2001
2From: Jeffy Chen <jeffy.chen@rock-chips.com>
3Date: Fri, 17 Jun 2022 14:57:19 +0800
4Subject: [PATCH 2/2] Enable big-writes by default
5
6See:
7https://www.tuxera.com/company/open-source/#slow
8
9Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
10---
11 src/ntfs-3g_common.c | 5 ++++-
12 1 file changed, 4 insertions(+), 1 deletion(-)
13
14diff --git a/src/ntfs-3g_common.c b/src/ntfs-3g_common.c
15index 29021df..b68716d 100644
16--- a/src/ntfs-3g_common.c
17+++ b/src/ntfs-3g_common.c
18@@ -259,7 +259,10 @@ char *parse_mount_options(ntfs_fuse_context_t *ctx,
19 		ntfs_log_perror("%s: strdup failed", EXEC_NAME);
20 		return NULL;
21 	}
22-
23+
24+	if (!getenv("NTFS_3G_NO_BIG_WRITES"))
25+		ctx->big_writes = TRUE;
26+
27 	s = options;
28 	while (s && *s && (val = strsep(&s, ","))) {
29 		opt = strsep(&val, "=");
30--
312.20.1
32
33