[DGD] Disk space economy: swap sector size patch

Raymond Jennings shentino at gmail.com
Sun May 26 22:55:51 CEST 2013


This won't be going into the mainline at the moment, because there are
tricky tradeoffs involved, but those of you for whom disk space is at a
premium or just like to be compact, the following patch will lower the
sector size minimum from 512 bytes to 128 bytes, the lowest power of two
that is safe.

Bear in mind that 512 is usually the minimum block size for I/O to and from
disk and going much below that will cause additional overhead.  Whether the
disk savings are worth it should be decided on a case by case basis.

----

diff --git a/src/config.c b/src/config.c
index 690bf86..51c40ae 100644
--- a/src/config.c
+++ b/src/config.c
@@ -102,7 +102,7 @@ static config conf[] = {
                                                        1, 32 },
 # define SECTOR_SIZE   19
                                { "sector_size",        INT_CONST, FALSE,
FALSE,
-                                                       512, 65535 },
+                                                       128, 65535 },
 # define STATIC_CHUNK  20
                                { "static_chunk",       INT_CONST },
 # define SWAP_FILE     21



More information about the DGD mailing list