[Ocfs2-tools-devel] [PATCH 1/1] o2hbmonitor: Disk heartbeat monitor

Srinivas Eeda srinivas.eeda at oracle.com
Fri Oct 29 18:52:31 PDT 2010


On 10/27/2010 10:35 AM, Sunil Mushran wrote:
>> +    while ((isspace(*p) || *p == '\n') && len--)
>>
>> Also there is a corner bug when the target string was nothing but all
>> consists of whitespaces:when the 'len' reaches 0, '*p' is actually
>> accessing the invalid byte which is ahead of string address. it should be:
>>
>> +    while ((len--) && (isspace(*p) || (*p == '\n')))
>>     
>
> Yes. Make sure Srini fixes this. ;)
>   
made this change
> A monitor for a monitor is classic over-engineering. If open/read/readdir
> are failing, it assumes that the cluster is not up or debugfs is not mounted.
> Occam's Razor. If former, try again after some timeout. If latter, print
> a discreet message.
>
> We don't want multiple o2hbmonitors running. Easy to do using a semaphore.
> I have left that for Srini. ;)
>   
is there any naming convention for creating a semaphore? Is the 
following fine?
key=(key_t)o2cb_crc32("o2hbmonitor")
ret=semget(key, 2, IPC_CREAT);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-tools-devel/attachments/20101029/55e42cc3/attachment.html 


More information about the Ocfs2-tools-devel mailing list