| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
./include/encoding.h: In function 'void encode(int64_t, ceph::bufferlist&, uint64_t)':
./include/encoding.h:101:1: warning: narrowing conversion of 'v' from 'int64_t {aka long int}' to '__le64 {aka long long unsigned int}' inside { } is ill-formed in C++11 [-Wnarrowing]
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CompatSet users number the Feature objects rather than
providing masks. Thus, we should do
mask |= (1 << f.id) rather than mask |= f.id.
In order to detect old, broken encodings, the lowest
bit will be set in memory but not set in the encoding.
We can reconstruct the correct mask from the names map.
This bug can cause an incompat bit to not be detected
since 1|2 == 1|2|3.
fixes: #2748
Signed-off-by: Samuel Just <sam.just@inktank.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Way back in fc869dee1e8a1c90c93cb7e678563772fb1c51fb (v0.42) when we redid
the osd type encoding we forgot to make this conditionally encode the old
format for old clients. In particular, this means that kernel clients
will fail to decode the osdmap if there is a rados pool with a pool-level
snapshot defined.
Fixes: #3290
Signed-off-by: Sage Weil <sage@inktank.com>
Conflicts:
src/test/encoding/types.h
|
|
|
|
|
|
|
|
| |
Instead of just ,. Currently "foo.com, bar.com" will fail because of the
space after the comma. This patches fixes that, and makes all delim
chars interchangeable.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
| |
getaddrinfo uses its return code to report failures.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
|
|
|
|
|
|
|
|
|
| |
This creates a separate reference to an existing connection, for
use when a client holding IoCtx needs to consult another (say,
for rbd cloning)
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
| |
Signed-off-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
| |
Simple helper to check if a buffer is all zeros.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|\
| |
| |
| | |
Reviewed-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| |
| |
| | |
Also, recalc_round_timestamp should be done under lock.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This will fail if features are requested that the client or server
does not support. Currently there are no features defined, so
zero is the only valid value.
copy() preserves the format and features of the source image.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
|
| |
| |
| |
| |
| |
| |
| | |
Add the client side (cls_rbd_client) for testing as well.
librbd will use the functions in cls_rbd_client to interact with cls_rbd.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
|
| |
| |
| |
| | |
Signed-off-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| | |
Signed-off-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| |
| |
| | |
...as detected by the previous patch.
Signed-off-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The normal assert.h is very rude in that it clobbers any existing assert
define and replaces it with its own. An sadly, lots of things we include
include the generic version.
Be extra rude in response. Clobber any existing assert #define, and also
#define _ASSERT_H to be a magic value that our commonly-used dendl #define
depends on. This way we get a compile error if the system version replaces
out own.
This is imperfect, since we will only detect their rudeness when we use
the debug macros. I'm not coming up with something that is more widely
used that would work better, however.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|/
|
|
|
|
|
|
|
| |
From this point, hobjects in the ObjectStore will be globally unique. This
will allow us to avoid including the collection in the ObjectMap key encoding
and thereby enable efficient collection renames and, eventually, collection
splits.
Signed-off-by: Samuel Just <sam.just@inktank.com>
|
|
|
|
|
|
|
| |
*entry and *key don't need to be freed, and are only valid until the
next call to rados_objects_list_*.
Signed-off-by: Samuel Just <sam.just@inktank.com>
|
|
|
|
|
| |
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
|
|
|
|
|
| |
Fixes: #2391
Signed-off-by: Sage Weil <sage@inktank.com>
|
|\ |
|
| |
| |
| |
| |
| |
| | |
There were a few places where we didn't check malloc return code.
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
|
|/
|
|
|
|
| |
The old monmaps had a u16 for the version. Fix our decode.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
| |
Make it clear to readers what that -1 is all about. Alex would be proud.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
| |
Introduce a feature bit so that we can interoperate with older
peers.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
| |
It's easier to manage/rev/grok these inline.
Signed-off-by: Sage Weil <sage@newdream.net>
|
|\
| |
| |
| |
| |
| | |
Conflicts:
src/mon/PGMonitor.cc
src/osd/OSDMap.h
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We share a lot of identical addresses between map versions because they
don't tend to change very often. Instead of having a separate copy for
every map, use shared_ptr and share references. Also use a reference for
the entire addr vector(s) in case no addrs differ at all.
Create new encode/decode macros for vector< shared_ptr<T> >.
Signed-off-by: Sage Weil <sage@newdream.net>
|
|\ \
| |/
| |
| | |
Reviewed-by: Gregory Farnum <gregory.farnum@dreamhost.com>
|
| |
| |
| |
| |
| |
| | |
These prevent OSDs from being marked up, down, in, or out, respectively.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
|
|\ \
| | |
| | |
| | |
| | | |
Conflicts:
src/osd/OSDMap.h
|
| | |
| | |
| | |
| | | |
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
|
| |/
|/|
| |
| |
| |
| | |
size_t was accidentally copy-pasted.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
|
|/
|
|
| |
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
|
|
|
|
|
|
|
|
| |
Allow user to check for (safe|complete) -and- callback return, and wait
for that condition.
Fixes: #2301
Signed-off-by: Sage Weil <sage@newdream.net>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@newdream.net>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
|
|
|
|
|
|
|
|
|
|
| |
Implement sync and async discard. Embed an ObjectWriteOperation in the
BlockCompletion struct.
The sync version does a sync op on every block, just like write()... very
stupid. Both of these should fixed.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
|
|
|
|
| |
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
|
|\ |
|
| |
| |
| |
| | |
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
|
| |
| |
| |
| |
| |
| |
| | |
The end() iterator position does not record an offset when the list is
modified.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
|
| |
| |
| |
| | |
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
|
| |\ |
|
|\ \ \
| | |/
| |/| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This gives us a pointer to the position into the list where the final
length value will be copied. Previously we used bl.copy_in(), which takes
a byte offset and needs iterator over the bufferlist to seek to the
correct position, resulting in O(n^2) encoding time for large structures.
Fixes: #2161
Reported-by: Jim Schutt <jaschut@sandia.gov>
Diagnosed-by: Ake van der Meer <petrabbit@xs4all.nl>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Use the new OPT_UUID type.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
|
|\ \ \
| |_|/
|/| | |
|
| | |
| | |
| | |
| | | |
Signed-off-by: Sage Weil <sage@newdream.net>
|