Fix incorrect read and truncate

If the first chunk of object is not read entirely, the current implementation
will contain it entirely which make wrong.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>