backend: Implement next_ops->reopen call.
commitfb72fcd1d8dff02a02e4c473ff09c813bef09b65
authorRichard W.M. Jones <rjones@redhat.com>
Thu, 19 Sep 2019 09:30:36 +0000 (19 10:30 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 19 Sep 2019 21:11:13 +0000 (19 22:11 +0100)
tree146b5e5a9b727ff319e78c874cf39b5747fb8c2d
parentcfbbe17ee21a9a47a96a5ac7f4321d20ed90cad9
backend: Implement next_ops->reopen call.

This is intended for use by the forthcoming retry filter to close and
reopen the backend chain.  It is handled entirely by server/backend.c
as no cooperation is needed with the plugin.

Note the explicit readonly parameter: An alternative would be to store
the previous readonly setting in the b_conn_handle struct.  However
passing it explicitly allows the retry filter to retry as readonly,
which might be useful.  This design does however require any filter
which might call .reopen to save the original readonly parameter from
the .open call.
docs/nbdkit-filter.pod
include/nbdkit-filter.h
server/backend.c
server/filters.c
server/internal.h