summaryrefslogtreecommitdiffstats
path: root/src/server/helper.h
diff options
context:
space:
mode:
authorsr2013-07-25 23:44:18 +0200
committersr2013-07-25 23:44:18 +0200
commitc4d2c6c6753fd2c41c3db1877c5c46613dc45510 (patch)
treeda8fabd3a41935ab8650500d217c6555887a3da1 /src/server/helper.h
parent...Working on proxy mode... (diff)
downloaddnbd3-c4d2c6c6753fd2c41c3db1877c5c46613dc45510.tar.gz
dnbd3-c4d2c6c6753fd2c41c3db1877c5c46613dc45510.tar.xz
dnbd3-c4d2c6c6753fd2c41c3db1877c5c46613dc45510.zip
Work in progress: uplink
Diffstat (limited to 'src/server/helper.h')
-rw-r--r--src/server/helper.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/server/helper.h b/src/server/helper.h
index a9a8e79..daa6695 100644
--- a/src/server/helper.h
+++ b/src/server/helper.h
@@ -92,17 +92,4 @@ static inline int strend(char *string, char *suffix)
return strcmp(string + len1 - len2, suffix) == 0;
}
-// one byte in the map covers 8 4kib blocks, so 32kib per byte
-// "+ (1 << 15) - 1" is required to account for the last bit of
-// the image that is smaller than 32kib
-// this would be the case whenever the image file size is not a
-// multiple of 32kib (= the number of blocks is not divisible by 8)
-// ie: if the image is 49152 bytes and you do 49152 >> 15 you get 1,
-// but you actually need 2 bytes to have a complete cache map
-#define IMGSIZE_TO_MAPBYTES(bytes) ((int)(((bytes) + (1 << 15) - 1) >> 15))
-
-// calculate number of hash blocks in file. One hash block is 16MiB
-#define HASH_BLOCK_SIZE ((int64_t)(1 << 24))
-#define IMGSIZE_TO_HASHBLOCKS(bytes) ((int)(((bytes) + HASH_BLOCK_SIZE - 1) / HASH_BLOCK_SIZE))
-
#endif