osd: do not attempt to read past the object size

When reading from a replicated pool, trying to read more than the object
size results in a short read that does not go beyond the object size. In
erasure coded pools, objects are padded and the read will return more
bytes than the object actually contains.

http://tracker.ceph.com/issues/7423 fixes #7423

Signed-off-by: Loic Dachary <loic@dachary.org>
mon: add mon-test-helpers.sh to EXTRA_DIST

Signed-off-by: Loic Dachary <loic@dachary.org>
osd: helper to create an OSD for functional tests

Signed-off-by: Loic Dachary <loic@dachary.org>
mon: prepend current directory to PATH for tests

So that binaries found in the source directory are always prefered to
installed binaries or scripts.

Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: test rados put and get

Check that rados put immediately followed by rados get retrieves exactly
the same content.

http://tracker.ceph.com/issues/7423 refs #7423

Signed-off-by: Loic Dachary <loic@dachary.org>
Merge pull request #1327 from dachary/wip-7423

osd: do not attempt to read past the object size

Reviewed-by: Sage Weil <sage@inktank.com>