Commit Graph

21044 Commits

Author SHA1 Message Date
Sage Weil
89add0f770 paxos: init vars in ctr
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>
2012-08-31 13:11:35 -07:00
Sage Weil
ea078e1872 msg/DispatchQueue: simplify shutdown()
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>
2012-08-31 13:11:35 -07:00
Sage Weil
b7af8d8bb0 msg/Message: fix possible null deref
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>
2012-08-31 13:11:35 -07:00
Sage Weil
650ec35b08 msg: pass by reference
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>
2012-08-31 13:11:35 -07:00
Sage Weil
a3bf558ab8 fix accepter bind fix 2012-08-31 13:11:35 -07:00
Sage Weil
4eb31463e9 msg/Accepter: move nonce init to ctor
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>
2012-08-31 13:11:35 -07:00
Sage Weil
46c08d6c28 log: protect m_stop with lock
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>
2012-08-31 13:11:35 -07:00
Sage Weil
f51f568551 common/LogEntry: pass by value for contains()
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>
2012-08-31 13:11:35 -07:00
Sage Weil
929892fe56 LogEntry: pass by reference
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>
2012-08-31 13:11:35 -07:00
Sage Weil
ec5133b09c msg/Pipe: make banner buffer slightly bigger
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>
2012-08-31 13:11:35 -07:00
Sage Weil
b960c6238c librbd: fix delete[]
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>
2012-08-31 13:11:35 -07:00
Sage Weil
08a29f9387 ceph-dencoder: don't leak object
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 13:11:35 -07:00
Sage Weil
7cb3d2e455 auth: fix uninit vars
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 13:11:34 -07:00
Sage Weil
3fd13f57ed crypto: fix fd leak from get_random_bytes()
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 13:11:34 -07:00
Sage Weil
1b1a0bf60a msg/Accepter: check setsockopt return value
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>
2012-08-31 13:11:34 -07:00
Sage Weil
484fd0c0ec mds: fix broken EMetablob inode_t* return value
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>
2012-08-31 13:11:34 -07:00
Sage Weil
139ba9f321 client: unconditional teardown
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>
2012-08-31 13:11:34 -07:00
Sage Weil
532d1b10d6 rgw: init RGWRados::cct in ctor
Coverity cid 717382
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 13:11:34 -07:00
Sage Weil
c67eda26e5 rgw: init RGWGetObj::sent_header in ctor
Coverity cid 717383
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 13:11:05 -07:00
Sage Weil
757457ad21 rgw: init ptr
Coverity cid 717384
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 13:11:05 -07:00
Sage Weil
ca4e0607ef rgw: add missing ctor, init parent
Coverity cid 717385
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 13:11:04 -07:00
Sage Weil
2214e83851 omap_bench: fix uninit var
Coverity cid 717386
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 13:11:04 -07:00
Sage Weil
20372126d9 test/osd/RadosModel: uninit value
Coverity cid 717388 717387
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 13:11:04 -07:00
Sage Weil
26a822bc7d test/osd/RadosModel: fix uninit value
Coverity cid 717389
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 13:11:04 -07:00
Sage Weil
7c10bdc3a5 test/osd/RadosModel: fix uninit values
Coverity cid 717390
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 13:11:04 -07:00
Sage Weil
8d9d4f6154 test/osd/RadosModel: fix uninit ptr
Coverity cid 717391
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 13:11:04 -07:00
Sage Weil
1247d4d557 test/rados-api/aio: fix uninit ptr
Coverity cid #717392
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 13:11:04 -07:00
Sage Weil
220980c9b6 cephtool: fix uninitialized scalar in constructor
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 13:11:03 -07:00
Sage Weil
998e207913 test/Object: comment out dead code
Coverity cid #717397
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 13:11:03 -07:00
Sage Weil
97bd084853 mds: fix unused value
This value was never used before it was clobbered.

Coverity cid #717398
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 13:11:03 -07:00
Sage Weil
b9adc27b3a mds: drop unused value
Coverity cid #717400
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 13:11:03 -07:00
Sage Weil
1355a676f6 filer: add missing return
Coverity cid 717404
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 13:11:03 -07:00
Sage Weil
a6dfa3e5b1 rgw: fix use-after-free
Coverity cid 717405
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 13:11:03 -07:00
Sage Weil
ec0a266245 test_librbd: add missing va_end()
Coverity cid 717407
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 13:11:03 -07:00
Josh Durgin
82999c0e49 Merge branch 'wip-rbd-children' 2012-08-30 16:06:49 -07:00
Josh Durgin
649bdc15d3 doc: clarify rbd man page (esp. layering)
* 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>
2012-08-30 14:34:49 -07:00
Josh Durgin
dcbb87cc0c rbd: add --format option
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>
2012-08-30 14:34:49 -07:00
Sage Weil
1b27a7cd4d client: renew/submit subs on startup
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>
2012-08-30 14:03:11 -07:00
John Wilkins
a23351efda :doc: Added constraints and revised a description per joshd.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-08-30 11:48:47 -07:00
Tommi Virtanen
f2c4510848 upstart, ceph-create-keys: Make client.admin key generation automatic.
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.
2012-08-30 13:41:20 -04:00
Tommi Virtanen
0de719567f upstart: Make instance jobs export their cluster and id variables.
This allows other jobs listening to Upstart "started ceph-mon" events
to see what instance started.

Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-08-30 10:25:07 -04:00
Tommi Virtanen
3b0e2a2d98 config: Add a per-name default keyring to front of keyring search path.
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.
2012-08-30 10:25:07 -04:00
John Wilkins
8b4a9ade32 doc: Modified index page with table. Pools and Auth will go to Ops.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-08-30 00:38:01 -07:00
John Wilkins
b961a660be doc: Some improvements. This still needs review.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-08-30 00:37:02 -07:00
John Wilkins
c41fa39460 doc: Added additional note to mount data disk to data path.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-08-30 00:35:31 -07:00
John Wilkins
b80a1b73ed doc: Added a document for general config settings.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-08-30 00:33:58 -07:00
John Wilkins
2407b0cdef doc: Added a doc for filestore settings.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-08-30 00:29:14 -07:00
John Wilkins
17dee291e8 doc: Added a document for RBD cache settings.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-08-30 00:28:29 -07:00
John Wilkins
69e10167f4 doc: Added substantial detail to OSD setting descriptions.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-08-30 00:26:38 -07:00
John Wilkins
c0c9fe5400 doc: minor edit to use # for comments.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-08-30 00:25:17 -07:00