Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp73614lqp; Wed, 20 Mar 2024 14:11:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX2YQHthm2WxZ/AkN8WMf274iIUWctEAjAJxQSvqp7QWJEMs7Z2it6Q3Egl2ldQl9XmoasU+Rvw2Y8fWQTXVuyZGvuUYcX36zH2Pw054Q== X-Google-Smtp-Source: AGHT+IGt55SzU+lAR6l0oVpH5KuS1pdkqwHjCCCl/BW/qwDRBsiv5ve72gONeFFSxz97DjC/iAvV X-Received: by 2002:a05:6a20:b905:b0:1a3:3c5f:2ebd with SMTP id fe5-20020a056a20b90500b001a33c5f2ebdmr2411447pzb.59.1710969088206; Wed, 20 Mar 2024 14:11:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710969088; cv=pass; d=google.com; s=arc-20160816; b=ZlqnqWjChO9APmAs15Pf9syBcjDF8P8HP60S5DtDzACWL60SmcbP6IUCAu+pIcBpcU qFc3xNXvOEFb3dlHZScKP6MDgEQ54xmfAkwNYNfQ0AU2yBD8w746OhKVjADTlqbIRhDp SYMNPkB+ZFU/xnETriUB/42i9iT8tXG6KCtVVhya5XXZQqjDLZ4Ll+P6YSsb31dsOyo+ XGutdQUPO91/2yZLkydr1LxU2n1qbNIVHDv1hlg6PJfA8B5ziUw514isuX/seAvcYjY+ EorQZ3ZkngdNQB62GzugyrSKy+vp7G+fFb2bJUg1PMMDrvkVd53dF23okgIKLGf/3DJ7 iMsg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=JLSLuXZPhbWTWaxzN77Mx/zN1THekfcIqe+8InvGPD0=; fh=zrf3k9maC4LGn/MmcHhRkqh5cHnarsSKx/fWXfAmYNI=; b=i4FkW0ZD2RmrUjwBtyrX5dHeRYqw6dSc7Du27Uv7FN0lM2gEujFQARqDdvyEjAfzuk FGlP7oBMA8EdnlnlcpigpFsskdZMNAlq/pwPwT1JIY59Dl6Qqq7V1LP1bveV/u+A3Rkq DItw6P3KYdMejcPfh+1+S3zl212zFfG2EjThCU4c9X+WtiorNxYAiXiWjbeKsXzQq8Ns ex8Q0jTLdxtOdaYWi+xKM+DgKXG3bfUVg7VGrrXdmZIeJwQ1JG6B8qhboIcnZBZD16pe ZT6+kmyn80QVx0yeNPXyYkO0cwN6AuBg1l8eKKDMRbC9sCf+7EFqhOK8z8Wb7j8FgUyW TxDQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NHuL8Cvl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-2426-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2426-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x17-20020a17090aca1100b0029fb80a4abcsi2231581pjt.88.2024.03.20.14.11.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 14:11:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2426-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NHuL8Cvl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-2426-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2426-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D8568284C68 for ; Wed, 20 Mar 2024 21:11:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 59AB08595A; Wed, 20 Mar 2024 21:11:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NHuL8Cvl" X-Original-To: linux-nfs@vger.kernel.org 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 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 Content-Transfer-Encoding: 8bit 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); -- 2.44.0