summaryrefslogtreecommitdiff
path: root/src/include
Commit message (Collapse)AuthorAgeFilesLines
* byteorder: fix gcc 4.7 warningsSage Weil2013-01-151-3/+3
| | | | | | | ./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 pass bit indices rather than masksSamuel Just2012-11-091-4/+30
| | | | | | | | | | | | | | | | | | 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>
* osd: make pool_snap_info_t encoding backward compatibleSage Weil2012-10-301-0/+8
| | | | | | | | | | | | | | | 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
* addr_parsing: make , and ; and ' ' all delimitersSage Weil2012-10-171-2/+3
| | | | | | | | 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>
* addr_parsing: report correct error messageJosh Durgin2012-08-101-2/+1
| | | | | | getaddrinfo uses its return code to report failures. Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
* librados: add new constructor to form a Rados object from IoCtxDan Mick2012-07-231-0/+1
| | | | | | | | | 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>
* add CRUSH_TUNABLES feature bitSage Weil2012-07-181-1/+3
| | | | Signed-off-by: Sage Weil <sage@inktank.com>
* librados: Bump the version to 0.48Wido den Hollander2012-07-041-1/+1
| | | | | Signed-off-by: Wido den Hollander <wido@widodh.nl> Signed-off-by: Sage Weil <sage@inktank.com>
* buffer: add list and ptr is_zero() methodSage Weil2012-06-151-0/+3
| | | | | | Simple helper to check if a buffer is all zeros. Signed-off-by: Sage Weil <sage@inktank.com>
* Merge remote-tracking branch 'gh/wip-2516-2'Sage Weil2012-06-111-0/+19
|\ | | | | | | Reviewed-by: Sage Weil <sage@inktank.com>
| * rgw: usage log cleanupsYehuda Sadeh2012-06-111-0/+19
| | | | | | | | | | | | Also, recalc_round_timestamp should be done under lock. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
* | librbd: add create2 to create an image with the new formatJosh Durgin2012-06-092-1/+5
| | | | | | | | | | | | | | | | | | | | 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>
* | cls_rbd: add methods for interacting with the new header formatJosh Durgin2012-06-081-3/+18
| | | | | | | | | | | | | | 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>
* | deliberately break encoding macros when wrong assert is presentSage Weil2012-06-072-7/+13
| | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
* | misc assert #include cleanup, hackerySage Weil2012-06-071-1/+2
| | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
* | make everyone use our assert #include and macroSage Weil2012-06-062-2/+3
| | | | | | | | | | | | ...as detected by the previous patch. Signed-off-by: Sage Weil <sage@inktank.com>
* | assert: detect when /usr/include/assert.h clobbers usSage Weil2012-06-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | src/: Add namespace and pool fields to hobject_tSamuel Just2012-06-051-0/+28
|/ | | | | | | | | 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>
* librados.h: update rados_object_list_next documentation for key/locatorSamuel Just2012-05-291-2/+4
| | | | | | | *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>
* librados: Remove errant sha1Dan Mick2012-05-231-1/+1
| | | | | Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
* doc: librados: fix getxattr return codeSage Weil2012-05-221-1/+1
| | | | | Fixes: #2391 Signed-off-by: Sage Weil <sage@inktank.com>
* Merge branch 'wip-defensive-alloc'Sage Weil2012-05-211-0/+2
|\
| * check malloc return valuesYehuda Sadeh2012-05-201-0/+2
| | | | | | | | | | | | There were a few places where we didn't check malloc return code. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
* | monmap: fix decoding of old monmapsSage Weil2012-05-211-0/+3
|/ | | | | | The old monmaps had a u16 for the version. Fix our decode. Signed-off-by: Sage Weil <sage@inktank.com>
* features: explicitly use CEPH_FEATURES_ALL instead of -1Sage Weil2012-05-161-1/+3
| | | | | | Make it clear to readers what that -1 is all about. Alex would be proud. Signed-off-by: Sage Weil <sage@inktank.com>
* monmap: new encoderSage Weil2012-05-141-1/+3
| | | | | | | Introduce a feature bit so that we can interoperate with older peers. Signed-off-by: Sage Weil <sage@inktank.com>
* osd: drop unused CEPH_OSDMAP*VERSION* #definesSage Weil2012-05-031-8/+0
| | | | | | It's easier to manage/rev/grok these inline. Signed-off-by: Sage Weil <sage@newdream.net>
* Merge branch 'wip-osdmap'Sage Weil2012-04-281-0/+24
|\ | | | | | | | | | | Conflicts: src/mon/PGMonitor.cc src/osd/OSDMap.h
| * osdmap: use shared_ptr for addrs, addr vectorsSage Weil2012-04-261-0/+24
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'wip-mon'Sage Weil2012-04-281-0/+4
|\ \ | |/ | | | | Reviewed-by: Gregory Farnum <gregory.farnum@dreamhost.com>
| * osdmap: add NOUP, NODOWN, NOIN, NOOUT flagsSage Weil2012-04-241-0/+4
| | | | | | | | | | | | These prevent OSDs from being marked up, down, in, or out, respectively. Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* | Merge branch 'wip-lpg'Sage Weil2012-04-261-2/+2
|\ \ | | | | | | | | | | | | Conflicts: src/osd/OSDMap.h
| * | mds: remove preferred from ceph_file_layoutSage Weil2012-04-231-2/+2
| | | | | | | | | | | | Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* | | librbd: the length argument of aio_discard should be uint64_tJosh Durgin2012-04-262-2/+2
| |/ |/| | | | | | | | | size_t was accidentally copy-pasted. Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
* | librbd: rev version for discard additionSage Weil2012-04-231-1/+1
|/ | | | Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* librados: add methods to check and wait for safe/complete -and- callbackSage Weil2012-04-172-0/+44
| | | | | | | | 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>
* librados: C bindings for get_pool_name()Sage Weil2012-04-161-1/+11
| | | | Signed-off-by: Sage Weil <sage@newdream.net>
* librados: add IoCtx::get_pool_name() to c++ apiSage Weil2012-04-131-0/+2
| | | | Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* librbd: implement discardSage Weil2012-04-132-0/+4
| | | | | | | | | | 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>
* Remove unused Completion.h headerJosh Durgin2012-04-131-138/+0
| | | | Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
* Merge branch 'next'Sage Weil2012-04-093-3/+4
|\
| * cephfs: fix uninit var warningSage Weil2012-04-091-1/+1
| | | | | | | | Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
| * encoding: fix iterator use for struct_len copy_inSage Weil2012-04-091-1/+2
| | | | | | | | | | | | | | The end() iterator position does not record an offset when the list is modified. Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
| * buffer: allow advance() to move an iterator backwardSage Weil2012-04-091-1/+1
| | | | | | | | Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
| * Merge remote branch 'gh/stable' into nextSage Weil2012-04-081-3/+3
| |\
* | \ Merge branch 'stable'Sage Weil2012-04-061-3/+3
|\ \ \ | | |/ | |/|
| * | encoding: use iterator to copy_in encoded lengthSage Weil2012-04-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | config: parse fsid uuid in config, not ceph_monSage Weil2012-04-051-1/+1
| | | | | | | | | | | | | | | | | | Use the new OPT_UUID type. Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* | | Merge remote-tracking branch 'gh/wip-log'Sage Weil2012-04-052-10/+21
|\ \ \ | |_|/ |/| |
| * | utime_t: sprintf() methodSage Weil2012-03-271-0/+11
| | | | | | | | | | | | Signed-off-by: Sage Weil <sage@newdream.net>