=head1 NAME

nbdkit-openonce-filter - open the underlying plugin once

=head1 SYNOPSIS

 nbdkit --filter=openonce PLUGIN

=head1 DESCRIPTION

C<nbdkit-openonce-filter> is a filter for L<nbdkit(1)> that opens the
underlying plugin once (per export).  This can be used if the plugin
is slow to open/connect (such as L<nbdkit-ssh-plugin(1)> or
L<nbdkit-vddk-plugin(1)>).

Some disadvantages are:

=over 4

=item *

Multiple NBD clients may be sharing one connection to the plugin which
might cause performance issues.

=item *

The plugin stays open until nbdkit shuts down.

=item *

This defeats multi-conn.  If nbdkit advertises multi-conn, NBD clients
may make multiple connections but will end up connecting to the same
underlying plugin instance.  (See also
L<nbdkit-multi-conn-filter(1)>).

=back

=head1 PARAMETERS

There are no parameters specific to nbdkit-openonce-filter.  Any
parameters are passed through to and processed by the underlying
plugin in the normal way.

=head1 FILES

=over 4

=item F<$filterdir/nbdkit-openonce-filter.so>

The filter.

Use C<nbdkit --dump-config> to find the location of C<$filterdir>.

=back

=head1 VERSION

C<nbdkit-openonce-filter> first appeared in nbdkit 1.44.

=head1 SEE ALSO

L<nbdkit(1)>,
L<nbdkit-cache-filter(1)>,
L<nbdkit-multi-conn-filter(1)>,
L<nbdkit-retry-filter(1)>,
L<nbdkit-curl-plugin(1)>,
L<nbdkit-ssh-plugin(1)>,
L<nbdkit-vddk-plugin(1)>,
L<nbdkit-filter(3)>.

=head1 AUTHORS

Richard W.M. Jones

=head1 COPYRIGHT

Copyright Red Hat
