This iterator is now reset on each run through the loop,
so there's no point in incrementing it here.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Skipping these callbacks when there's a racing write or
a gap in the results causes the original reads they represent
to never be completed. If the read falls within the range
of a BufferHead, retry all waiters no matter what.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Adding a new ops log output (into a unix domain socket).
Configuration:
rgw_enable_usage_log : master switch for ops log
rgw ops log socket path : set socket path
rgw ops log rados : whether ops should be logged in the rados
cluster
rgw ops log data backlog : max size in MB to be accumulated
without flushing
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
CID 743418 (#1 of 1): Dereference before null check (REVERSE_INULL)
Null-checking "argv" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
Signed-off-by: Sage Weil <sage@inktank.com>
CID 743433 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
At (2): Non-static class member "authorize_handler_registry" is not initialized in this constructor nor in any functions that it calls.
Signed-off-by: Sage Weil <sage@inktank.com>
CID 743405 (#2 of 2): Resource leak (RESOURCE_LEAK)
At (16): Handle variable "fd" going out of scope leaks the handle.
Signed-off-by: Sage Weil <sage@inktank.com>
CID 743406 (#3 of 3): Resource leak (RESOURCE_LEAK)
At (26): Handle variable "fd" going out of scope leaks the handle.
Signed-off-by: Sage Weil <sage@inktank.com>
CID 743435 (#1 of 1): Use after free (USE_AFTER_FREE)
At (68): Passing freed pointer "rd" as an argument to function "std::basic_ostream<char, std::char_traits<char> >::operator <<(void const *)".
Signed-off-by: Sage Weil <sage@inktank.com>
Use a fake writeback handler and respond to all requests with -ENOENT.
This tests that all operations will complete, and the cache doesn't
lose waiters or callbacks.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
There is a difference in naming conventions between debian and
rpm based distributions for this library. In configure.ac we
check first for boost_thread-mt, then if it's not found check
for boost_thread. A side effect of the AC_CEHCK_LIB macro is
to add the library to the $LIBS, so the explicit -llibboost_thread
in the Makefile has been removed.
(cherry picked from commit f0c7bb3630)
There is a difference in naming conventions between debian and
rpm based distributions for this library. In configure.ac we
check first for boost_thread-mt, then if it's not found check
for boost_thread. A side effect of the AC_CEHCK_LIB macro is
to add the library to the $LIBS, so the explicit -llibboost_thread
in the Makefile has been removed.
Only try to create a btrfs subvolume if the fs is btrfs. Otherwise, just
create a directory. Then we can error out on *any* ioctl error, and not
rely on the ioctl error code to determine if we failed because we are on
a non-btrfs or a real error.
Fixes: #3052
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
get_item_id() returns 0 if the name already exists; that's not what we
want here. Verify the name exists before checking its id.
Signed-off-by: Sage Weil <sage@inktank.com>
I've gone through the set of xfstests that were previously found to
not work. Some of those now do work, and with the addition of an
option to pass to "mkfs.xfs" a large number of other tests now
produce expected output as well.
This patch updates the default list of tests to run to reflect
the result of this exercise. The following 50 additional tests
are now run by default:
029 074 078 084-087 100 105 117 121 124 126 129-134
164 165 167 174 181 184 186 187 192 214-216 227 236
237 241 243 245-249 257-259 261 277 278 280 285 286
Test 127 completed without error, but it took from 1-3 hours so I
kept that out of the list.
Signed-off-by: Alex Elder <elder@inktank.com>
Instead of looking at the current time we process the message, look at the
receive time. This gives us a more real failure time given that messages
may be requeued.
It doesn't solve the problem when messages are forwarded between monitors
due to an election, but that's ok; this is still a net improvement.
Signed-off-by: Sage Weil <sage@inktank.com>
Don't try to parse beyond the GMT or UTC. Some clients use
special date formatting. If we end up misparsing the date
it'll fail in the authorization, so don't need to be too
restrictive.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
We don't want to hold the lock while we register the admin socket commands
or else we create a lock cycle when we try to process them later.
Signed-off-by: Sage Weil <sage@inktank.com>
min_size should never be set to 0 on a pool. config.h
now has a helper to determine the correct default value.
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>