- Description has changed:
Diff:
~~~~
--- old
+++ new
@@ -1,4 +1,3 @@
-
Their is a limitation in Leap ncs_os_posix_shm() function
As the "maxSectionSize" defined in CKPT is of "SaUint64T" type and the
"offset" which
is been derived from "+maxSectionSize" should also align to "uint64_t" type.
~~~~
- **status**: unassigned --> review
---
** [tickets:#1271] leap : align attr of leap ncs_os_posix_shm() to uint64_t**
**Status:** review
**Milestone:** 4.7-Tentative
**Created:** Thu Mar 19, 2015 03:53 AM UTC by A V Mahesh (AVM)
**Last Updated:** Thu Mar 19, 2015 06:23 AM UTC
**Owner:** Ramesh
Their is a limitation in Leap ncs_os_posix_shm() function
As the "maxSectionSize" defined in CKPT is of "SaUint64T" type and the "offset"
which
is been derived from "+maxSectionSize" should also align to "uint64_t" type.
>> The memory allocation for the checkpoint:
>>
>>
>>
>> CKPT_HEADER + MAXSECTION*(SECTIONSIZE + SECTIONHEADER)
>>
>>
>>
>> |---------------|------------ |--------------
>> |------------|-------------|--- -------|-------------|-------------|
>>
>> | CKPT_HDR | SEC_HDR | SEC_INFO |SEC_HDR | SEC_INFO |.............|
>> SEC_HDR |SEC_INFO |
>>
>> |---------------|------------ |--------------
>> |------------|-------------|--- -------|-------------|-------------|
>>
>>
>>
>> The checkpoint section is read base on checkpoint pointer. For example: we
>> need to read data from checkpoint section 5000.
>>
>>
>>
>> Then it will get checkpoint + checkpoint section offset. The checkpoint
>> section offset in this case is 4999*(SECTIONSIZE + SECTIONHEADER). If the
>> section size is 2MB, is it overflow?
>>
>>
>>
>> i_offset datatype is int32_t.
>>
>>
>>
>> while (counter < ckpt_hdr.n_secs) {
>>
>> memset(&read_req, '\0',
>> sizeof(NCS_OS_POSIX_SHM_REQ_INFO));
>>
>> memset(§_hdr, '\0',
>> sizeof(CPSV_SECT_HDR));
>>
>> read_req.type =
>> NCS_OS_POSIX_SHM_REQ_READ;
>>
>> read_req.info.read.i_addr =
>> (void *)((char *)open_req->info.open.o_addr + sizeof(CPSV_CKPT_HDR));
>>
>> read_req.info.read.i_read_size =
>> sizeof(CPSV_SECT_HDR);
>>
>> read_req.info.read.i_offset =
>>
>> counter *
>> (sizeof(CPSV_SECT_HDR) + (*cp_node)->create_attrib.maxSectionSize);
>>
>> read_req.info.read.i_to_buff =
>> (CPSV_SECT_HDR *)§_hdr;
>>
>> rc = ncs_os_posix_shm(&read_req);
>>
>> if (rc != NCSCC_RC_SUCCESS) {
>>
>>
>> LOG_ER("cpnd sect HDR read failed");
>>
>> /*
>> assert(0); */
>>
>> return rc;
>>
>> }
>>
>> …
>>
>> }
>>
---
Sent from sourceforge.net because [email protected] is
subscribed to https://sourceforge.net/p/opensaf/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a
mailing list, you can unsubscribe from the mailing list.------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets