- In "includes", inttypes.h was cluttering the system's one. This caused
random build errors on some systems/in some conditions. Renaming it.
- Add emergency defs of PRI*64 headers when int_types.h does not define
them (which, unfortunately, can happen on some systems).
Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
Build tests are failing because the need crc32c.cc's functions, so we
need to link them against libcrc.la
Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
Added const char *state_name to the NamedState initializer list. This
correctly enforces a state name.
Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
The optimized intel code reads in word-sized chunks, knowing that the
allocator will only hand out memory in word-sized increments. This makes
valgrind unhappy. Whitelisting doesn't work because for some reason there
is no caller context (probably because of some interaction with yasm?).
Instead, just use the baseline code for the last few bytes. This should
not be significant.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
This makes the constructor call on the subclasses explicit, and passes
the cct to the NamedState constructor. This cct is used by ceph_clock
to set enter_time.
Removes the last reference to g_ceph_context from libosd.
Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
This file is in common/ but cant be included in libcommon.la because of
this reference. Removing it, making the binary calling it to pass the
correct cephcontext (rados, rest-bench).
Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
Removed almost all references to globals, apart from two;
- In OSD.cc: reference to g_lockdep
- In PG.h: NamedState uses ceph_clock_now(g_ceph_context)
Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
- There were some refs in SyntheticClient to g_(ceph_context|conf), I
replaced them with client->cct and client->cct->_conf.
- There were some refs in fuse_ll to g_conf, also replaced them with
client->cct or cfuse->client->cct where applicable.
This makes everything in src/client completely independent from globals.
Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
Returning the current version for the pgid and last_user_version makes
some sense here.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit b05f7ea519)
All other MOSDOpReply creators do this, with the exception of the pg
op.
Fixes: #6222
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit 5148aac73d)
Fixes: #6111
Backport: dumpling
When completing the part upload we need to flush any data that we
aggregated and didn't flush yet. With earlier code didn't have to deal
with it as for multipart upload we didn't have any pending data.
What we do now is we call the regular atomic data completion
function that takes care of it.
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This is an unfortunate feature of the API, but it can't be changed without
potentially breaking users.
Fixes: #5989
Signed-off-by: Sage Weil <sage@inktank.com>
Fixes: #6088
Backport: bobtail, cuttlefish, dumpling
When posting an object it is possible to provide a key
name that refers to the original filename, however we
need to verify that in the end we don't end up with an
empty object name.
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This is a bucket-only operation, so we shouldn't look at the
object. Object may not exist and we might respond with Not
Exists response which is not what we want.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Returning the current version for the pgid and last_user_version makes
some sense here.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
All other MOSDOpReply creators do this, with the exception of the pg
op.
Fixes: #6222
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>