[Openais] possibly bug in saCkptCheckpointRead()

Steven Dake sdake at mvista.com
Tue Jul 26 10:58:08 PDT 2005


On Tue, 2005-07-26 at 13:14 -0300, Maxi Combina wrote:
> Hi all!
> I am using openais-0.66, and I think that there is a strange behaviour
> in the saCkptCheckpointRead() function.
> According to SAF (documentation of the Read() function):
> 
> "readSize - [out] Used by saCkptCheckpointRead() to record the number of
> bytes of data that have been read; otherwise, this field is not used."
> 
> readSize is a field of SaCkptIOVectorElementT.
> 
> So, watching to the value of this field is a good idea for testing if
> the ckpt service has read the requested amount of bytes...
> 
> However, I have modified a little an example of the `test' folder of
> openais-0.66 (ckpt-wr.c), and when I read, for instance, 10 bytes from
> the checkoint that I opened, readSize is _not_ 10: it has the value
> 51674588464.
> I have not found _any_ test that watchs the readSize value after a
> Read(), and have not either found nothing in the documentation.
> 
> 
> The questions are:
> 1.- Have I missunderstood the SAF? Or is this bug of openais?

thanks for the bug report.  this is a bug in openais.  I'll post a patch
today.

> 2.- If I did not understand the SAF correctly, which is the way to
> ensure that Read() has effectively read the requested amount of bytes?
> (indicated in the field `dataSize')
> 
openais will read as much of the checkpoint as is available.  I suspect
the only time datasize could be shorter then the read request is when an
offset is read on a small checkpoint with a larger buffer.

regards
-steve

> Regards, 
> Maxi




More information about the Openais mailing list