Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp89510lqo; Tue, 7 May 2024 13:06:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUeLpSJEJ5GNPzpRmEbEH91CGNRiXfyCtq+cvqjvCz96sLQpeoSSflDYnTWx6nnKPcyePDZjHMXWwi7q6YM1EXEBXmNEGSdyGTAJ322IQ== X-Google-Smtp-Source: AGHT+IHK3iOwr+DKb1AtDa/RMSTov0WwmpHOXrZge0iFJfMyhPBxV9dytLV54tey6HPyHRNPgccC X-Received: by 2002:a05:6358:2923:b0:186:9d05:5f0 with SMTP id e5c5f4694b2df-192d3682ed8mr81010455d.22.1715112418139; Tue, 07 May 2024 13:06:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715112418; cv=pass; d=google.com; s=arc-20160816; b=nxPW4jyYLYkUcz/8MudInyjk4LS23vfXOB/39sLT23fcMGK5FtPpzNe0Zy5+/R/xVK X8PvH5offqr2SnDVcdmfBc2w5S3KAMTaIXPPwltxRKjlV6ZYhSEh0EKIoKJS+p3Exju9 lahA0dieov2DWC2FoDtXttJy2lm/qIoBK5v3ClQFd5mdC1+vjafVfdHpfCozhsP77iXH 9lJpe1p4GEeAz5ds0QubnWSCBtYi4l6gCIet+RqBXuzv+LriiusGBYoMQrNLaAWSB6aW i1eqMVVHvR4uKkXnHZ8vGX3JQpdTwg/uaJ5YEZXkIJ16OUmInVTKGK8Ty9YlEt8ftYTn zmFA== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=w5YF7Z7AF7jQyYwLzjFO0f1fwv/YKhS0zUP8WVGUoWg=; fh=2G8vV/twklXuIDat4PvoYTuAifAwKWy0lXEyRgIEHLQ=; b=g1OkG0X9vjVzJgIM1nm0QAeLR58XuVkhPxEs3TtQsNljlLN8C2P30nRbcvi1/0+wrG 5KjNVs2tTPKyKf3yrx5Wm6RjpykMfxHC4QETJDV6+YzkbXihBJHimaxisE0nfm2wylku zIwMFYcL1P/tNOUryqWMnYR0s6Jx4I0PEXOdGlouS1CeUSpzy5Megsu94BGmoLN+P6Q9 QiBLhVm4dpKE2xZ4y4ipTIQyQeuXsxII4IDaUqVFiEUGkLYVINb+IslGDGpbEVFfQ+i3 cePW8CVR7Xt6Kd543TnDhuVhbimTfsa0sKrwdPaFVa4vUIUJOzBuTbCk53ze0BoUTnF1 eCcg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=IbEve2Cn; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-nfs+bounces-3195-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3195-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p37-20020a635b25000000b0061d6d5c71a8si8812986pgb.689.2024.05.07.13.06.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 13:06:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3195-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=IbEve2Cn; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-nfs+bounces-3195-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3195-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 BDE82281487 for ; Tue, 7 May 2024 20:06:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05A6516DEAE; Tue, 7 May 2024 19:59:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IbEve2Cn" X-Original-To: linux-nfs@vger.kernel.org Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B17316DECF for ; Tue, 7 May 2024 19:59:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715111976; cv=none; b=L4Xq6vqT58DEys52Xm5O9BuU79mz3zSFDMPwKAv6k+S4/NRdP4lgTvDU9XNNe+YMFgC4NsPXlvpHXMzaBP6TraTwYAzopIkS0YtDczRodDoPOkmUhoBbHOZL21uHZWMSbS3YffjaMZvzAho8KOPp8b1EUPlh7Mu2oZsVOr1/Rk8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715111976; c=relaxed/simple; bh=nO56AGtRUysJC/OnBTNYe8YO07Cfd+oulHIC9Y9Y0QA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=HwiBDDz3IQVg4Btbfwjru/r/Epp6ciwWjzqFde1/Y7vENg5JbOBrJCN1w8ZFwxpF2tT8Qz4YX4FPzR6PVuXK6pgxVvkNG44jaCjPjMcJfyGxyHvDIzyBtwRwQHenzQvqtRpGhdjPXJu/ZHgq2HVr3zFOjio5XPpIBS3zJqtwxaI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IbEve2Cn; arc=none smtp.client-ip=209.85.166.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-io1-f50.google.com with SMTP id ca18e2360f4ac-7d6b362115eso30715539f.0 for ; Tue, 07 May 2024 12:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715111974; x=1715716774; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=w5YF7Z7AF7jQyYwLzjFO0f1fwv/YKhS0zUP8WVGUoWg=; b=IbEve2CnG6lNOciv3xeSnZ38juLlwLIUlLDlSTWEXWCzSm3oFZPVmmqIyNvdkILCPa 0X7EK7tP7VzLL2Lo7dU1yJh1UfoQcJPNzfQA5DvyXiVOheiuP+CSgE/ATfXK7JVdcmsx tcVsaK1bvYdNF6loC9Acy3PqEhwI0wJ6Y3Jw6TSLwUjjbWQ0aM2szZxlrhW1MdwG6RJD aCV7u7saCbOyUwPdmpQJ/8Bh3XH2bQm7mnsSqa120PnZyCJA3n5xV7uIe9ALHmlJjlA4 3vwPITUwxPnaY4VI1x9VlO6fxL6Dsh9bv9ZYtAI9jWUn//RgSmpCZtssv95e9KTa22RS qMZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715111974; x=1715716774; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=w5YF7Z7AF7jQyYwLzjFO0f1fwv/YKhS0zUP8WVGUoWg=; b=nq+oy1JwIv/tL9lodrdRsvxJUel1eUt3lXvCNxqjnCNez6BbVsJct2NR9IC7BlSb0p jMMA92oz8qDAJTLklgcoaoulTWZ+yq7Zf/Sk3V0JaRXgEwWFi603N08krFBsaXN0xNCE saYg+h5SBDTYI+IsQv/LCNNZoTea+Q1inrZegb4JNdNa4qR6zSsp9dL4DOrS/81XxLu+ hQuDxvpMhtyAGPZzZe05q0j9rBOB0simbWT3Pa9N9ghZxHzpOypEW9bjy+IakhbkB6pF JpIpfywVirEy2TkeNrJ8XwJdVDJVq+Jc6Cn4FJj7z4qe5JJ8N8qODzQ/fe8xrftB7zIA 21Wg== X-Gm-Message-State: AOJu0YxJBJOdRDOj50NhMFeuWqaKFrqbd7Cvtc2dS4u1XpNpS7THv2Fz XfP6oNTpS36xuMNAOf5QhwRFZD9zbkFK0q/4nFTBtk6VOgi0C+OV X-Received: by 2002:a05:6e02:1fef:b0:36b:15e0:de18 with SMTP id e9e14a558f8ab-36caeb45952mr6238825ab.0.1715111974537; Tue, 07 May 2024 12:59:34 -0700 (PDT) Received: from kolga-mac-1.attlocal.net ([2600:1700:6a10:2e90:d0a5:c6e3:4e72:2c07]) by smtp.gmail.com with ESMTPSA id x3-20020a056e021ca300b0036b3735d22dsm2836296ill.82.2024.05.07.12.59.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 12:59:34 -0700 (PDT) From: Olga Kornievskaia To: trond.myklebust@hammerspace.com, anna.schumaker@netapp.com Cc: linux-nfs@vger.kernel.org Subject: [PATCH 1/1] pNFS/filelayout: check layout segment range Date: Tue, 7 May 2024 15:59:33 -0400 Message-Id: <20240507195933.45683-1-olga.kornievskaia@gmail.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) 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: Olga Kornievskaia Before doing the IO, check that we have the layout covering the range of IO. Signed-off-by: Olga Kornievskaia --- fs/nfs/filelayout/filelayout.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c index 85d2dc9bc212..bf3ba2e98f33 100644 --- a/fs/nfs/filelayout/filelayout.c +++ b/fs/nfs/filelayout/filelayout.c @@ -868,6 +868,7 @@ filelayout_pg_init_read(struct nfs_pageio_descriptor *pgio, struct nfs_page *req) { pnfs_generic_pg_check_layout(pgio); + pnfs_generic_pg_check_range(pgio, req); if (!pgio->pg_lseg) { pgio->pg_lseg = fl_pnfs_update_layout(pgio->pg_inode, nfs_req_openctx(req), @@ -892,6 +893,7 @@ filelayout_pg_init_write(struct nfs_pageio_descriptor *pgio, struct nfs_page *req) { pnfs_generic_pg_check_layout(pgio); + pnfs_generic_pg_check_range(pgio, req); if (!pgio->pg_lseg) { pgio->pg_lseg = fl_pnfs_update_layout(pgio->pg_inode, nfs_req_openctx(req), -- 2.39.1