From: ronnie sahlberg <ronniesahlberg@gmail.com>
To: Peter Lieven <pl@kamp.de>
Cc: Kevin Wolf <kwolf@redhat.com>,
"famz@redhat.com" <famz@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>,
Orit Wasserman <owasserm@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCHv5] block: add native support for NFS
Date: Fri, 10 Jan 2014 09:16:38 -0800 [thread overview]
Message-ID: <CAN05THTrefaeWZo7sCd4EDs2nBxcgCW9jSkoYC7nRRS1YUAfvw@mail.gmail.com> (raw)
In-Reply-To: <52D01B8D.6080100@kamp.de>
On Fri, Jan 10, 2014 at 8:10 AM, Peter Lieven <pl@kamp.de> wrote:
>
> Ronnie, can you also give a short advise on Kevin's question about short reads.
> I think they can happen if we read beyond past EOF or not?
>
Short reads should normally not happen in libnfs itself since servers
are often careful always trying to sending back as much data as the
client requested.
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.
If you send a READ for 1024 bytes to an nfs server at the offset 512
bytes from the end-of-file
then the server will respond with a read reply containing 512 bytes of
data (and the eof flag set in the reply).
In my experience, most kernel/os based clients seem to be very careful
to never try to read beyond enf of file, so this rarely happens in
normal nfs.
(I only recall HPUX being a system where it would be common to always
issue nfs i/o in multiples of 4k so for those clients it was very
important to make sure you implement short reads correctly in the
server).
I don't know how careful QEMU is in trying to prevent reading past the
end of the device or if it enforces it if the guest tries.
It is probably worth checking for short reads, at least for the case
where you might be reading past end of file.
next prev parent reply other threads:[~2014-01-10 17:16 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 [this message]
2014-01-10 18:05 ` Paolo Bonzini
2014-01-10 18:07 ` Peter Lieven
2014-01-10 18:24 ` Paolo Bonzini
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=CAN05THTrefaeWZo7sCd4EDs2nBxcgCW9jSkoYC7nRRS1YUAfvw@mail.gmail.com \
--to=ronniesahlberg@gmail.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=owasserm@redhat.com \
--cc=pbonzini@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
--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).