All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: Jim Rees <rees@umich.edu>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
	<linux-nfs@vger.kernel.org>,
	peter honeyman <honey@citi.umich.edu>
Subject: Re: [PATCH 06/10] pnfsblock: init pg_bsize properly
Date: Fri, 23 Sep 2011 08:21:42 +0300	[thread overview]
Message-ID: <4E7C1766.1080501@panasas.com> (raw)
In-Reply-To: <1316742617-14766-7-git-send-email-rees@umich.edu>

On 09/23/2011 04:50 AM, Jim Rees wrote:
> From: Peng Tao <bergwolf@gmail.com>
> 
> pg_bsize is server->wsize/rsize by default. We would want to use the lseg
> length.
> 
> Signed-off-by: Peng Tao <peng_tao@emc.com>
> Signed-off-by: Jim Rees <rees@umich.edu>

If you want to get lazy about this patch and take the easy way out.
The least you can do is supply the same fix to that other place
that has the same bug.

This is not nice. You have identified a deficiency in the generic
layer, You know that objects would have the same bug, (because I told you)
and you just don't care. I have spent plenty of times slaving over
blocks code when changing or fixing generic layer. (And Benny even more
then me)

And when you will actually send a patch that does exactly the same in
two places, which access only generic members, you might see that it
might be better to fix it in a single place at the generic layer.

NACK. I'm ok with getting lazy like below, but only if you also
add the same code to objio_osd.c

Sigh
Boaz

> ---
>  fs/nfs/blocklayout/blocklayout.c |   20 ++++++++++++++++++--
>  1 files changed, 18 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
> index 2167ba2..f5a7fa6 100644
> --- a/fs/nfs/blocklayout/blocklayout.c
> +++ b/fs/nfs/blocklayout/blocklayout.c
> @@ -923,14 +923,30 @@ bl_clear_layoutdriver(struct nfs_server *server)
>  	return 0;
>  }
>  
> +static void bl_pg_init_read(struct nfs_pageio_descriptor *pgio,
> +			    struct nfs_page *req)
> +{
> +	pnfs_generic_pg_init_read(pgio, req);
> +	if (pgio->pg_lseg)
> +		pgio->pg_bsize = pgio->pg_lseg->pls_range.length;
> +}
> +
> +static void bl_pg_init_write(struct nfs_pageio_descriptor *pgio,
> +			     struct nfs_page *req)
> +{
> +	pnfs_generic_pg_init_write(pgio, req);
> +	if (pgio->pg_lseg)
> +		pgio->pg_bsize = pgio->pg_lseg->pls_range.length;
> +}
> +
>  static const struct nfs_pageio_ops bl_pg_read_ops = {
> -	.pg_init = pnfs_generic_pg_init_read,
> +	.pg_init = bl_pg_init_read,
>  	.pg_test = pnfs_generic_pg_test,
>  	.pg_doio = pnfs_generic_pg_readpages,
>  };
>  
>  static const struct nfs_pageio_ops bl_pg_write_ops = {
> -	.pg_init = pnfs_generic_pg_init_write,
> +	.pg_init = bl_pg_init_write,
>  	.pg_test = pnfs_generic_pg_test,
>  	.pg_doio = pnfs_generic_pg_writepages,
>  };


  reply	other threads:[~2011-09-23  5:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-23  1:50 [PATCH 00/10] pnfsblock fixes for 3.2 Jim Rees
2011-09-23  1:50 ` [PATCH 01/10] pnfsblock: fix return code confusion Jim Rees
2011-09-23  1:50 ` [PATCH 02/10] pnfsblock: fix size of upcall message Jim Rees
2011-09-23  1:50 ` [PATCH 03/10] SUNRPC/NFS: make rpc pipe upcall generic Jim Rees
2011-09-23  1:50 ` [PATCH 04/10] pnfsblock: add missing rpc_put_mount and path_put Jim Rees
2011-09-23  1:50 ` [PATCH 05/10] pnfs: make _set_lo_fail generic Jim Rees
2011-09-23  1:50 ` [PATCH 06/10] pnfsblock: init pg_bsize properly Jim Rees
2011-09-23  5:21   ` Boaz Harrosh [this message]
2011-09-23  5:55     ` tao.peng
2011-09-23  8:55       ` Boaz Harrosh
2011-09-23 12:22     ` Jim Rees
2011-09-23  1:50 ` [PATCH 07/10] pnfs: recoalesce when ld write pagelist fails Jim Rees
2011-09-23  1:50 ` [PATCH 08/10] pnfs: recoalesce when ld read " Jim Rees
2011-09-23  1:50 ` [PATCH 09/10] pnfsblock: fix NULL pointer dereference Jim Rees
2011-09-23  1:50 ` [PATCH 10/10] pnfsblock: fix writeback deadlock Jim Rees

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=4E7C1766.1080501@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=honey@citi.umich.edu \
    --cc=linux-nfs@vger.kernel.org \
    --cc=rees@umich.edu \
    /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.