search for: 580e4f5

Displaying 3 results from an estimated 3 matches for "580e4f5".

Did you mean: 58045
2018 Dec 28
0
[PATCH nbdkit 5/9] cache: Allow this filter to serve requests in parallel.
...--------------- + * ** NOTE ** + * + * An exclusive lock must be held when you call any function below + * this line. + */ + /* Allocate or resize the cache file and bitmap. */ extern int blk_set_size (uint64_t new_size); diff --git a/filters/cache/cache.c b/filters/cache/cache.c index 0d006bc..580e4f5 100644 --- a/filters/cache/cache.c +++ b/filters/cache/cache.c @@ -46,6 +46,8 @@ #include <sys/ioctl.h> #include <assert.h> +#include <pthread.h> + #ifdef HAVE_ALLOCA_H #include <alloca.h> #endif @@ -55,8 +57,12 @@ #include "cache.h" #include "blk.h&q...
2018 Dec 28
0
[PATCH nbdkit 9/9] cache: Implement cache-max-size and method of reclaiming space from the cache.
...implementation for punching holes" +#endif + + bitmap_set_blk (&bm, reclaim_blk, BLOCK_NOT_CACHED); +} + +#else /* !HAVE_CACHE_RECLAIM */ +static void +reclaim (void) +{ + /* nothing */ +} +#endif /* !HAVE_CACHE_RECLAIM */ diff --git a/filters/cache/cache.c b/filters/cache/cache.c index 580e4f5..5ea7b6a 100644 --- a/filters/cache/cache.c +++ b/filters/cache/cache.c @@ -65,6 +65,8 @@ static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; enum cache_mode cache_mode = CACHE_MODE_WRITEBACK; +int64_t max_size = -1; +int hi_thresh = 95, lo_thresh = 80; bool cache_on_read = false; stat...
2018 Dec 28
12
[PATCH nbdkit 0/9] cache: Implement cache-max-size and method of reclaiming space from the cache.
This patch series enhances the cache filter in a few ways, primarily adding a "cache-on-read" feature (similar to qemu's copyonread); and adding the ability to limit the cache size and the antecedent of that which is having a method to reclaim cache blocks. As the cache is stored as a sparse temporary file, reclaiming cache blocks simply means punching holes in the temporary file.