From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qmnz6-0003TN-L3 for qemu-devel@nongnu.org; Fri, 29 Jul 2011 10:24:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qmnz5-00045e-GW for qemu-devel@nongnu.org; Fri, 29 Jul 2011 10:24:16 -0400 Received: from verein.lst.de ([213.95.11.211]:35216 helo=newverein.lst.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qmnz5-00045W-8E for qemu-devel@nongnu.org; Fri, 29 Jul 2011 10:24:15 -0400 Date: Fri, 29 Jul 2011 16:24:14 +0200 From: Christoph Hellwig Message-ID: <20110729142414.GA7665@lst.de> References: <1311791126-11383-1-git-send-email-freddy77@gmail.com> <1311791126-11383-2-git-send-email-freddy77@gmail.com> <20110727183122.GA14736@lst.de> <77083DC7-E37C-4B44-9A59-DB19E34D20E2@gmail.com> <20110727195718.GA16212@lst.de> <4E3113F9.9090902@redhat.com> <20110728121556.GA17125@lst.de> <4E3158DE.2010404@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E3158DE.2010404@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/2] linux aio: support flush operation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: "qemu-devel@nongnu.org" , Christoph Hellwig , Frediano Ziglio On Thu, Jul 28, 2011 at 02:41:02PM +0200, Kevin Wolf wrote: > > 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) This should be safe.