diff options
author | Richard W.M. Jones | 2013-04-09 16:30:54 +0200 |
---|---|---|
committer | Stefan Hajnoczi | 2013-04-15 10:18:05 +0200 |
commit | 9a2d462e7bfba36597ccbd3774ba3bb1bd4c54d8 (patch) | |
tree | 99f84f93211231e0fc37909e943779a536189ef5 /configure | |
parent | block: Add support for Secure Shell (ssh) block device. (diff) | |
download | qemu-9a2d462e7bfba36597ccbd3774ba3bb1bd4c54d8.tar.gz qemu-9a2d462e7bfba36597ccbd3774ba3bb1bd4c54d8.tar.xz qemu-9a2d462e7bfba36597ccbd3774ba3bb1bd4c54d8.zip |
block: ssh: Use libssh2_sftp_fsync (if supported by libssh2) to flush to disk.
libssh2_sftp_fsync is an extension to libssh2 to support fsync(2) over
sftp, which is itself an extension of OpenSSH.
If both libssh2 and the ssh daemon support it, this will allow
bdrv_flush_to_disk to commit changes through to disk on the remote
server.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -2357,6 +2357,31 @@ EOF fi ########################################## +# libssh2_sftp_fsync probe + +if test "$libssh2" = "yes"; then + cat > $TMPC <<EOF +#include <stdio.h> +#include <libssh2.h> +#include <libssh2_sftp.h> +int main(void) { + LIBSSH2_SESSION *session; + LIBSSH2_SFTP *sftp; + LIBSSH2_SFTP_HANDLE *sftp_handle; + session = libssh2_session_init (); + sftp = libssh2_sftp_init (session); + sftp_handle = libssh2_sftp_open (sftp, "/", 0, 0); + libssh2_sftp_fsync (sftp_handle); + return 0; +} +EOF + # libssh2_cflags/libssh2_libs defined in previous test. + if compile_prog "$libssh2_cflags" "$libssh2_libs" ; then + QEMU_CFLAGS="-DHAS_LIBSSH2_SFTP_FSYNC $QEMU_CFLAGS" + fi +fi + +########################################## # linux-aio probe if test "$linux_aio" != "no" ; then |