While working on adding assertions to pthread_mutex_lock calls, I noticed that the truncate filter's use of mutex didn't really protect us, and isn't really necessary. Cleaning that up also spotted a couple of other potential cleanups. Eric Blake (4): filters: Drop useless .open callbacks truncate: Fix corruption when plugin changes per-connection size truncate: Test for safe multi-connect size handling doc: More details on (lack of) dynamic sizing docs/nbdkit-plugin.pod | 9 ++ filters/cache/cache.c | 10 --- filters/error/error.c | 10 --- filters/truncate/truncate.c | 162 +++++++++++++++++++----------------- tests/Makefile.am | 2 + tests/test-truncate4.sh | 85 +++++++++++++++++++ 6 files changed, 183 insertions(+), 95 deletions(-) create mode 100755 tests/test-truncate4.sh -- 2.20.1