From patchwork Wed Mar 20 21:11:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anna Schumaker X-Patchwork-Id: 13598180 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DAB4385653 for ; Wed, 20 Mar 2024 21:11:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710969082; cv=none; b=EZe7ycyJM46E2dMs0xjuSmEiMMO2J+Ja/r4rWDPJvIEIeWOwHagKJoxFDEEBBnZ43cyM3/Vn0pyIqMiMNL13madSRBFuo/jyKGlhPo1HxMfJZu9kootrRSnDnKdl7Akb508o3pGX8kDxeVAh2JyjucJgzQ5muiBWx6NA8F/fLNA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710969082; c=relaxed/simple; bh=xWxj2l0iw0+w4rp8YS4jPLSt/FcKpJ6uJyO+GYBDEps=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KJowXuShwnQ/lWUFdjszLoCWOQhhdZ7jCbG9noNvcE7Hnja5nlugbZRJTzSVJz6dAu46ScJ9d07WrZIR0oCs+xlV6u6f3jF6uLePZ8B91CE87YX6s2q6yXdZNiZDBMI2IaaomGUP1w4LHCpRzq9gwLvMxOEiKczOLX4rA50c8U4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iN/IZcpY; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iN/IZcpY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 23919C43394; Wed, 20 Mar 2024 21:11:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710969082; bh=xWxj2l0iw0+w4rp8YS4jPLSt/FcKpJ6uJyO+GYBDEps=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iN/IZcpYSFCtYVpuZcEwP4jhcN1AzzkuQCCtY3zrrImxrNMpPcAdUAmfNo1y4k5kE rMgmO3fWKcPlRKl6SHkhj0qi+mn4xYwNh8su529Fqlzs9ukxU9hNZBXK0WELW24pnY BhWFFWdOTzFtqzon4L0Zk7er150BkSGWL0RTioCzIjDbpdyRCOEnGmSUBCFKKpow+E NR0/DfBewzbR2cj8JqWqcUBgyiPRGMx5bFg7v/nMY3ASc4tgzXfi47hPq+SXsd3OtW fsEMUS1RxAD91XPGRWgviV2JlBiMVt0XbUfDy+wjzXE2BH52udsUMZPvhsQwiztgWa mnk265yGXS6wA== From: Anna Schumaker To: linux-nfs@vger.kernel.org, trond.myklebust@hammerspace.com Cc: anna@kernel.org Subject: [PATCH v1 1/2] pNFS/filelayout: Remove the whole file layout requirement Date: Wed, 20 Mar 2024 17:11:19 -0400 Message-ID: <20240320211120.228954-2-anna@kernel.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240320211120.228954-1-anna@kernel.org> References: <20240320211120.228954-1-anna@kernel.org> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Anna Schumaker Layout segments have been supported in pNFS for years, so remove the requirement that the server always sends whole file layouts. Signed-off-by: Anna Schumaker --- fs/nfs/filelayout/filelayout.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c index ce8f8934bca5..3fb18b16a5b4 100644 --- a/fs/nfs/filelayout/filelayout.c +++ b/fs/nfs/filelayout/filelayout.c @@ -605,14 +605,6 @@ filelayout_check_layout(struct pnfs_layout_hdr *lo, dprintk("--> %s\n", __func__); - /* FIXME: remove this check when layout segment support is added */ - if (lgr->range.offset != 0 || - lgr->range.length != NFS4_MAX_UINT64) { - dprintk("%s Only whole file layouts supported. Use MDS i/o\n", - __func__); - goto out; - } - if (fl->pattern_offset > lgr->range.offset) { dprintk("%s pattern_offset %lld too large\n", __func__, fl->pattern_offset); From patchwork Wed Mar 20 21:11:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anna Schumaker X-Patchwork-Id: 13598181 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 368304F8B2 for ; Wed, 20 Mar 2024 21:11:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710969083; cv=none; b=Q4AXMR3DcBTxlKjINZRVJD6kTZMlLyVOiVfSUYPbQOk/rue62HomCdgGA7Yxky4w67RrB48tWg6ztr13jXddf0p3Tst9/jWHu6MjqJXHH9z0zvO2+6Sak3WytDbQdTmtHzjlPt+6QgqdcDuo8nnpc8oA9qSiHf5hzTVVPIDKnEQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710969083; c=relaxed/simple; bh=5VXi73pty05gRBDvbtPuotRxMtU15c0kqRV4paZvgNs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Cy6RAMdcvcQA+YjCLG2VpGaI9llr2iZsC8Dw4BZNmE9IqLTtpln4LfXOpcyqpu1y8txdmj7uKE/idOSnbqhnt1llTGm+tVG0RBm3J2sMtQMaiAILuMT1L1rouPN8omc5nVqw47qlfZ/pLDQ6AkuwTHRXfF/SV/FpsiE6pHtXf7c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NHuL8Cvl; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NHuL8Cvl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B75EBC433F1; Wed, 20 Mar 2024 21:11:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710969083; bh=5VXi73pty05gRBDvbtPuotRxMtU15c0kqRV4paZvgNs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NHuL8Cvl+5GAlZ7KbleIxLkhG/5QoNjJMxbLyLB+dQYPb+eZPg6aUEFwsLUBT2SIk q0pLcbdeh+AhHHr7SmrsLQcssUfptXvS6CT4zIQ4q2if6tAAleh/ZO+6Zbi8289uMt p5tif3UIvk2eEEqLtpdSG00C0apL+dMSr0s73ruQb3yBvbM/44J7tVnU/lTn3n8jjB d3CGHujCltKj2MrKDB3YG7jA3ux/NDJCtSmRyNxMcNvIcIHAgHPDy7lVCXECKGdFNG JWnJBZSu+D8ja2X4WS08W7h0kiY76535DxN8+vg/Q+VjOuBk7s3XiVd0gNW0Kic9E3 HCc+OLCt/Jbgw== From: Anna Schumaker To: linux-nfs@vger.kernel.org, trond.myklebust@hammerspace.com Cc: anna@kernel.org Subject: [PATCH v1 2/2] pNFS/filelayout: Specify the layout segment range in LAYOUTGET Date: Wed, 20 Mar 2024 17:11:20 -0400 Message-ID: <20240320211120.228954-3-anna@kernel.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240320211120.228954-1-anna@kernel.org> References: <20240320211120.228954-1-anna@kernel.org> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Anna Schumaker Move from only requesting 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 if it wants, but partial layouts will no longer cause an error. Signed-off-by: Anna Schumaker --- fs/nfs/filelayout/filelayout.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c index 3fb18b16a5b4..cc2ed4b5a4fd 100644 --- a/fs/nfs/filelayout/filelayout.c +++ b/fs/nfs/filelayout/filelayout.c @@ -871,8 +871,8 @@ filelayout_pg_init_read(struct nfs_pageio_descriptor *pgio, if (!pgio->pg_lseg) { pgio->pg_lseg = fl_pnfs_update_layout(pgio->pg_inode, nfs_req_openctx(req), - 0, - NFS4_MAX_UINT64, + req_offset(req), + req->wb_bytes, IOMODE_READ, false, GFP_KERNEL); @@ -895,8 +895,8 @@ filelayout_pg_init_write(struct nfs_pageio_descriptor *pgio, if (!pgio->pg_lseg) { pgio->pg_lseg = fl_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);