Return-Path: linux-nfs-owner@vger.kernel.org Received: from mail-wg0-f51.google.com ([74.125.82.51]:54184 "EHLO mail-wg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755414Ab3CSUiq (ORCPT ); Tue, 19 Mar 2013 16:38:46 -0400 Received: by mail-wg0-f51.google.com with SMTP id 8so724495wgl.6 for ; Tue, 19 Mar 2013 13:38:45 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1363617532-24172-1-git-send-email-bhalevy@tonian.com> <1363622128.4351.15.camel@leira.trondhjem.org> <51473F46.10401@tonian.com> <5148BE0B.9080802@tonian.com> From: Benny Halevy Date: Tue, 19 Mar 2013 22:38:25 +0200 Message-ID: Subject: Re: [PATCH] pnfs: do not reset to mds if wb_offset != wb_pgbase To: Fred Isaman Cc: "Myklebust, Trond" , "Isaman, Fred" , "linux-nfs@vger.kernel.org" , "stable@kernel.org" Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-nfs-owner@vger.kernel.org List-ID: On Tue, Mar 19, 2013 at 10:28 PM, Fred Isaman wrote: > On Tue, Mar 19, 2013 at 3:35 PM, Benny Halevy wrote: >> On 2013-03-18 19:04, Fred Isaman wrote: >>> A problem case is if the layout ends within the page request, which >>> can happen due to the misalignment. >> >> First, the file layout currently supports only whole file layouts so I don't see >> how that's a problem. >> Regardless, I'd rather trim the layout segment to PAGE_SIZE boundaries >> and get a new layout from the page aligned offset and on with minlength = PAGE_SIZE >> (as we do today). >> >> Benny >> > > Yes, but consider.... > > let P = PAGE_SIZE > > assume you have a layout from 0 to 4P, and you try to do a WRITE from > 2P to 6P. Now if the buffer is not page aligned, one of the nfs_page > requests will contain the file's logical 4P offset at a random > location within the nfs_page. What happens then? Since we're using one layout segment at a time this should be handled as short I/O doing the remainder with another lseg. > > Fred