pcp
[Top] [All Lists]

Re: pmdagfs2: misc updates

To: Paul Evans <pevans@xxxxxxxxxx>
Subject: Re: pmdagfs2: misc updates
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Thu, 8 Aug 2013 22:17:08 -0400 (EDT)
Cc: PCP Mailing List <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <5203C1D1.7070703@xxxxxxxxxx>
References: <5203C1D1.7070703@xxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: w7DN9MED1atQRvvUiMZtvS4NXfNYbQ==
Thread-topic: pmdagfs2: misc updates
Hi Paul,

----- Original Message -----
> Changes committed to git://github.com/pauljevans/pcp.git dev
> 
>   qa/655.out                 |  1 +
>   src/pmdas/gfs2/help        | 74
> +++++++++++++++-------------------------------
>   src/pmdas/gfs2/lock_time.c |  4 +--
> ...
>      Extra check introduced in PMDA_CACHE_WALK to ensure return of only
> active
>      entries as glock data from the current call should be returned.

This change is not quite right - the code now does this:
if (!pmdaCacheLookup(glock_indom, j, NULL, (void **)&glock) || !glock || 
!PMDA_CACHE_ACTIVE)
so that final test (!PMDA_CACHE_ACTIVE) is against a constant, so can never
evaluate to true.  The !glock (and earlier !fs) checks also need tweaking -
these will never be null unless null is stored in the cache, which never
happens AIUI.

I've updated the code to behave the way this is usually handled - the Linux
kernel PMDA refresh_swapdev() code (pmdas/linux/swapdev.c) is an example of
somewhere else this stuff is done, as a reference.


Also, I updated pmdagfs2 yesterday to use the new hash-based PMID lookup
(see pmdaInit(3) for info), and refactored dynamic.c - please take a look
over those changes if you get a spare minute or two, any review comments
would be much appreciated.

cheers.

--
Nathan

<Prev in Thread] Current Thread [Next in Thread>