From patchwork Tue Mar 24 23:47:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 11456751 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CC74913A4 for ; Tue, 24 Mar 2020 23:49:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AE6AF2072E for ; Tue, 24 Mar 2020 23:49:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585093797; bh=ar0wkMwCe6ZGIRTs9sssTCqmlezrmEtiKGCGz+0IHWM=; h=From:To:Subject:Date:In-Reply-To:References:List-ID:From; b=LpTMRG7TtfEE2JaT+TsmfIrMR6PznG7YovE6r4RUNijRLDaUyIu/qgO8FdHSbv/aJ 8DdTESAhxX57YThokcrsgcall7uDjc36ge0yXAzc75DheEbsS2mH1LpoyrV9s8bKRF 3KqegUsk6OsoUaZaZzmqeJpvwTaZnV9pzr3Z0bks= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727183AbgCXXtt (ORCPT ); Tue, 24 Mar 2020 19:49:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:35478 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727188AbgCXXts (ORCPT ); Tue, 24 Mar 2020 19:49:48 -0400 Received: from localhost.localdomain (c-68-40-189-247.hsd1.mi.comcast.net [68.40.189.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AD6462073C for ; Tue, 24 Mar 2020 23:49:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585093787; bh=ar0wkMwCe6ZGIRTs9sssTCqmlezrmEtiKGCGz+0IHWM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uIb37uBCmB9bWUx6rR1njArMLp0EfY37Ifa2x81z6M6MsjEcD5Sqx3+4a3R32M6S8 H6+xJVuE/4xQl7qZrL+N+DGwBsiQ0C4CdIzoXHLRJ01U0qc6v8sdiOUiVeCeqwr5Ac B1EXC/b8cmUosmoigZMs4/xthoJOuD8xe/Ac9NK0= From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH 22/22] pNFS/flexfiles: Specify the layout segment range in LAYOUTGET Date: Tue, 24 Mar 2020 19:47:28 -0400 Message-Id: <20200324234728.8997-23-trondmy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200324234728.8997-22-trondmy@kernel.org> References: <20200324234728.8997-1-trondmy@kernel.org> <20200324234728.8997-2-trondmy@kernel.org> <20200324234728.8997-3-trondmy@kernel.org> <20200324234728.8997-4-trondmy@kernel.org> <20200324234728.8997-5-trondmy@kernel.org> <20200324234728.8997-6-trondmy@kernel.org> <20200324234728.8997-7-trondmy@kernel.org> <20200324234728.8997-8-trondmy@kernel.org> <20200324234728.8997-9-trondmy@kernel.org> <20200324234728.8997-10-trondmy@kernel.org> <20200324234728.8997-11-trondmy@kernel.org> <20200324234728.8997-12-trondmy@kernel.org> <20200324234728.8997-13-trondmy@kernel.org> <20200324234728.8997-14-trondmy@kernel.org> <20200324234728.8997-15-trondmy@kernel.org> <20200324234728.8997-16-trondmy@kernel.org> <20200324234728.8997-17-trondmy@kernel.org> <20200324234728.8997-18-trondmy@kernel.org> <20200324234728.8997-19-trondmy@kernel.org> <20200324234728.8997-20-trondmy@kernel.org> <20200324234728.8997-21-trondmy@kernel.org> <20200324234728.8997-22-trondmy@kernel.org> MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Trond Myklebust Move from requesting only full file layout segments, to requesting layout segments that match our I/O size. This means the server is still free to return a full file layout, but we will no longer error out if it does not. Signed-off-by: Trond Myklebust --- fs/nfs/flexfilelayout/flexfilelayout.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index 8ad26cf786de..b2a7c711e911 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c @@ -798,8 +798,8 @@ ff_layout_pg_get_read(struct nfs_pageio_descriptor *pgio, pnfs_put_lseg(pgio->pg_lseg); pgio->pg_lseg = pnfs_update_layout(pgio->pg_inode, nfs_req_openctx(req), - 0, - NFS4_MAX_UINT64, + req_offset(req), + req->wb_bytes, IOMODE_READ, strict_iomode, GFP_KERNEL); @@ -891,8 +891,8 @@ ff_layout_pg_init_write(struct nfs_pageio_descriptor *pgio, if (!pgio->pg_lseg) { pgio->pg_lseg = pnfs_update_layout(pgio->pg_inode, nfs_req_openctx(req), - 0, - NFS4_MAX_UINT64, + req_offset(req), + req->wb_bytes, IOMODE_RW, false, GFP_NOFS);