From: Benjamin Coddington <bcodding@redhat.com>
To: Olga Kornievskaia <olga.kornievskaia@gmail.com>
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 [thread overview]
Message-ID: <B3A3E63F-E8E4-4B59-B833-7D1BE8938F52@redhat.com> (raw)
In-Reply-To: <CAN-5tyGNaWsfxo0dCGc+hW36Q9jSZXaQZgvHTOw5gGQ_HDxFqw@mail.gmail.com>
On 8 May 2024, at 13:13, Olga Kornievskaia wrote:
> On Wed, May 8, 2024 at 11:25 AM Benjamin Coddington <bcodding@redhat.com> wrote:
>>
>> On 7 May 2024, at 11:15, Olga Kornievskaia wrote:
>>
>>> From: Olga Kornievskaia <kolga@netapp.com>
>>>
>>> Change left over allocation flags.
>>>
>>> Fixes: a245832aaa99 ("pNFS/files: Ensure pNFS allocation modes are consistent with nfsiod")
>>> Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
>>> ---
>>> 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/filelayout.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_descriptor *pgio,
>>> req->wb_bytes,
>>> IOMODE_READ,
>>> false,
>>> - GFP_KERNEL);
>>> + nfs_io_gfp_mask());
>>> if (IS_ERR(pgio->pg_lseg)) {
>>> pgio->pg_error = PTR_ERR(pgio->pg_lseg);
>>> pgio->pg_lseg = NULL;
>>> @@ -899,7 +899,7 @@ filelayout_pg_init_write(struct nfs_pageio_descriptor *pgio,
>>> req->wb_bytes,
>>> IOMODE_RW,
>>> false,
>>> - GFP_NOFS);
>>> + nfs_io_gfp_mask());
>>> if (IS_ERR(pgio->pg_lseg)) {
>>> pgio->pg_error = PTR_ERR(pgio->pg_lseg);
>>> pgio->pg_lseg = 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 there?
>
> 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 <bcodding@redhat.com>
Ben
prev parent reply other threads:[~2024-05-08 18:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-07 15:15 [PATCH 1/1] pNFS/filelayout: fixup pNfs allocation modes Olga Kornievskaia
2024-05-08 15:25 ` Benjamin Coddington
2024-05-08 17:13 ` Olga Kornievskaia
2024-05-08 18:33 ` Benjamin Coddington [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B3A3E63F-E8E4-4B59-B833-7D1BE8938F52@redhat.com \
--to=bcodding@redhat.com \
--cc=anna.schumaker@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=olga.kornievskaia@gmail.com \
--cc=trond.myklebust@hammerspace.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).