]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: fix journaler to set temp_fetch_len appropriately and read the requested amount
authorGreg Farnum <greg@inktank.com>
Mon, 8 Apr 2013 16:10:35 +0000 (09:10 -0700)
committerGreg Farnum <greg@inktank.com>
Mon, 8 Apr 2013 16:10:35 +0000 (09:10 -0700)
commitedc9ddfde956a4f737d63df98777b0ee2c2f6bcc
tree3ddf5df0bb09906eb37719c40102c1e430de6eed
parent5b4cb53781cc6d3b0fcba939255e4aef8f19f83d
mds: fix journaler to set temp_fetch_len appropriately and read the requested amount

The _prefetch() function which intereprets temp_fetch_len interprets
it as the amount of data we need from read_pos, which is the beginning
of read_buf. So by setting it to the amount *more* we needed, we were
getting stuck forever if we actually hit this condition. Fix it by
setting temp_fetch_len based on the amount of data we need in aggregate.

Furthermore, we were previously rounding *down* the requested amount in
order to read only full log segments. Round up instead!

Fixes #4618

Signed-off-by: Greg Farnum <greg@inktank.com>
src/osdc/Journaler.cc