- incremental seq each request
- set last to the last completed seq
- drop the now-redundant bool
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
If we are sending log updates to a client (ceph -w), and they are far
enough behind to drop behind first_committed, include a friendly message
in their stream but continue.
Drop useless return value from _create_sub_incremental(). Assert that we
can read the state file.
Signed-off-by: Sage Weil <sage@inktank.com>
We disregard incomplete infos during find_best_info, but we can't an
info with a last_epoch_started less that of the incomplete info.
This should avoid cases like #2462. In that case, it appears that
a peer with empty info/log was chosen as authoritative even though
there was a non-empty incomplete peer.
Signed-off-by: Samuel Just <sam.just@inktank.com>
On squeeze,
warning: cls_rbd.cc:534: cannot pass objects of non-POD type ‘struct snapid_t’ through ‘...’; call will abort at runtime
Signed-off-by: Sage Weil <sage@inktank.com>
Noticed because of failing i386 unit tests for long addrs; x86_64 passed
fine. Sigh. FTR, the failing address was
2001:0db8:85a3:0000:0000:8a2e:0370:7334
Sadly the full length addrs don't turn it up on x86_64, still, nor does
valgrind notice. But, this fixes it on i386.
Signed-off-by: Sage Weil <sage@inktank.com>
This will let us version this encoding later when we add new information
and features, like a per-snap parent.
Signed-off-by: Sage Weil <sage@inktank.com>
We disregard incomplete infos during find_best_info, but we can't an
info with a last_epoch_started less that of the incomplete info.
This should avoid cases like #2462. In that case, it appears that
a peer with empty info/log was chosen as authoritative even though
there was a non-empty incomplete peer.
Signed-off-by: Samuel Just <sam.just@inktank.com>
Previously, read_key was printing out error messages when it failed.
But because some callers are fine with it failing on ENOENT, and they
all have more context anyway, it no longer does so and they need
their own logging output. Now they have it.
Signed-off-by: Greg Farnum <greg@inktank.com>
Users can now place shared or exclusive locks, can remove their own
locks, can break the locks of others, and can list locks. All these
functions are considered PUBLIC_EXEC to match the other rbd methods.
Signed-off-by: Greg Farnum <greg@inktank.com>
The callers report errors and pass up errors, so do not spam stderr with
this. Fixes the confusion that sparked #2595.
Signed-off-by: Sage Weil <sage@inktank.com>
Fixes#2542. The old behavior just merged src object attrs
and provided attributes. The new (and correct) behavior looks
at the x-[amz|rgw|...]-metadata-directive and either copies
the source attrs, or replaces them with the provided attrs.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
To support this, add a refresh_seq counter which is incremented every
time we get a notify. This way we can handle the concern from
7add136f90, in which we get a notify
in the middle of doing a refresh.
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
This should help us track down/verify #2535. It seems to happen on several
different systems, but we haven't figured out which ones yet.
This detects the bug, but does not attempt to correct it.
Signed-off-by: Sage Weil <sage@inktank.com>