From 72d95a4563149dfda0502ef28f06c7f7f972bd75 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 1 Apr 2025 16:51:24 +0100 Subject: [PATCH] file: Document implicit assumption about eviction windows Add a comment that slots in the window list are only valid when len > 0. This was true before but only implicit. (cherry picked from commit 2022ac667f3c1de81b692f0128dd83a7c4999e38) --- plugins/file/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/file/file.c b/plugins/file/file.c index d1e91203..b8470c20 100644 --- a/plugins/file/file.c +++ b/plugins/file/file.c @@ -112,7 +112,7 @@ static enum { cache_default, cache_none } cache_mode = cache_default; struct write_window { int fd; uint64_t offset; - size_t len; + size_t len; /* window slot only valid if len > 0 */ }; static pthread_mutex_t window_lock = PTHREAD_MUTEX_INITIALIZER; -- 2.47.1