diff options
author | Simon Rettberg | 2017-09-02 18:03:15 +0200 |
---|---|---|
committer | Simon Rettberg | 2017-09-02 18:03:15 +0200 |
commit | 9858ab5bbb2fc5d1569257c0ee8f794fdae1c512 (patch) | |
tree | 7bb448cc73f852f5ed0f258daf8c9280755bb52d /src/server/image.h | |
parent | [*] Continue splitting #defines to clientconfig.h etc. (diff) | |
download | dnbd3-9858ab5bbb2fc5d1569257c0ee8f794fdae1c512.tar.gz dnbd3-9858ab5bbb2fc5d1569257c0ee8f794fdae1c512.tar.xz dnbd3-9858ab5bbb2fc5d1569257c0ee8f794fdae1c512.zip |
[SERVER] Implement closeUnusedFd config option
This will close the readFd of images that have no active clients
after some idle period (1 hour currently).
Prevents deleted images from taking up space until the server
is shut down.
Diffstat (limited to 'src/server/image.h')
-rw-r--r-- | src/server/image.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/image.h b/src/server/image.h index d129984..40a6375 100644 --- a/src/server/image.h +++ b/src/server/image.h @@ -43,6 +43,8 @@ json_t* image_getListAsJson(); int image_getCompletenessEstimate(dnbd3_image_t * const image); +void image_closeUnusedFd(); + // 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 |