aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-bit.c
diff options
context:
space:
mode:
authorAlex Elder <[email protected]>2013-03-30 23:46:55 -0500
committerSage Weil <[email protected]>2013-05-01 21:17:40 -0700
commit56fc5659162965ce3018a34c6bb8a022f3a3b33c (patch)
treee3d774b9ff1a2cb3577b8e3c1ba127cba456345e /lib/mpi/mpi-bit.c
parent5df521b1eecf276c4bae8ffb7945acef45530449 (diff)
libceph: account for alignment in pages cursor
When a cursor for a page array data message is initialized it needs to determine the initial value for cursor->last_piece. Currently it just checks if length is less than a page, but that's not correct. The data in the first page in the array will be offset by a page offset based on the alignment recorded for the data. (All pages thereafter will be aligned at the base of the page, so there's no need to account for this except for the first page.) Because this was wrong, there was a case where the length of a piece would be calculated as all of the residual bytes in the message and that plus the page offset could exceed the length of a page. So fix this case. Make sure the sum won't wrap. This resolves a third issue described in: http://tracker.ceph.com/issues/4598 Signed-off-by: Alex Elder <[email protected]> Reviewed-by: Sage Weil <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions