Re: [Linux-cluster] Is this intentional: specifying a new completion ast routine on a convert

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

 



On Wed, Jul 28, 2004 at 12:54:45PM -0400, Jeff wrote:
> Wednesday, July 28, 2004, 12:49:48 PM, Jeff wrote:
> 
> > This is from device.c. The intent seems to
> > be that if an argument is specified, then it overrides
> > an existing value. However, a new completion ast address
> > is only loaded if a new blocking ast address is specified.
> 
> >         if (kparams->flags & DLM_LKF_CONVERT) {
> >                 struct dlm_lkb *lkb =
> > dlm_get_lkb(fi->fi_ls->ls_lockspace, kparams->lkid);
> >                 if (!lkb) {
> >                         return -EINVAL;
> >                 }
> >                 li = (struct lock_info *)lkb->lkb_astparam;
> 
> >                 /* Only override these if they are provided */
> >                 if (li->li_user_lksb)
> >                         li->li_user_lksb = kparams->lksb;
> >                 if (li->li_astparam)
> >                         li->li_astparam  = kparams->astparam;
> >                 if (li->li_bastaddr)
> >                         li->li_bastaddr  = kparams->bastaddr;
> --->>            if (li->li_bastaddr)
> --->>                    li->li_astaddr   = kparams->astaddr;
> >                 li->li_flags     = 0;
> >         }
> 
> Looking at this again, shouldn't it be testing kparams-> in
> the if() rather than li->*? The current code seems to write new
> values if there were old ones as opposed to if new values
> are specified.

er, yes it looks like it. I'll check in a fix when I get back home.

-- 

patrick


[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux