All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Frediano Ziglio <freddy77@gmail.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1/2] linux aio: support flush operation
Date: Thu, 28 Jul 2011 14:41:02 +0200	[thread overview]
Message-ID: <4E3158DE.2010404@redhat.com> (raw)
In-Reply-To: <20110728121556.GA17125@lst.de>

Am 28.07.2011 14:15, schrieb Christoph Hellwig:
>> Christoph, on another note: Can we rely on Linux AIO never returning
>> short writes except on EOF? Currently we return -EINVAL in this case, so

"short reads" I meant, of course.

>> I hope it's true or we wouldn't return the correct error code.
> 
> More or less.  There's one corner case for all Linux I/O, and that is
> only writes up to INT_MAX are supported, and larger writes (and reads)
> get truncated to it.  It's pretty nasty, but Linux has been vocally
> opposed to fixing this issue.

I think we can safely ignore this. So just replacing the current
ret = -EINVAL; by a memset(buf + ret, 0, len - ret); ret = 0; should be
okay, right? (Of course using the qiov versions, but you get the idea)

Kevin

  reply	other threads:[~2011-07-28 12:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-27 18:25 [Qemu-devel] [PATCH 0/2] improve Linux AIO support Frediano Ziglio
2011-07-27 18:25 ` [Qemu-devel] [PATCH 1/2] linux aio: support flush operation Frediano Ziglio
2011-07-27 18:31   ` Christoph Hellwig
2011-07-27 19:52     ` Frediano Ziglio
2011-07-27 19:57       ` Christoph Hellwig
2011-07-28  7:47         ` Kevin Wolf
2011-07-28 12:15           ` Christoph Hellwig
2011-07-28 12:41             ` Kevin Wolf [this message]
2011-07-29 14:24               ` Christoph Hellwig
2011-07-29 15:33             ` Stefan Hajnoczi
2011-07-27 18:25 ` [Qemu-devel] [PATCH 2/2] aio: use Linux AIO even if nocache is not specified Frediano Ziglio
2011-07-27 18:32   ` Christoph Hellwig

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=4E3158DE.2010404@redhat.com \
    --to=kwolf@redhat.com \
    --cc=freddy77@gmail.com \
    --cc=hch@lst.de \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.