librados: fix ObjectIterator::operator= for the end iterator

We can't set a shared_ptr to NULL, we need to reset it instead. Add
another test for various permutations of this.

Fixes: #7538
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
ReplicatedPG: delete mark_all_unfound_lost transactions after completion

This was a minor memory leak.

Signed-off-by: Greg Farnum <greg@inktank.com>
MOSDOp: drop ops vector in clear_data()

Otherwise, clear_data on MOSDOp will leave essentially
all of the buffers intact.  This is a problem since the
OpTracker mechanism relies on being able to keep the mesage
around without keeping around the data.

Signed-off-by: Samuel Just <sam.just@inktank.com>
OpTracker: clarify that unregister_inflight_op is only called if enabled

The !tracking_enabled branch actually had a leak which was unreachable
since the caller does the check for tracking_enabled.

Signed-off-by: Samuel Just <sam.just@inktank.com>
TrackedOp: clear_payload as well in unregister_inflight_op

We want to minimize the cost of maintaining the historic ops.

Signed-off-by: Samuel Just <sam.just@inktank.com>
MOSDECSubOpWrite: drop transaction, log_entries in clear_buffers

Signed-off-by: Samuel Just <sam.just@inktank.com>
osd_types,PG: trim mod_desc for log entries to min size

In the event that mod_desc.bl contains pointers into a large
message buffer, we'd otherwise end up keeping around the entire
MOSDECSubOpWrite which created each log entry.

Fixes: #7539
Signed-off-by: Samuel Just <sam.just@inktank.com>
Merge pull request #1322 from ceph/wip-librados-end-iterator

librados: fix ObjectIterator::operator= for the end iterator

Reviewed-by: Sage Weil <sage@inktank.com>
Merge pull request #1344 from ceph/wip-7539

Wip 7539

Reviewed-by: Sage Weil <sage@inktank.com>
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>