| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Writes don't need the snap_id at all, so make that only applicable
to reads. Writes will read the current overlap value when they
need it, so don't pass this in or store it in a member variable
either.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
|
|
|
|
|
|
|
|
|
|
| |
Pass the image_overlap to the WritebackHandler functions that need it,
may_copy_on_write() and write(), so that they don't need to take any
locks to read the current overlap. This is a step towards changing
the lock ordering in librbd so the cache lock may be taken inside
of the snap and parent locks.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
|
|
|
|
|
|
|
|
|
| |
For reads, we've got the snapid as an argument already so we don't
need to examine the ImageCtx. Writes can never get to this point when
they're to a snapshot (since they'll get -EROFS), so we don't need to
examine the snap id for writes at all.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
|
|
|
|
|
|
|
| |
Otherwise the conf file will clobber your CEPH_CONF arguments and you will
get very confused.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
|
|
| |
The fd cache only works correctly when there is at most 1
inode per hobject_t. This condition is frequently violated
during replay.
Fixes: #5699
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
| |
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
| |
Fixes: #5714
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
| |
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
| |
For swift we're setting the location constraint to be the
current region we're in when creating a bucket.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When forwarding a swift request to a different region, we
need to use the effective uri, and not just send the one
we got since we use S3 authentication for the forwarded
requests. This is achieved through a new using 'effective_uri'
param on the request info (which in swift ponts to the
plain bucket/object uri without the swift/v1 prefix(.
Also, rename the old req_state::effective_uri to relative_uri
in order to prevent confusion.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
|
|\
| |
| |
| | |
Reviewed-by: David Zafman <david.zafman@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes it easy to identify problems with (early) shutdown with a
loop like
while [ ! -e core ] ; do ./ceph-mds -i a -c ceph.conf -f ; done
and a vstart cluster.
Signed-off-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| |
| |
| | |
This makes us shut down lots of threads.
Signed-off-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| | |
Signed-off-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| |
| |
| |
| | |
* shutdown msgr last
* stop timer quickly, in case there are other events
Signed-off-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| | |
Signed-off-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| | |
Signed-off-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| | |
Signed-off-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| |
| |
| | |
The orderly shutdown in OSD assumes init() has completed.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|\ \
| | |
| | |
| | | |
Wip 5693
Reviewed-by: Greg Farnum <greg@inktank.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently doing it only when copying between regions. This is
needed so that the operation doesn't time out (as it can take
a long time and the web server may just hang on us since we're
not sending any data).
This is configurable and can be disabled. Currently only implemented
for S3.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
| | |
| | |
| | |
| | |
| | | |
Fixes: #3944
Signed-off-by: Dan Mick <dan.mick@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
From the man page for posix_fallocate:
posix_fallocate() returns zero on success, or an error
number on failure. Note that errno is not set.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The osd lock is not held at this point, we must use
the createmap passed in.
Fixes: #5656
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes: #5691
We need to also read the attributes, as bucket might be a legacy
bucket and might have all bucket instance info in that object.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Tested-by: Faidon Liambotis <faidon@wikimedia.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some callbacks take the osd lock, so we need to avoid blocking an
osd lock holding thread while waiting on a filestore callback.
Instead, just queue the transaction, and allow _try_resurrect_pg
to cancel us while we are waiting for the transaction to go through
(CLEARING_WAITING).
Fixes: #5672
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
|\ \ \
| | | |
| | | |
| | | | |
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Sage Weil <sage@inktank.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Make this a positive check instead of double negative.
Signed-off-by: Sage Weil <sage@inktank.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We must require something or else the caps check is going to pass in
a degenerate sense. Use X for commands.
Signed-off-by: Sage Weil <sage@inktank.com>
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | | |
set env var TEST_EXIT_ON_ERROR=0 to obtain all errors instead of exiting
with return 1 on first error found.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
Fix SCA and CID issues
Reviewed-by: Sage Weil <sage@inktank.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Pass const std::list<> parameter by refrence to
cls_replica_log_progress_marker().
From cppcheck:
[src/cls/replica_log/cls_replica_log_types.h:64]: (performance)
Function parameter 'b' should be passed by reference.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Object 'librados::ObjectWriteOperation *op' is freed twice in the TEST
test_version_inc_read. Free instead 'librados::ObjectReadOperation *rop'
Related cppcheck warning:
[src/test/cls_version/test_cls_version.cc:79]: (error) Memory
pointed to by 'op' is freed twice.
This should also fix:
CID 1049247 (#1 of 1): Use after free (USE_AFTER_FREE)
deref_arg: Calling "librados::ObjectWriteOperation::~ObjectWriteOperation()"
dereferences freed pointer "op". (The dereference happens because this is
a virtual function call.)
CID 1049218 (#4 of 4): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable "rop" going out of scope leaks the storage it
points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Return 'const string' instead of 'const char *' from RGWOp::name() to
avoid the usage of std::string:c_str() to return 'const char *' in
some cases in rgw_rest_replica_log.h.
Returning result of c_str() from a function is dangerous since the
result gets (may) invalid after the related string object gets
destroyed or out of scope (which is the case with return). So you
may end up with garbage in this case.
Related warning from cppcheck:
[src/rgw/rgw_rest_replica_log.h:39]: (error) Dangerous usage of
c_str(). The value returned by c_str() is invalid after this call.
[src/rgw/rgw_rest_replica_log.h:59]: (error) Dangerous usage of
c_str(). The value returned by c_str() is invalid after this call.
[src/rgw/rgw_rest_replica_log.h:79]: (error) Dangerous usage of
c_str(). The value returned by c_str() is invalid after this call
This should also fix:
CID 1049250 (#1 of 1): Wrapper object use after free (WRAPPER_ESCAPE)
escape: The internal representation of "s" escapes, but is destroyed
when it exits scope.
CID 1049251 (#1 of 1): Wrapper object use after free (WRAPPER_ESCAPE)
escape: The internal representation of "s" escapes, but is destroyed
when it exits scope.
CID 1049252 (#1 of 1): Wrapper object use after free (WRAPPER_ESCAPE)
escape: The internal representation of "s" escapes, but is destroyed
when it exits scope.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | | |
Fix some issues from SCA - v2 - against ceph:next
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Free with malloc allocated memory in error case before return.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|