summaryrefslogtreecommitdiffstats
path: root/src/server/globals.h
diff options
context:
space:
mode:
authorSimon Rettberg2015-12-10 16:15:21 +0100
committerSimon Rettberg2015-12-10 16:15:21 +0100
commit6d6455b271ac99c5862691620e1217ed7b3b78b4 (patch)
tree685312fb9a92b70778c8e128f1b1a86c569828cb /src/server/globals.h
parent[FUSE] Make valgrind happy by initializing memory and not calling close() on -1 (diff)
downloaddnbd3-6d6455b271ac99c5862691620e1217ed7b3b78b4.tar.gz
dnbd3-6d6455b271ac99c5862691620e1217ed7b3b78b4.tar.xz
dnbd3-6d6455b271ac99c5862691620e1217ed7b3b78b4.zip
[SERVER] Nullpad images virtually at runtime instead of padding the actual file
Diffstat (limited to 'src/server/globals.h')
-rw-r--r--src/server/globals.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/globals.h b/src/server/globals.h
index 9024a46..837fc2a 100644
--- a/src/server/globals.h
+++ b/src/server/globals.h
@@ -103,7 +103,8 @@ struct _dnbd3_image
uint32_t *crc32; // list of crc32 checksums for each 16MiB block in image
uint32_t masterCrc32; // CRC-32 of the crc-32 list
dnbd3_connection_t *uplink; // pointer to a server connection
- uint64_t filesize; // size of image
+ uint64_t virtualFilesize; // virtual size of image (real size rounded up to multiple of 4k)
+ uint64_t realFilesize; // actual file size on disk
int readFd; // used to read the image. Used from multiple threads, so use atomic operations (pread et al)
int cacheFd; // used to write to the image, in case it is relayed. ONLY USE FROM UPLINK THREAD!
int rid; // revision of image