Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp559359lqo; Wed, 8 May 2024 08:04:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWBib2qFkYHL4dEQ/A5G+V4CAaD4zb/TmY1dUOpRjlgnaAvnoNfuWQqWD0C7oOakkbDAAnFiKqwXq2fMr+PdmipjSoi8BLr+lNKF3wVMQ== X-Google-Smtp-Source: AGHT+IGg+0uSVfyfTjKcpa6nyyAupwsjpJy5ee6bw9x9byUm5rdRkHRYjr6UngMBWmN7FXB0lK0V X-Received: by 2002:a05:6a00:8203:b0:6f3:368d:6f52 with SMTP id d2e1a72fcca58-6f49c1e5cc4mr2778756b3a.5.1715180661295; Wed, 08 May 2024 08:04:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715180661; cv=pass; d=google.com; s=arc-20160816; b=QUIKS2K+R7STKk7T5a+YFFCSi4d3NzfYekQTirxSVZSER2aHLnygqC5ykgh5AIHer8 ttLsQEeg8atfIxCDNOzZ6FNF3LEXZawhzhcm+PtPYBQR5bK8Qm+LS2LitEvQ3VHFMyex mrguOvQPp3PNVu1mld/u1N383A08A9CVB4cddf2NV3AVMpe46Yfnqtqe5tsZ3rGfTFvL KH27fY7oyVroxnJab8H2VVzr+AF/RDCVxjdrVCIsRaYkJAXMjNR6cn0Ug8pk9mPgvgrG TmWGvfoEbr9GfTbYwzh0RsP1nVsPP7nPTzZkafx4ajh/F1lyV9zebmzF0NBOBcVMfokp 1dRQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YH4u3B+oNstpA0630mSi7iIt83wgfubLTmOB3rVS+Dc=; fh=0wydizkD8dPQ63D7nDvTxluUQmda5nbvB3J4lDrV2hU=; b=tttTpOMRC3HX6GEjNkjr7b2bs5gc9IjBd67iCDkvhGmJb7BChjtL8EmjXO20hx+MNb 93i1RoenEo1dinRRFhHhxZQB64rdvnZDaG4twvMDPXFdyfpJl2Zy0txivdkX1vFVfB7a KzGN9TJohXsD/yDs1o+QEl2BFDmU7cLki9w+31Yibj9Xkgjea4lcD/8Ju8kT1ltfV2tz /sB59/b9eK7CWTdrtBot4WFY5bOZjeG3gKnl22Gsg45pBx6rSDa3pcXT4dj3pkByW4Zt 8V9P3Nx/JgMnd8zQx1weusKBhEuB3hJLmKjuiQcvGB8xAyMCT+056IqzAu5e3BYEryBh +K4Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hXwCxvXb; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-nfs+bounces-3205-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3205-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id fh2-20020a056a00390200b006eaa702b0dcsi13025019pfb.349.2024.05.08.08.04.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 08:04:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3205-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hXwCxvXb; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-nfs+bounces-3205-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3205-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 5F703B23A19 for ; Wed, 8 May 2024 14:50:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0363986278; Wed, 8 May 2024 14:50:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hXwCxvXb" X-Original-To: linux-nfs@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 A6D3D8287A for ; Wed, 8 May 2024 14:50:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715179816; cv=none; b=NFqImAyFkXwaifz+XDtV1RlH6gvk/XysfS8tALeyCqGFJwDvbMdBKRP3V+RdDLn29NAtvFEsHKp33vrYUn0AFPF3LPFtYIr0kwwOUFGZ5tBrHWtNydC0A7uquK58Su9dGGSuD/guTQBFRiFmh8UhKo0t9mZnc3EMRmwnAc8ZFgU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715179816; c=relaxed/simple; bh=NyogFZ9GnfO3gKszkmshJhpbFtjeGnLzEGjqPlJQIUg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=iKTxT5Gr91M1wbqOkiplle1gr3kuQqVKE5S6GhtTvxgF/wVB7m79Bg+aETKGeu4WErG0OfI8gDswMH+4vesS+mE0qQvm7gz8l1Pm4553PDFUfW2hHdeauFg6J/WMCA6rP59ggRqS664bSEfU0D6S2feVB57M7bMv60T/p6qJfHo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=hXwCxvXb; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715179813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YH4u3B+oNstpA0630mSi7iIt83wgfubLTmOB3rVS+Dc=; b=hXwCxvXbRUD1uHt8zslE+1+3TGP4R7TJlvlYJuDQggb37BjznAjtgkqsIvnYqsIOTVVORk 0OhCyOO5wCG3rpJTbyxMaVru7IIYOCRe0vDfujbGkksNoxG3UzTelUnw8fkcyAx+MwfU5n BJgz570TaZeoh1iA5c9ORQH+JoDR69Y= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-364-KEPbGa00O5iIBC8L-xyt3A-1; Wed, 08 May 2024 10:50:09 -0400 X-MC-Unique: KEPbGa00O5iIBC8L-xyt3A-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C2D333C025B7; Wed, 8 May 2024 14:50:08 +0000 (UTC) Received: from [192.168.37.1] (ovpn-0-6.rdu2.redhat.com [10.22.0.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B553B3C25; Wed, 8 May 2024 14:50:07 +0000 (UTC) From: Benjamin Coddington To: Olga Kornievskaia Cc: trond.myklebust@hammerspace.com, anna.schumaker@netapp.com, linux-nfs@vger.kernel.org Subject: Re: [PATCH 1/1] pNFS/filelayout: check layout segment range Date: Wed, 08 May 2024 10:50:06 -0400 Message-ID: <9D9DB9E5-E772-462B-BD38-7F703459A0FC@redhat.com> In-Reply-To: <20240507195933.45683-1-olga.kornievskaia@gmail.com> References: <20240507195933.45683-1-olga.kornievskaia@gmail.com> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 On 7 May 2024, at 15:59, Olga Kornievskaia wrote: > 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 Looks right, less duplication to just call pnfs_generic_pg_check_range() from pnfs_generic_pg_check_layout() now. Reviewed-by: Benjamin Coddington Ben