From 9858ab5bbb2fc5d1569257c0ee8f794fdae1c512 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Sat, 2 Sep 2017 18:03:15 +0200 Subject: [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. --- src/server/image.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/server/image.h') 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 -- cgit v1.2.3-55-g7522