server: Implement --swap option.
commitacc37af9989aae708e8acad3535e1491931e6bdb
authorRichard W.M. Jones <rjones@redhat.com>
Sat, 16 Nov 2019 20:44:46 +0000 (16 20:44 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Sun, 17 Nov 2019 16:56:37 +0000 (17 16:56 +0000)
tree5ae3f514a5881fafc59d387687cfcba9c9a5ede7
parent6fa44cf98ec4671eb9d8211c6f6b52afc965bab2
server: Implement --swap option.

See also:
https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1933394.html

This simply runs ‘mlockall (MCL_CURRENT | MCL_FUTURE)’, same as
nbd-server.

I made this conditional on a configure time test because Haiku
currently doesn't implement mlockall.  It is supported on OpenBSD and
FreeBSD so we should be able to remove those conditionals in future.
TODO
configure.ac
docs/nbdkit.pod
docs/synopsis.txt
server/main.c
server/options.h
tests/Makefile.am
tests/test-swap.sh [new file with mode: 0755]