qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Lieven <pl@kamp.de>
Cc: Kevin Wolf <kwolf@redhat.com>,
	"famz@redhat.com" <famz@redhat.com>,
	ronnie sahlberg <ronniesahlberg@gmail.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Orit Wasserman <owasserm@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCHv5] block: add native support for NFS
Date: Fri, 10 Jan 2014 19:24:15 +0100	[thread overview]
Message-ID: <52D03ACF.5020609@redhat.com> (raw)
In-Reply-To: <027E51A1-36CF-4593-A0C2-88334723B9FE@kamp.de>

Il 10/01/2014 19:07, Peter Lieven ha scritto:
> 
> 
> 
> Von meinem iPad gesendet
> 
> Am 10.01.2014 um 19:05 schrieb "Paolo Bonzini" <pbonzini@redhat.com>:
> 
>> Il 10/01/2014 18:16, ronnie sahlberg ha scritto:
>>>
>>> There is a common exception though, for the case where you read past
>>> the end of file.
>>> So short reads should normally not happen. Unless QEMU or the guest
>>> sends a request to libnfs to read past the end of the file.
>>
>> Yes, this can happen in QEMU and the various drivers are careful to pad
>> with zeroes.  It could perhaps be moved to block.c, but for now each
>> driver handles it separately.
> 
> ok i will add this as well. however, i thought i had seen code for this in block.c  already?,

No, it corresponds to this code in block/raw-posix.c:

static int aio_worker(void *arg)
{
    RawPosixAIOData *aiocb = arg;
    ssize_t ret = 0;

    switch (aiocb->aio_type & QEMU_AIO_TYPE_MASK) {
    case QEMU_AIO_READ:
        ret = handle_aiocb_rw(aiocb);
        if (ret >= 0 && ret < aiocb->aio_nbytes && aiocb->bs->growable) {
            iov_memset(aiocb->aio_iov, aiocb->aio_niov, ret,
                      0, aiocb->aio_nbytes - ret);

            ret = aiocb->aio_nbytes;
        }
        if (ret == aiocb->aio_nbytes) {
            ret = 0;
        } else if (ret >= 0 && ret < aiocb->aio_nbytes) {
            ret = -EINVAL;
        }
        break;

Paolo

  reply	other threads:[~2014-01-10 18:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-26 12:48 [Qemu-devel] [PATCHv5] block: add native support for NFS Peter Lieven
2014-01-03 10:37 ` Stefan Hajnoczi
2014-01-03 10:51   ` Peter Lieven
2014-01-03 11:04   ` Peter Lieven
2014-01-03 11:28   ` Peter Lieven
2014-01-06  1:18     ` Stefan Hajnoczi
2014-01-06  6:53       ` Peter Lieven
2014-01-09 14:13 ` Kevin Wolf
2014-01-09 16:08   ` Peter Lieven
2014-01-10 11:40     ` Kevin Wolf
2014-01-10 12:12       ` Peter Lieven
2014-01-10 12:30         ` Paolo Bonzini
2014-01-10 14:49           ` ronnie sahlberg
2014-01-10 15:05             ` Peter Lieven
2014-01-10 15:46               ` Kevin Wolf
2014-01-10 16:10                 ` Peter Lieven
2014-01-10 17:16                   ` ronnie sahlberg
2014-01-10 18:05                     ` Paolo Bonzini
2014-01-10 18:07                       ` Peter Lieven
2014-01-10 18:24                         ` Paolo Bonzini [this message]
2014-01-10 18:47                           ` Peter Lieven

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=52D03ACF.5020609@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=owasserm@redhat.com \
    --cc=pl@kamp.de \
    --cc=qemu-devel@nongnu.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=stefanha@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).