Package: lizardfs / 3.12.0+dfsg-3

default-sparse.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Last-Update: 2016-03-12
Forwarded: not-needed
Author: Dmitry Smirnov <onlyjob@member.fsf.org>
Description: sparse chunk files by default

--- a/doc/mfschunkserver.cfg.5.txt
+++ b/doc/mfschunkserver.cfg.5.txt
@@ -85,8 +85,9 @@
 *HDD_PUNCH_HOLES*::
 if enabled then chunkserver detects zero values in chunk data and frees
 corresponding file blocks (decreasing file system usage). This option works only on Linux
 with file systems supporting punching holes (XFS, ext4, Btrfs, tmpfs)
+(default is 1, i.e. yes)
 
 *ENABLE_LOAD_FACTOR*::
 if enabled, chunkserver will send periodical reports of its I/O load to master,
 which will be taken into consideration when picking chunkservers for I/O operations.
--- a/src/chunkserver/hddspacemgr.cc
+++ b/src/chunkserver/hddspacemgr.cc
@@ -3738,9 +3738,9 @@
 	PerformFsync = cfg_getuint32("PERFORM_FSYNC", 1);
 
 	HDDTestFreq_ms = cfg_ranged_get("HDD_TEST_FREQ", 10., 0.001, 1000000.) * 1000;
 
-	gPunchHolesInFiles = cfg_getuint32("HDD_PUNCH_HOLES", 0);
+	gPunchHolesInFiles = cfg_getuint32("HDD_PUNCH_HOLES", 1);
 
 	hdd_int_set_chunk_format();
 	char *LeaveFreeStr = cfg_getstr("HDD_LEAVE_SPACE_DEFAULT", gLeaveSpaceDefaultDefaultStrValue);
 	if (hdd_size_parse(LeaveFreeStr,&gLeaveFree)<0) {
@@ -3827,9 +3827,9 @@
 
 	gAdviseNoCache = cfg_getuint32("HDD_ADVISE_NO_CACHE", 1);
 	HDDTestFreq_ms = cfg_ranged_get("HDD_TEST_FREQ", 10., 0.001, 1000000.) * 1000;
 
-	gPunchHolesInFiles = cfg_getuint32("HDD_PUNCH_HOLES", 0);
+	gPunchHolesInFiles = cfg_getuint32("HDD_PUNCH_HOLES", 1);
 
 	MooseFSChunkFormat = true;
 	hdd_int_set_chunk_format();
 	eventloop_reloadregister(hdd_reload);
--- a/src/data/mfschunkserver.cfg.in
+++ b/src/data/mfschunkserver.cfg.in
@@ -78,9 +78,9 @@
 ## If enabled then chunkserver detects zero values in chunk data and frees
 ## corresponding file blocks (decreasing file system usage).
 ## This option works only on Linux
 ## with file systems supporting punching holes (XFS, ext4, Btrfs, tmpfs).
-## (Default : 0)
+## (Default : 1)
 # HDD_PUNCH_HOLES = 1
 
 ## If enabled, chunkserver will send periodical reports of its I/O load to master,
 ## which will be taken into consideration when picking chunkservers for I/O operations.