[pnfs] [PATCH 16/20] 2.6-latest update nfs4_pnfs_dserver_get
Dean Hildebrand
seattleplus at gmail.com
Mon Dec 3 16:16:23 EST 2007
William A. (Andy) Adamson wrote:
>
>
> On 12/2/07, *Dean Hildebrand* <seattleplus at gmail.com
> <mailto:seattleplus at gmail.com>> wrote:
>
>
> >
> > - /* For debugging */
> > tmp = offset + count - 1;
> > do_div(tmp, layout->stripe_unit);
> > - dbg_stripe_idx = do_div(tmp, layout->num_fh) +
> layout->first_stripe_index;
> > + end_idx = do_div(tmp, di->stripe_count) +
> layout->first_stripe_index;
> >
> > - dprintk("%s: offset=%Lu, count=%u, si=%u, dsi=%u, "
> > - "num_devs=%u, stripe_unit=%Lu\n",
> > - __FUNCTION__,
> > - offset, count, stripe_idx, dbg_stripe_idx,
> layout->num_fh,
> > - layout->stripe_unit);
> > + dprintk("%s: offset=%Lu, count=%Zu, si=%u, dsi=%u, "
> > + "stripe_count=%u, stripe_unit=%Lu
> first_stripe_index %d\n",
> > + __FUNCTION__,
> > + offset, count, stripe_idx, end_idx, di->stripe_count,
> > + layout->stripe_unit, layout->first_stripe_index);
> >
> > - BUG_ON(dbg_stripe_idx != stripe_idx);
> > + BUG_ON(end_idx != stripe_idx);
> >
>
> Since we are going through the code, isn't a bug_on too harsh for
> this
> error? Do we still want this debugging code? If so, maybe we should
> make it just return an error.
>
>
> something to consider - i'm following benny's suggestion of not
> changing too much,
> just port forward.
>
> this code will dramatically change as we move to draft-17 (18, 19??).
Dramatically change? How dramatic could it be after the last move to
draft-13? Has the file layout really changed so much?
Dean
>
> -->Andy
>
> Dean
>
> >
> > - /* TODO: rewrite this function!
> > - dserver->dev = nfs4_pnfs_device_get(inode, layout->dev_id,
> stripe_idx);
> > + dserver->dev = &di->stripe_devs[stripe_idx];
> > if (dserver->dev == NULL)
> > return 1;
> > - */
> > - dserver->fh = &layout->fh_array[stripe_idx];
> > + if (layout->num_fh == 1)
> > + dserver->fh = &layout->fh_array[0];
> > + else
> > + dserver->fh = &layout->fh_array[stripe_idx];
> >
> > - dprintk("%s: dev_id=%u, idx=%u, offset=%Lu, count=%u\n",
> > - __FUNCTION__, layout->dev_id, stripe_idx,
> offset, count);
> > + dprintk("%s: dev_id=%u, idx=%u, offset=%Lu, count=%Zu\n",
> > + __FUNCTION__, layout->dev_id, stripe_idx, offset,
> count);
> >
> > return 0;
> > +
> > }
> >
> > /* Currently not used.
> >
> _______________________________________________
> pNFS mailing list
> pNFS at linux-nfs.org <mailto:pNFS at linux-nfs.org>
> http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs
>
>
More information about the pNFS
mailing list