qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: "Richard W.M. Jones" <rjones@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] block/curl: Add support for Secure Shell (ssh/sftp) block device
Date: Mon, 25 Mar 2013 14:12:56 +0100	[thread overview]
Message-ID: <CAJSP0QUqcLt=LAiF3hXM+3v2ROG=gABOSSDq4suLet0Mzhy9MQ@mail.gmail.com> (raw)
In-Reply-To: <20130325123234.GB26045@rhmail.home.annexia.org>

On Mon, Mar 25, 2013 at 1:32 PM, Richard W.M. Jones <rjones@redhat.com> wrote:
> On Fri, Mar 22, 2013 at 01:04:55PM +0000, Richard W.M. Jones wrote:
>> I got it working with Curl, patch attached.
>>
>> However there are multiple issues (these are mainly notes for myself):
>>
>> (1) libcurl cannot read the size of the file.  I had to hard-code
>> this.  This is probably just a shortcoming of libcurl (libssh2/sftp
>> itself can read the size of files).  Will try to work on a patch for
>> upstream.
>
> After my holiday and in the cold of day I've had a long look at the
> SFTP implementation in libcurl.
>
>   https://github.com/bagder/curl/blob/master/lib/ssh.c
>
> It's implemented as a huge state machine and simply implementing (1)
> above is problematic (I believe we would have to reopen the connection
> after our call to curl_easy_perform).
>
> The larger issue is that the qemu curl block driver doesn't support
> writes.  Now these could in theory be added.  Indeed curl does support
> "random access" writes, although AFAICT you have to open a new
> connection each time you want to seek backwards, and you can't read
> and write over the same connection (so you'd need >= 1 connections for
> reading and another >= 1 connections for writing).
>
> I think I will continue with the pure libssh2-based block driver,
> making it support all the missing features discussed earlier:
>
>   http://www.mail-archive.com/qemu-devel@nongnu.org/msg161997.html
>
> plus of course non-blocking AIO.
>
> I think this way we'll end up with a much more robust, reliable and
> easier to debug ssh implementation in qemu.

Fair enough.

Stefan

  reply	other threads:[~2013-03-25 13:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-21 13:38 [Qemu-devel] [PATCH] Add support for Secure Shell (ssh) block device Richard W.M. Jones
2013-03-21 13:38 ` [Qemu-devel] [PATCH] block: " Richard W.M. Jones
2013-03-21 15:26   ` Stefan Hajnoczi
2013-03-21 15:39     ` Richard W.M. Jones
2013-03-21 19:29       ` Stefan Hajnoczi
2013-03-21 19:35   ` Stefan Hajnoczi
2013-03-21 20:31     ` Richard W.M. Jones
2013-03-22 13:04     ` [Qemu-devel] [PATCH] block/curl: Add support for Secure Shell (ssh/sftp) " Richard W.M. Jones
2013-03-22 13:41       ` Stefan Hajnoczi
2013-03-25 12:32       ` Richard W.M. Jones
2013-03-25 13:12         ` Stefan Hajnoczi [this message]
2013-03-25 14:36   ` [Qemu-devel] [PATCH] block: Add support for Secure Shell (ssh) " Kevin Wolf
2013-03-25 15:11     ` Richard W.M. Jones
2013-03-26  9:37       ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJSP0QUqcLt=LAiF3hXM+3v2ROG=gABOSSDq4suLet0Mzhy9MQ@mail.gmail.com' \
    --to=stefanha@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).