At (2): Non-static class member "latest_stashed" is not initialized in this constructor nor in any functions that it calls.
At (4): Non-static class member "num_last" is not initialized in this constructor nor in any functions that it calls.
At (6): Non-static class member "uncommitted_v" is not initialized in this constructor nor in any functions that it calls.
CID 717330: Uninitialized scalar field (UNINIT_CTOR)
At (8): Non-static class member "uncommitted_pn" is not initialized in this constructor nor in any functions that it calls.
Signed-off-by: Sage Weil <sage@inktank.com>
lcok isn't held during dispatch, so we can take it unconditionally. THis
also makes coverity happier:
CID 716966: Data race condition (MISSING_LOCK)
At (4): Accessing "this->stop" ("DispatchQueue.stop") requires the "Mutex._m" lock.
Signed-off-by: Sage Weil <sage@inktank.com>
cct may be null
CID 716930: Dereference after null check (FORWARD_NULL)
At (11): Dereferencing null pointer "cct".
Signed-off-by: Sage Weil <sage@inktank.com>
CID 717048: Big parameter passed by value (PASS_BY_VALUE)
At (1): Passing parameter a of type entity_addr_t (size 136 bytes) by value.
Signed-off-by: Sage Weil <sage@inktank.com>
This was suggested by Greg too but I was too lazy.
CID 717331: Uninitialized scalar field (UNINIT_CTOR)
At (2): Non-static class member "nonce" is not initialized in this constructor nor in any functions that it calls.
Signed-off-by: Sage Weil <sage@inktank.com>
CID 716965: Data race condition (MISSING_LOCK)
At (2): Accessing "this->m_stop" ("_ZN4ceph3log3LogE.m_stop") requires the "_ZN4ceph3log3LogE.m_queue_mutex" lock.
This isn't strictly needed since we assume only one thread will call this
method and start a thead, but it makes coverity happy.
Signed-off-by: Sage Weil <sage@inktank.com>
CID 717031: Big parameter passed by value (PASS_BY_VALUE)
At (1): Passing parameter k of type LogEntryKey (size 168 bytes) by value.
Signed-off-by: Sage Weil <sage@inktank.com>
CID 717030: Big parameter passed by value (PASS_BY_VALUE)
At (1): Passing parameter w of type entity_inst_t (size 152 bytes) by value.
Signed-off-by: Sage Weil <sage@inktank.com>
CID 717023: Out-of-bounds access (OVERRUN_DYNAMIC)
At (4): Allocating insufficient memory for the terminating null of the string.
This appears to be a false positive (we don't interpret the buffer as a
string, ever), but it will make coverity happier.
Signed-off-by: Sage Weil <sage@inktank.com>
CID 716902: Non-array delete for scalars (DELETE_ARRAY)
At (15): Deleting array variable "buf" with non-array delete in "delete buf".
Signed-off-by: Sage Weil <sage@inktank.com>
CCID 716856: Other violation (CHECKED_RETURN)
At (7): Calling function "setsockopt(this->listen_sd, 1, 2, &on, 4U)" without checking return value. This library function may fail and return an error code.
Signed-off-by: Sage Weil <sage@inktank.com>
We pass this back to the caller, but it points to a member that is never
looked at, because the inode has already been encoded. In effect this
wasn't journaling anything useful, and the only user questioned whether it
was needed, so let's rip it out.
Signed-off-by: Sage Weil <sage@inktank.com>
CID 717125: Dereference before null check (REVERSE_INULL)
At (2): Null-checking "this->objectcacher" 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>
* a clone's size can't be overridden
* note which commands require format 2
* clarify details of copy
* add examples for cloning
* add pool to map example for consistency
* fix a couple warnings and re-sync man page with rst
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
This chooses whether to use the original (supported by krbd)
or the new (supports layering) format.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
This fixes a delay in getting the initial MDSMap during startup (we wait
for the MonClient tick()).
Reported-by: Noah Watkins <jayhawk@cs.ucsc.edu>
Signed-off-by: Sage Weil <sage@inktank.com>
This should help simplify Chef etc deployments. Now (when using the
Upstart jobs), when a ceph-mon is started, ceph-create-admin-key is
triggered. If /etc/ceph/$cluster.client.admin.keyring already exists,
it does nothing; otherwise, it waits for ceph-mon to reach quorum, and
then does a "ceph auth get-or-create" to create the key, and writes it
atomically to disk.
The equivalent code can be removed from the Chef cookbook once this is
in.
This lets us have e.g. /etc/ceph/ceph.client.admin.keyring that is
owned by root:admin and mode u=rw,g=r,o= without making every non-root
run of the command line tools complain and fail.
This is what the Chef cookbook has been doing for a while already.