Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp692419lqo; Wed, 8 May 2024 11:42:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWz69MK6KgsjKS54oEWzrGuVlN9KpftU+XwFubq8HME1FzwDcMQZYX2WM0EBnPz9UxQvgZNtlbY6Qo7RUiPkdJt/DrXYLFPtVoj9CiaSg== X-Google-Smtp-Source: AGHT+IEqXdDWwPQ5Du2Ws5P5mBf1gzANYfxZB1G+p+UZ8ARi7EN0MPfFWWbk5SyobejyuIvyjawn X-Received: by 2002:a17:902:8ec3:b0:1e0:e85f:3882 with SMTP id d9443c01a7336-1eeb06980efmr32353295ad.38.1715193744091; Wed, 08 May 2024 11:42:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715193744; cv=pass; d=google.com; s=arc-20160816; b=zwcOtvA6dqSIR1AIVgs//uRnBCB4u1HZOtfrmoypp51tCKaLqQ2ILOCfuDLRPr98EN OcKSbe20zHIa3YaePsg7fQG+IBlMQ0G3ResS138bzoyqwxojjf/0r+HybcVFjiowSRE4 2OJix3RWRb/ivg1jr6+6npYPnRCM5DT/v3TTnCFmWSz0traJWNWFtqORnPuSrBqTmNuJ zKRcKzuFwLYyLkeYZO82bTXGPQYWdYFaxRLtqcIUyVCpKm6GCl3sZVMNQGJKfOb91WmF WQwg+E92yM6ZpAepNi/Rm/3PNQ42lb2t+3XsTH+aPn7JOgbLoXlCAefKNDUS1pRBolOL qXaw== 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=bL0EjI2dQeSOH83oHnaf1GJRQWnFFLnWwURRR5TuDx4=; fh=0wydizkD8dPQ63D7nDvTxluUQmda5nbvB3J4lDrV2hU=; b=UPWtcxUIqWE8p6qrfeIxT1zS2A+ve1y0WCZSSFfrZG7RzGWALSo8OfLzxn0sknLgA9 iPIGZZPszPMbpK5MFwAEdmyMHirlo1xccjbjHw4UX3GHwQnM0s8bfrIpQcpnboGmcRLD HxgPUeMtiQIX70zBWWzyMHmy6Ce8lNG0zlwbd9Jm/YzLcO540sZcJj+V4CP+7iuv6V5H NYE9qi0Ria+v5YXOAfdbzZ6Ueos2Ff7QMZLrcadq5W316C2h9MYUQ3fxWuN8hYxVoeBC DBfPFMT+XDUesjveXz9OL3geJmDeuCjtxlsPwrSj26yQ/Va//0OmNnOIdd0UJ6RQHreC 1ZMQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PD1liXR8; 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-3215-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3215-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id mf15-20020a170902fc8f00b001eabd90c43fsi12718309plb.157.2024.05.08.11.42.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 11:42:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3215-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=@redhat.com header.s=mimecast20190719 header.b=PD1liXR8; 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-3215-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3215-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C594828BDD2 for ; Wed, 8 May 2024 18:33:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CE66A523D; Wed, 8 May 2024 18:33:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PD1liXR8" X-Original-To: linux-nfs@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 3D123B646 for ; Wed, 8 May 2024 18:33:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715193234; cv=none; b=k33LbPI8KEOflYT5Q9MrvS5PiTvpKGkWCQpusDUlB41jrVq55/HykjYB3WcDBWR6f8p0vAU13Lg1KzWq/mj0XH5WpPz5QG8AljjQRza+bJfWpcARHUHL54LnFsmT1vpS1bI5Fyqveox51W/nTOUFNZuX0/+e0A+pYXHJOAWEV88= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715193234; c=relaxed/simple; bh=g+HqJ1CUvm4VzzbLp0xkPWXNOPb0l89O8Jev7OdD3Bw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=X6kGzUe0KU4m3Tzz4/+mau1fiGm1ioo6I1/JYQtd2BNMKrKfNv1e32Prn5F1bwA84Kip1bBYEQ7tfTKcIe8xPlomNMhBdDnGI3IrK9etl8+Sn7Fdo7UThdauhjJYjfpXXBXNJO7u9mCKen+wFyqaEBSjwQ1A+W+IusnfNMhYJx8= 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=PD1liXR8; arc=none smtp.client-ip=170.10.129.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=1715193232; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bL0EjI2dQeSOH83oHnaf1GJRQWnFFLnWwURRR5TuDx4=; b=PD1liXR8Yjz1tf9fzv+uXFF+bhJwM1p+pfvZdnaEAkHoHsnOgLYr+Am8K/6Ch1IqjjnSuy sT9HssgI5dgOtd9Bl6I2Jk2AiSrZZvXz2aZ8YCiDgtAAbo2Hgrq2h1aJuT5ONj0xiIsUsQ drbve2F6rFECU2Vnb7UCxzUDqfJ5mUo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-357-0HIehfqKMwOjNE2z5757Xg-1; Wed, 08 May 2024 14:33:49 -0400 X-MC-Unique: 0HIehfqKMwOjNE2z5757Xg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 99290185A78E; Wed, 8 May 2024 18:33:48 +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 984741C060AE; Wed, 8 May 2024 18:33:47 +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: fixup pNfs allocation modes Date: Wed, 08 May 2024 14:33:46 -0400 Message-ID: In-Reply-To: References: <20240507151545.26888-1-olga.kornievskaia@gmail.com> <35158E21-2724-4C1A-950F-5A6A616C862A@redhat.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; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 On 8 May 2024, at 13:13, Olga Kornievskaia wrote: > On Wed, May 8, 2024 at 11:25=E2=80=AFAM Benjamin Coddington wrote: >> >> On 7 May 2024, at 11:15, Olga Kornievskaia wrote: >> >>> From: Olga Kornievskaia >>> >>> Change left over allocation flags. >>> >>> Fixes: a245832aaa99 ("pNFS/files: Ensure pNFS allocation modes are co= nsistent with nfsiod") >>> Signed-off-by: Olga Kornievskaia >>> --- >>> fs/nfs/filelayout/filelayout.c | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filel= ayout.c >>> index cc2ed4b5a4fd..85d2dc9bc212 100644 >>> --- a/fs/nfs/filelayout/filelayout.c >>> +++ b/fs/nfs/filelayout/filelayout.c >>> @@ -875,7 +875,7 @@ filelayout_pg_init_read(struct nfs_pageio_descrip= tor *pgio, >>> req->wb_bytes, >>> IOMODE_READ, >>> false, >>> - GFP_KERNEL); >>> + nfs_io_gfp_mask()= ); >>> if (IS_ERR(pgio->pg_lseg)) { >>> pgio->pg_error =3D PTR_ERR(pgio->pg_lseg); >>> pgio->pg_lseg =3D NULL; >>> @@ -899,7 +899,7 @@ filelayout_pg_init_write(struct nfs_pageio_descri= ptor *pgio, >>> req->wb_bytes, >>> IOMODE_RW, >>> false, >>> - GFP_NOFS); >>> + nfs_io_gfp_mask()= ); >>> if (IS_ERR(pgio->pg_lseg)) { >>> pgio->pg_error =3D PTR_ERR(pgio->pg_lseg); >>> pgio->pg_lseg =3D NULL; >>> -- >>> 2.39.1 >> >> Looks fine, but I didn't think you could get here from rpciod/nfsiod >> context. I might be missing something, how did you get here from ther= e? > > I have to admit I don't fully understand (if at all) the implications > of having the wrong flags. I also don't follow what you mean by this > code not being executed by the rpciod/nfsiod context. This code is > done while doing (buffered) IO and performed by the rpciod context? I was thrown off by the Fixes: tag. The nfs_io_gfp_mask() doesn't have to= do with that context per se, but rather if we're in writeback due to memory pressure. That's what the PF_WQ_WORKER check is for which Trond explains= this commit 515dcdcd4873. > In truth I was making it consistent with what flexfiles is doing for > their pnfs_update_layout() usage. Gotcha, makes sense to me now, thanks for helping me. FWIW: Reviewed-by: Benjamin Coddington Ben