]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: trim copy-get backend read to object size 1535/head
authorSage Weil <sage@inktank.com>
Sat, 22 Mar 2014 22:39:26 +0000 (15:39 -0700)
committerSamuel Just <sam.just@inktank.com>
Wed, 26 Mar 2014 18:37:43 +0000 (11:37 -0700)
commit21fc535ea7284ad0db5d3430f81c08199e854988
treecd8f34e77ca99d7f7a37ea0e5e91176e91c881f0
parentf1a1ac8243550e17c3a587f50766781e97206e29
osd: trim copy-get backend read to object size

We are passing a big number to the backend to read and it is trimming it
to the stripe boundary, and then setting the cursor at a slightly smaller
offset bound by oi.size.  This is invalid, and will trigger an assert in
the _write_copy_chunk code:

     0> 2014-03-21 15:12:23.761509 7f8dd2324700 -1 osd/ReplicatedPG.cc: In function 'void ReplicatedPG::_write_copy_chunk(ReplicatedPG::CopyOpRef, PGBackend::PGTransaction*)' thread 7f8dd2324700 time 2014-03-21 15:12:23.758866
osd/ReplicatedPG.cc: 5554: FAILED assert(cop->data.length() + cop->temp_cursor.data_offset == cop->cursor.data_offset)

To fix this, trim the buffer to the correct length in the completion
context.

Fixes: #7823
Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/ReplicatedPG.cc