> -----Original Message----- > From: linux-nfs-owner@xxxxxxxxxxxxxxx [mailto:linux-nfs-owner@xxxxxxxxxxxxxxx] > On Behalf Of Boaz Harrosh > Sent: Friday, September 23, 2011 1:22 PM > To: Jim Rees > Cc: Trond Myklebust; linux-nfs@xxxxxxxxxxxxxxx; peter honeyman > Subject: Re: [PATCH 06/10] pnfsblock: init pg_bsize properly > > On 09/23/2011 04:50 AM, Jim Rees wrote: > > From: Peng Tao <bergwolf@xxxxxxxxx> > > > > pg_bsize is server->wsize/rsize by default. We would want to use the lseg > > length. > > > > Signed-off-by: Peng Tao <peng_tao@xxxxxxx> > > Signed-off-by: Jim Rees <rees@xxxxxxxxx> > > 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. If I remember correctly, this patch should be dropped and Jim is working on a replacement, no? http://www.spinics.net/lists/linux-nfs/msg23596.html Cheers, Tao > > 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, > > }; > > -- > To unsubscribe from this list: send the line "unsubscribe linux-nfs" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html ��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥