From mboxrd@z Thu Jan 1 00:00:00 1970 From: Latchesar Ionkov Subject: Re: [V9fs-developer] [PATCH] [fs/9p] Let the read retry on short reads. Date: Mon, 23 Aug 2010 10:43:45 -0600 Message-ID: References: <1282070793-4743-1-git-send-email-jvrao@linux.vnet.ibm.com> <4C6AECD2.1050401@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: "Venkateswararao Jujjuri (JV)" , linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net To: Eric Van Hensbergen Return-path: Received: from mail-gw0-f46.google.com ([74.125.83.46]:41405 "EHLO mail-gw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751556Ab0HWQnq convert rfc822-to-8bit (ORCPT ); Mon, 23 Aug 2010 12:43:46 -0400 Received: by gwj17 with SMTP id 17so2164877gwj.19 for ; Mon, 23 Aug 2010 09:43:45 -0700 (PDT) In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: The potential impact is that if the existing server returns iounit=3D=3D= 0, there will be two Rread count 0. Which is perfectly fine with 9P, just a bit slower. I am not sure how Plan9 handles the case. Thanks, Lucho On Mon, Aug 23, 2010 at 10:11 AM, Eric Van Hensbergen wrote: > On Tue, Aug 17, 2010 at 3:39 PM, Latchesar Ionkov = wrote: >> The only solution I can think of is to use the iounit value the file >> server returns (and not the msize as we do now). If iounit is 0, all= ow >> short reads, if iounit is more than zero and the read returns less >> that the iounit, don't try anymore. >> >> This kind of passes the problem to the file server, but I guess that= 's >> the right place to solve it anyway. >> > > What's the potential impact on existing serves? =A0What does Plan 9 e= xpect? > > read(5) says: > The count field in the reply indicates the number of bytes returned. > This may be less than the requested amount. If the offset field is > greater than or equal to the number of bytes in the file, a count of > zero will be returned. > > I'd say if we wanted to do something different, I would need to be > conditional by 9p2000.u/9p2000.L -- I don't want to break existing > servers/clients that might rely on this behavior to frame messages > (like pipes, the IP stack, etc.) > > =A0 =A0 =A0 =A0 -eric > -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html