[pnfs] [PATCH 01/18] pnfs: initialize pageio for read

William A. (Andy) Adamson andros at citi.umich.edu
Tue Jan 8 09:49:46 EST 2008


yep - thanks!

-->Andy

On 1/8/08, Benny Halevy <bhalevy at panasas.com> wrote:
>
> On Jan. 07, 2008, 22:47 +0200, andros at umich.edu wrote:
> <snip>
> > +void
> >  pnfs_set_pg_test(struct inode *inode, struct nfs_pageio_descriptor
> *pgio)
> >  {
> >       struct pnfs_layout_type *laytype;
> > -     struct layoutdriver_policy_operations *policy_ops;
> >       struct pnfs_layoutdriver_type *ld;
> >
> > +     pgio->pg_test = NULL;
> > +
> >       laytype = NFS_I(inode)->current_layout;
> >       ld = NFS_SERVER(inode)->pnfs_curr_ld;
> >       if (!pnfs_enabled_sb(NFS_SERVER(inode)) || !laytype)
> >               return;
> > -     policy_ops = ld->ld_policy_ops;
> >
> > -     if (policy_ops && policy_ops->pg_test) {
> > -             pgio->pg_test = policy_ops->pg_test;
> > -     } else {
> > -             pgio->pg_test = NULL;
> > -     }
> > +     if (ld->ld_policy_ops && ld->ld_policy_ops->pg_test)
>
> Actually, the right hand of the comparison above isn't really needed...
> just do the assignment below and if ld->ld_policy_ops->pg_test is NULL
> pgio->pg_test will remain NULL.
>
> > +             pgio->pg_test = ld->ld_policy_ops->pg_test;
> >  }
> >
>
> _______________________________________________
> pNFS mailing list
> pNFS at linux-nfs.org
> http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://linux-nfs.org/pipermail/pnfs/attachments/20080108/40e87c34/attachment.htm 


More information about the pNFS mailing list