From: Benny Halevy <bhalevy@tonian.com>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] NFS: Revert pnfs ugliness from the generic NFS read code path
Date: Mon, 14 Nov 2011 18:01:18 +0200 [thread overview]
Message-ID: <4EC13B4E.5040706@tonian.com> (raw)
In-Reply-To: <1321285777.2632.1.camel@lade.trondhjem.org>
On 2011-11-14 17:49, Trond Myklebust wrote:
> On Mon, 2011-11-14 at 13:12 +0200, Benny Halevy wrote:
>> On 2011-11-10 21:38, Trond Myklebust wrote:
>>> pNFS-specific code belongs in the pnfs layer. It should not be
>>> hijacking generic NFS read or write code paths.
>>>
>>> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
>>> ---
>>> fs/nfs/internal.h | 2 ++
>>> fs/nfs/pnfs.c | 26 +++++++++++++++++++++-----
>>> fs/nfs/read.c | 14 ++------------
>>> 3 files changed, 25 insertions(+), 17 deletions(-)
>>>
>>> diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
>>> index c1a1bd8..3f4d957 100644
>>> --- a/fs/nfs/internal.h
>>> +++ b/fs/nfs/internal.h
>>> @@ -299,6 +299,8 @@ extern void nfs_read_prepare(struct rpc_task *task, void *calldata);
>>> extern int nfs_generic_pagein(struct nfs_pageio_descriptor *desc,
>>> struct list_head *head);
>>>
>>> +extern void nfs_pageio_init_read_mds(struct nfs_pageio_descriptor *pgio,
>>> + struct inode *inode);
>>> extern void nfs_pageio_reset_read_mds(struct nfs_pageio_descriptor *pgio);
>>> extern void nfs_readdata_release(struct nfs_read_data *rdata);
>>>
>>> diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
>>> index baf7353..8e672a2 100644
>>> --- a/fs/nfs/pnfs.c
>>> +++ b/fs/nfs/pnfs.c
>>> @@ -1260,6 +1260,25 @@ pnfs_generic_pg_writepages(struct nfs_pageio_descriptor *desc)
>>> }
>>> EXPORT_SYMBOL_GPL(pnfs_generic_pg_writepages);
>>>
>>> +static void pnfs_ld_handle_read_error(struct nfs_read_data *data)
>>> +{
>>> + struct nfs_pageio_descriptor pgio;
>>> +
>>> + put_lseg(data->lseg);
>>> + data->lseg = NULL;
>>> + dprintk("pnfs write error = %d\n", data->pnfs_error);
>>
>> should be "read error", might as well fix this while you're at it :)
>
> Sure...
>
>>> +
>>> + nfs_pageio_init_read_mds(&pgio, data->inode);
>>> +
>>> + while (!list_empty(&data->pages)) {
>>> + struct nfs_page *req = nfs_list_entry(data->pages.next);
>>> +
>>> + nfs_list_remove_request(req);
>>> + nfs_pageio_add_request(&pgio, req);
>>> + }
>>
>> What about pgio.pg_recoalesce?
>
> It was incorrect to set it in the first place. This is an ordinary
> coalesce...
>
I see. Please just document that in the commit message...
Thanks,
Benny
prev parent reply other threads:[~2011-11-14 16:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-10 19:38 [PATCH] NFS: Revert pnfs ugliness from the generic NFS read code path Trond Myklebust
2011-11-14 11:12 ` Benny Halevy
2011-11-14 15:49 ` Trond Myklebust
2011-11-14 16:01 ` Benny Halevy [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=4EC13B4E.5040706@tonian.com \
--to=bhalevy@tonian.com \
--cc=Trond.Myklebust@netapp.com \
--cc=linux-nfs@vger.kernel.org \
/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