All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Tao <bergwolf@gmail.com>
To: Boaz Harrosh <bharrosh@panasas.com>
Cc: Benny Halevy <benny@tonian.com>,
	linux-nfs@vger.kernel.org, Peng Tao <peng_tao@emc.com>
Subject: Re: [PATCH 2/5] pNFS: recoalesce when ld read pagelist fails
Date: Thu, 11 Aug 2011 08:01:07 +0800	[thread overview]
Message-ID: <CA+a=Yy4K5qSW2BW++XV8aNd9z_xRonvGJr1D+TyE_Z2XW8JtRg@mail.gmail.com> (raw)
In-Reply-To: <4E42C5F9.50807@panasas.com>

On Thu, Aug 11, 2011 at 1:55 AM, Boaz Harrosh <bharrosh@panasas.com> wr=
ote:
> On 08/06/2011 07:53 PM, Peng Tao wrote:
>> For pnfs pagelist read failure, we need to pg_recoalesce and resend
>> IO to mds.
>>
>> Signed-off-by: Peng Tao <peng_tao@emc.com>
>> ---
>> =C2=A0fs/nfs/internal.h | =C2=A0 =C2=A02 ++
>> =C2=A0fs/nfs/pnfs.c =C2=A0 =C2=A0 | =C2=A0 18 ++++++++++++++----
>> =C2=A0fs/nfs/read.c =C2=A0 =C2=A0 | =C2=A0 =C2=A03 ++-
>> =C2=A03 files changed, 18 insertions(+), 5 deletions(-)
>>
>> diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
>> index 62f183d..78b662e 100644
>> --- a/fs/nfs/internal.h
>> +++ b/fs/nfs/internal.h
>> @@ -307,6 +307,8 @@ extern int nfs_generic_flush(struct nfs_pageio_d=
escriptor *desc,
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct list_head *h=
ead);
>> =C2=A0extern int do_nfs_writepage(struct page *page, struct writebac=
k_control *wbc,
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct nfs_pageio_d=
escriptor *pgio);
>> +extern void nfs_pageio_init_read_mds(struct nfs_pageio_descriptor *=
pgio,
>> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct inode *inode);
>> =C2=A0extern void nfs_pageio_init_write_mds(struct nfs_pageio_descri=
ptor *pgio,
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct inode *inode=
, int ioflags);
>> =C2=A0extern void nfs_pageio_reset_write_mds(struct nfs_pageio_descr=
iptor *pgio);
>> diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
>> index 08aba45..66fc854 100644
>> --- a/fs/nfs/pnfs.c
>> +++ b/fs/nfs/pnfs.c
>> @@ -1300,7 +1300,7 @@ EXPORT_SYMBOL_GPL(pnfs_generic_pg_writepages);
>> =C2=A0int
>> =C2=A0pnfs_ld_read_done(struct nfs_read_data *data)
>> =C2=A0{
>> - =C2=A0 =C2=A0 int status;
>> + =C2=A0 =C2=A0 struct nfs_pageio_descriptor pgio;
>>
>> =C2=A0 =C2=A0 =C2=A0 if (!data->pnfs_error) {
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 __nfs4_read_done_cb=
(data);
>> @@ -1309,11 +1309,21 @@ pnfs_ld_read_done(struct nfs_read_data *data=
)
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return 0;
>> =C2=A0 =C2=A0 =C2=A0 }
>>
>> + =C2=A0 =C2=A0 put_lseg(data->lseg);
>> + =C2=A0 =C2=A0 data->lseg =3D NULL;
>> =C2=A0 =C2=A0 =C2=A0 dprintk("%s: pnfs_error=3D%d, retry via MDS\n",=
 __func__,
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 data->pnfs_error);
>> - =C2=A0 =C2=A0 status =3D nfs_initiate_read(data, NFS_CLIENT(data->=
inode),
>> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0data->mds_ops);
>> - =C2=A0 =C2=A0 return status ? : -EAGAIN;
>> + =C2=A0 =C2=A0 nfs_pageio_init_read_mds(&pgio, data->inode);
>> + =C2=A0 =C2=A0 pgio.pg_recoalesce =3D 1;
>> + =C2=A0 =C2=A0 while (!list_empty(&data->pages)) {
>> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct nfs_page *req =3D=
 nfs_list_entry(data->pages.next);
>> +
>> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 nfs_pageio_add_request(&=
pgio, req);
>> + =C2=A0 =C2=A0 }
>> + =C2=A0 =C2=A0 nfs_pageio_complete(&pgio);
>> + =C2=A0 =C2=A0 nfs_readdata_release(data);
>> +
>> + =C2=A0 =C2=A0 return 0;
>> =C2=A0}
>> =C2=A0EXPORT_SYMBOL_GPL(pnfs_ld_read_done);
>>
>> diff --git a/fs/nfs/read.c b/fs/nfs/read.c
>> index 2171c04..2484131 100644
>> --- a/fs/nfs/read.c
>> +++ b/fs/nfs/read.c
>> @@ -112,12 +112,13 @@ static void nfs_readpage_truncate_uninitialise=
d_page(struct nfs_read_data *data)
>> =C2=A0 =C2=A0 =C2=A0 }
>> =C2=A0}
>>
>> -static void nfs_pageio_init_read_mds(struct nfs_pageio_descriptor *=
pgio,
>> +void nfs_pageio_init_read_mds(struct nfs_pageio_descriptor *pgio,
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct inode *inode=
)
>> =C2=A0{
>> =C2=A0 =C2=A0 =C2=A0 nfs_pageio_init(pgio, inode, &nfs_pageio_read_o=
ps,
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 NFS_SERVER(inode)->rsize, 0);
>> =C2=A0}
>> +EXPORT_SYMBOL_GPL(nfs_pageio_init_read_mds);
>>
>
> Here to. Who is the user of this export?
Will remove it. Thanks.

>
> Boaz
>
>> =C2=A0void nfs_pageio_reset_read_mds(struct nfs_pageio_descriptor *p=
gio)
>> =C2=A0{
>
>



--=20
Thanks,
-Bergwolf

  reply	other threads:[~2011-08-11  0:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-07  2:53 [PATCH 1/5] pNFS: recoalesce when ld write pagelist fails Peng Tao
2011-08-07  2:53 ` [PATCH 2/5] pNFS: recoalesce when ld read " Peng Tao
2011-08-10 17:55   ` Boaz Harrosh
2011-08-11  0:01     ` Peng Tao [this message]
2011-08-07  2:53 ` [PATCH 3/5] pnfs: introduce pnfs private workqueue Peng Tao
2011-08-10 18:12   ` Boaz Harrosh
2011-08-10 18:21     ` Boaz Harrosh
2011-08-11  0:00       ` Peng Tao
2011-08-07  2:53 ` [PATCH 4/5] SUNRPC/NFS: make rpc pipe upcall generic Peng Tao
2011-08-10 15:59   ` Jim Rees
2011-08-07  2:53 ` [PATCH 5/5] pnfs: make _set_lo_fail generic Peng Tao
2011-08-10 17:52 ` [PATCH 1/5] pNFS: recoalesce when ld write pagelist fails Boaz Harrosh
2011-08-11  0:03   ` Peng Tao
2011-08-11 18:53     ` Boaz Harrosh
2011-08-11 23:53       ` Peng Tao
2011-08-12  0:10         ` Boaz Harrosh
2011-08-12  2:07           ` tao.peng
2011-08-16  7:20           ` tao.peng
2011-08-16 20:19             ` Boaz Harrosh
2011-08-17  9:44               ` Peng Tao
2011-08-22 23:28                 ` Boaz Harrosh

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='CA+a=Yy4K5qSW2BW++XV8aNd9z_xRonvGJr1D+TyE_Z2XW8JtRg@mail.gmail.com' \
    --to=bergwolf@gmail.com \
    --cc=benny@tonian.com \
    --cc=bharrosh@panasas.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=peng_tao@emc.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.