Since v1: - rework .can_cache to be tri-state, with default of no advertisement (ripple effect through other patches) - add a lot more patches in order to round out filter support And in the meantime, Rich pushed NBD_CMD_CACHE support into libnbd, so in theory we now have a way to test cache commands through the entire stack. Eric Blake (24): server: Internal hooks for implementing NBD_CMD_CACHE plugins: Add .cache callback file, split: Implement .cache with posix_fadvise plugins: Implement .pread emulation cache plugins: Implement no-op .cache for in-memory plugins nbd: Implement NBD_CMD_CACHE passthrough sh: Implement .cache script callback ocaml: Implement .cache script callback plugins: Document lack of .cache in language bindings filters: Add .cache callback test-layers: Test .cache usage test-eflags: Test .can_cache support blocksize: Implement .cache rounding cache: Implement .cache cow: Implement .cache delay: Implement .cache error: Implement .cache log: Implement .cache offset, partition: Implement .cache readahead, xz: Implement .can_cache via emulation stats: Implement .cache truncate: Implement .cache filters: Pass through .can_cache for remaining filters nocache: Implement new filter docs/nbdkit-filter.pod | 42 +++++-- docs/nbdkit-plugin.pod | 82 +++++++++++++ docs/nbdkit-protocol.pod | 8 ++ filters/cache/nbdkit-cache-filter.pod | 6 +- filters/cow/nbdkit-cow-filter.pod | 15 ++- filters/delay/nbdkit-delay-filter.pod | 9 +- filters/error/nbdkit-error-filter.pod | 8 +- filters/fua/nbdkit-fua-filter.pod | 5 +- filters/log/nbdkit-log-filter.pod | 10 +- filters/nocache/nbdkit-nocache-filter.pod | 69 +++++++++++ filters/noextents/nbdkit-noextents-filter.pod | 2 + filters/nozero/nbdkit-nozero-filter.pod | 2 + plugins/lua/nbdkit-lua-plugin.pod | 3 +- plugins/perl/nbdkit-perl-plugin.pod | 2 +- plugins/python/nbdkit-python-plugin.pod | 2 +- plugins/ruby/nbdkit-ruby-plugin.pod | 2 +- plugins/sh/nbdkit-sh-plugin.pod | 27 ++++- plugins/tcl/nbdkit-tcl-plugin.pod | 3 +- configure.ac | 5 +- common/protocol/protocol.h | 2 + filters/cache/blk.h | 10 +- filters/cow/blk.h | 16 ++- include/nbdkit-common.h | 4 + include/nbdkit-filter.h | 8 ++ include/nbdkit-plugin.h | 2 + server/internal.h | 5 + filters/blocksize/blocksize.c | 29 +++++ filters/cache/blk.c | 50 +++++++- filters/cache/cache.c | 53 ++++++++ filters/cow/blk.c | 41 ++++++- filters/cow/cow.c | 90 ++++++++++++++ filters/delay/delay.c | 27 ++++- filters/error/error.c | 32 ++++- filters/log/log.c | 29 ++++- filters/nocache/nocache.c | 113 ++++++++++++++++++ filters/offset/offset.c | 12 +- filters/partition/partition.c | 12 ++ filters/readahead/readahead.c | 13 ++ filters/stats/stats.c | 23 ++++ filters/truncate/truncate.c | 24 ++++ filters/xz/xz.c | 15 ++- plugins/data/data.c | 11 ++ plugins/ext2/ext2.c | 10 +- plugins/file/file.c | 37 ++++++ plugins/floppy/floppy.c | 11 +- plugins/full/full.c | 13 +- plugins/iso/iso.c | 10 +- plugins/linuxdisk/linuxdisk.c | 9 ++ plugins/memory/memory.c | 11 ++ plugins/nbd/nbd.c | 24 ++++ plugins/null/null.c | 13 +- plugins/ocaml/ocaml.c | 51 ++++++++ plugins/partitioning/partitioning.c | 11 +- plugins/pattern/pattern.c | 13 +- plugins/random/random.c | 13 +- plugins/sh/sh.c | 81 +++++++++++++ plugins/split/split.c | 52 +++++++- plugins/zero/zero.c | 13 +- server/filters.c | 59 ++++++++- server/plugins.c | 44 +++++++ server/protocol-handshake.c | 9 ++ server/protocol.c | 26 ++++ tests/test-layers-filter.c | 22 +++- tests/test-layers-plugin.c | 17 +++ tests/test-layers.c | 36 ++++++ filters/nocache/Makefile.am | 61 ++++++++++ plugins/ocaml/NBDKit.ml | 16 ++- plugins/ocaml/NBDKit.mli | 5 + plugins/sh/example.sh | 7 ++ tests/test-eflags.sh | 36 +++++- 70 files changed, 1570 insertions(+), 63 deletions(-) create mode 100644 filters/nocache/nbdkit-nocache-filter.pod create mode 100644 filters/nocache/nocache.c create mode 100644 filters/nocache/Makefile.am -- 2.20.1