There might be two concurrent rollback ops each of which
adds snap x to snaps_in_use. Between when the first
completes and the second completes, snap x may be removed
since the first would have removed snap x from snaps_in_use.
Using sharedptr_registry here avoids this by ensuring that
the snap won't be removed from snaps_in_use until all refs
are gone.
This patch also adds size() to sharedptr_registry.
Fixes: #6719
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
If one requests JSON output, the progress message pollutes the output;
don't do that, send it to stderr instead
Signed-off-by: Dan Mick <dan.mick@inktank.com>
This allows a user to use "-v|--verbose" to get some insight as to
what could be preventing radosgw from starting properly.
Signed-off-by: David Moreau Simard <dmsimard@iweb.com>
Changed "/etc/init.d/radosgw status" into a function that now
returns the appropriate exit code.
We now also verify that radosgw actually started properly.
Signed-off-by: David Moreau Simard <dmsimard@iweb.com>
An exit 0 means everything went okay - we should exit 1 if there is a problem in
starting radosgw.
Signed-off-by: David Moreau Simard <dmsimard@iweb.com>
Creates a test that checks explicitly for res_nquery, which can be a
macro in resolv.h. Defines RESOLV_LIBS that contains any libraries that
need to be linked against.
Notes from later fix:
Based on the 2013-09-30 version of wip-port. On FreeBSD, one must
include netinet/in.h to get the definitions for stuff in resolv.h.
Also, resolv.h's functions are part of libc instead of libresolv.
Signed-off-by: Alan Somers <asomers@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
In case of a replay, a missing destination directory indicates that
the destination object and directory have been removed by a later
transaction. Thus, we need to remove the src object and return
0.
Fixes: #6714
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
galois_create_split_w8_tables() takes no parameter, remove '8' passed
to the function in one case.
osd/ErasureCodePluginJerasure/galois.c: In function 'galois_w32_region_multiply':
osd/ErasureCodePluginJerasure/galois.c:696:5: warning: call to function 'galois_create_split_w8_tables' without a real prototype [-Wunprototyped-calls]
In file included from osd/ErasureCodePluginJerasure/galois.c:53:0:
osd/ErasureCodePluginJerasure/galois.h:71:12: note: 'galois_create_split_w8_tables' was declared here
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
If we get a peering message for an old map we don't have, we
can throwit out: the sending OSD will learn about the newer
maps and update itself accordingly, and we don't have the
information to know if the message is valid. This situation
can only happen if the sender was down for a long enough time
to create a map gap and its PGs have not yet advanced from
their boot-up maps to the current ones, so we can rely on it
Fixes: #6712
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
I really don't know why I added this... Ops can be discarded from the
waiting_for_pg queue if we aren't primary simply because there must have
been an exchange of peering events before subops will be sent within a
particular epoch. Thus, any events in the waiting_for_pg queue must be
client ops which should only be seen by the primary. Peering events, on
the other hand, should only be discarded if we are in a new interval,
and that check might as well be performed in the peering wq.
Fixes: #6681
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Otherwise, if last_backfill_started is a snapdir, we will fail to send a
transaction for a client IO creating the head object and removing the
snapdir object. The result will be that head will eventually be
backfilled, but the snapdir object will erroneously not be removed.
Fixes: #6685
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
This is the start of a potential unit test for get_block_device_size. An
actual unit test will probably need to be run as root, and either find a
device, have one specified, or create one (e.g. ramdisk) in a platform
agnostic way. In the mean time, this tool can be run by hand, or called
for a bash script.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Struct initialization using dot notation as in C99, but that happens to
not be valid C++, although apparently in C++11 it is valid. We'll need a
way to keep clang from throwing warnings at this initialization style,
either using some macros to detect the comiler environment, or perhaps
moving struct initialization to a C file rather than C++.
This reverts commit 6efc2b54d5.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
The ro and rw options were added in linux 3.7. To be compatible with
older kernels, don't specify rw. The default will probably always be
rw, so this should not present any problems in the future.
Reported-by: nicolasc <nicolas.canceill@surfsara.nl>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>