From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Van Hensbergen Subject: Re: [V9fs-developer] [PATCH] [fs/9p] Let the read retry on short reads. Date: Mon, 23 Aug 2010 11:11:11 -0500 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 Cc: "Venkateswararao Jujjuri (JV)" , linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net To: Latchesar Ionkov Return-path: Received: from mail-iw0-f174.google.com ([209.85.214.174]:64367 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754441Ab0HWQLM (ORCPT ); Mon, 23 Aug 2010 12:11:12 -0400 Received: by iwn5 with SMTP id 5so3687565iwn.19 for ; Mon, 23 Aug 2010 09:11:11 -0700 (PDT) In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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, allow > 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? What does Plan 9 expect? 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.) -eric