]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd: fail import-diff if we reach the end of the stream sooner than expected
authorJosh Durgin <josh.durgin@inktank.com>
Fri, 29 Mar 2013 23:48:02 +0000 (16:48 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Mon, 1 Apr 2013 06:32:42 +0000 (23:32 -0700)
commitc0e5c22dfdea35b5325982dcef170c331570b709
treeb3802e3710488ce864e9b336ab9ec88b6ffd3552
parent09898ffdd942215e939df50e862e0f49be856c3a
rbd: fail import-diff if we reach the end of the stream sooner than expected

safe_read() just protects against EINTR, and may return less data than
requested if it reaches the end of the file. Use safe_read_exact() to
make sure we get the right amount of data.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/rbd.cc