Displaying 2 results from an estimated 2 matches for "028eedb".
[PATCH nbdkit v4 2/2] cache: Implement cache-max-size and method of reclaiming space from the cache.
2019 Jan 03
0
[PATCH nbdkit v4 2/2] cache: Implement cache-max-size and method of reclaiming space from the cache.
...* Do we support reclaiming cache blocks? */
+#ifdef FALLOC_FL_PUNCH_HOLE
+#define HAVE_CACHE_RECLAIM 1
+#else
+#undef HAVE_CACHE_RECLAIM
+#endif
+
+extern void reclaim (int fd, struct bitmap *bm);
+
+#endif /* NBDKIT_RECLAIM_H */
diff --git a/filters/cache/blk.c b/filters/cache/blk.c
index b256446..028eedb 100644
--- a/filters/cache/blk.c
+++ b/filters/cache/blk.c
@@ -54,6 +54,7 @@
#include "cache.h"
#include "blk.h"
#include "lru.h"
+#include "reclaim.h"
/* The cache. */
static int fd = -1;
@@ -69,7 +70,7 @@ static int fd = -1;
static struct bitmap bm;...
2019 Jan 03
4
[PATCH nbdkit v4 0/2] cache: Implement cache-max-size and method of
v3 was broken by a bad rebase, so let's forget about that one.
Compared to v2:
- Patch 1 is the same except for a minor comment change.
- Patch 2 splits the reclaim code into a separate file
(filters/cache/reclaim.c)
- Addressed Eric's comments from his review of v2.
- Retested on Linux and FreeBSD.