Re: [PATCH 2/3] NFS: Cleanup of the nfs_pageio code in preparation for a pnfs bugfix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2011-06-07 at 20:28 -0400, Benny Halevy wrote: 
> On 2011-06-06 18:32, Trond Myklebust wrote:
> > We need to ensure that the layouts are set up before we can decide to
> > coalesce requests. To do so, we want to further split up the struct
> > nfs_pageio_descriptor operations into an initialisation callback, a
> > coalescing test callback, and a 'do i/o' callback.
> > 
> > This patch cleans up the existing callback methods before adding the
> > 'initialisation' callback.
> > 
> > Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>
> > +
> >  static void nfs_pageio_init_write(struct nfs_pageio_descriptor *pgio,
> >  				  struct inode *inode, int ioflags)
> >  {
> >  	size_t wsize = NFS_SERVER(inode)->wsize;
> > +	const struct nfs_pageio_ops *ops;
> > +	ops = pnfs_get_write_ops(inode);
> > +	if (ops == NULL)
> > +		ops = &nfs_pageio_write_ops;
> >  
> > -	if (wsize < PAGE_CACHE_SIZE)
> > -		nfs_pageio_init(pgio, inode, nfs_flush_multi, wsize, ioflags);
> > -	else
> > -		nfs_pageio_init(pgio, inode, nfs_flush_one, wsize, ioflags);
> > +	nfs_pageio_init(pgio, inode, &nfs_pageio_write_ops, wsize, ioflags);
> 
> Trond, this should be:
> 	nfs_pageio_init(pgio, inode, ops, wsize, ioflags);
> 
> Benny

Yep. Fixed in the patch...

Thanks!
  Trond

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.com

--
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


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux