1
0
mirror of https://github.com/ceph/ceph synced 2024-12-21 10:54:42 +00:00
Commit Graph

21468 Commits

Author SHA1 Message Date
Sage Weil
cf6639a049 perfcounters: remove unused members
Avoids coverity warning

CID 717214: Uninitialized scalar field (UNINIT_CTOR)
At (2): Non-static class member "m_shutdown_fd" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-28 13:18:04 -07:00
Sage Weil
5846e27b73 obj_bencher: protect with lock
This makes coverity happy.

CID 716963: Data race condition (MISSING_LOCK)
At (1): Accessing "this->data.finished" ("bench_data.finished") requires the "Mutex._m" lock.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-28 13:18:04 -07:00
Sage Weil
f577c8291f obj_bencher: possible divice by zero
CID 716903: Division or modulo by zero (DIVIDE_BY_ZERO) [select defect]

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-28 13:18:04 -07:00
Sage Weil
ce0633980e lockep: fix leak in failure/assert path
This is useless excepto make coverity happy.

CID 717075: Resource leak (RESOURCE_LEAK)
At (12): Variable "bt" going out of scope leaks the storage it points to.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-28 13:18:04 -07:00
Sage Weil
4bd27998d9 ipaddr: fix buffer overrun on ipv6 prefix of 128
CID 717020: Out-of-bounds read (OVERRUN)
At (3): Overrunning array "addr->__in6_u.__u6_addr8" of 16 bytes at byte offset 16 using index "prefix_len / 8U" (which evaluates to 16).

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-28 13:18:04 -07:00
Sage Weil
6f897659ad config: don't leak buf on dump config
CID 717074: Resource leak (RESOURCE_LEAK)
At (26): Variable "buf" going out of scope leaks the storage it points to.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-28 13:18:04 -07:00
Sage Weil
66f7c41ed5 buffer: init data val in ctor
CID 717213: Uninitialized pointer field (UNINIT_CTOR)
At (2): Non-static class member "data" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-28 13:18:04 -07:00
Sage Weil
05dc45f68f buffer: restore stream state after hexdump()
CID 717129: Not restoring ostream format (STREAM_FORMAT_STATE)
At (51): Changing format state of stream "out" for category fill without later restoring it.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-28 13:18:04 -07:00
Sage Weil
9bd673f178 adminsocket: init vars in ctor
At (2): Non-static class member "m_version_hook" is not initialized in this constructor nor in any functions that it calls.
CID 717212: Uninitialized pointer field (UNINIT_CTOR)
At (4): Non-static class member "m_help_hook" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-28 13:18:04 -07:00
Sage Weil
dfb9488a42 adminsocket: change failure test
This makes coverity happier:

CID 716941: Using invalid iterator (INVALIDATE_ITERATOR)
At (35): Dereferencing iterator "p" though it is already past the end of its container.

only because it doesn't understand all the side-effects of the failure
branch above.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-28 13:18:04 -07:00
Sage Weil
3ec32c94ab adminsocket: check return value
CID 716847: Other violation (CHECKED_RETURN)
At (5): Calling function "fcntl(sock_fd, 2, 1)" without checking return value. This library function may fail and return an error code.
At (6): No check of the return value of "fcntl(sock_fd, 2, 1)".

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-28 13:18:03 -07:00
Sage Weil
73d854975e workqueue: reset heartbeat timeout under lock
This makes coverity happier:

CID 727967: Value not atomically updated (ATOMICITY)
At (44): Using an unreliable value of "hb" inside the second locked section. If the data that "hb" depends on was changed by another thread, this use might be incorrect.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-28 13:18:03 -07:00
Sage Weil
bdadc4eca6 MemoryModel: init in ctor
CID 717211: Uninitialized scalar field (UNINIT_CTOR)
At (18): Non-static class member field "last.mmap" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-28 13:18:03 -07:00
Sage Weil
8d4e6e2a4c LogEntry: init in ctor
Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-28 13:18:03 -07:00
John Wilkins
698403789e doc: Added commentary for BMC and VLAN.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-28 13:18:03 -07:00
Sage Weil
404e7589d1 Merge remote-tracking branch 'gh/wip-osd-caps'
Reviewed-by: Sage Weil <sage@inktank.com>
2012-09-27 16:34:03 -07:00
Josh Durgin
cc4dcf60f5 test: add more OSDCap unit tests
Check that allow_all() returns false when 'allow *' is not specified.
This would have caught .
Add tests for the output operators as well.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-27 15:38:29 -07:00
Josh Durgin
de6e0d8112 OSDCaps: fix allow_all()
OSD_CAP_ANY is not a mask. Treating it as one made any allowance
equivalent to 'allow *'.

Fixes: 
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-27 15:38:18 -07:00
Josh Durgin
e903ca7add OSDCap: fix output operators for caps
OSD_CAP_ANY is not a flag, but a value (0xff) that will always
be true when treated as a mask with a non-zero rwxa_t.

Don't duplicate the rwxa_t output operator in the OSDCapSpec output
operator, just use it.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-27 15:36:48 -07:00
Josh Durgin
1d747d1eb9 OSDCap: fix typo in comment
The grammar uses auid, not uid.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-27 15:36:47 -07:00
John Wilkins
30e10a9ac9 doc: RST cleanup for RPM dev package installs.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-27 15:02:42 -07:00
John Wilkins
2fc29fe9ef doc: Removed old ops directory structure and redundant files.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-27 15:02:05 -07:00
Sam Lang
ff96789e46 client: add WARN_UNUSED_RESULT to client init func
Adds the gcc attribute (if available) to client init functions to
ensure proper error handling.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-09-27 14:34:29 -07:00
Sam Lang
27c7c71f14 client: Remove unmaintained ldceph.cc from tree
Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-09-27 14:34:29 -07:00
Sam Lang
a1cfe74ae8 client: Mods to fix for messenger shutdown
This moves the shutdown of the messenger outside of the client
to be able to handle error cases more appropriately.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-09-27 14:34:29 -07:00
Dan Mick
1d231f9364 Refresh manpages from .rst sources
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-09-27 14:33:04 -07:00
Dan Mick
3c1e2e1928 manpage-howto.txt: note that man/Makefile.am may need update too
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-09-27 14:33:04 -07:00
Dan Mick
eb27f9addb Add howto for changing man pages
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-09-27 14:20:04 -07:00
Sage Weil
d37ca798be mon: update 'auth' help/usage
Fixes: 
Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-27 14:15:39 -07:00
Sage Weil
1d552a4ba0 rados: fix man page
Default bench IO size if 4MB.

Fixes: 3230
Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-27 14:10:51 -07:00
Sage Weil
8740ddf97d doc: fix rpm url (part deux)
Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-27 14:00:40 -07:00
Sage Weil
18921ed2ef Merge remote-tracking branch 'gh/wip-watch-header-race' 2012-09-27 13:37:52 -07:00
Josh Durgin
6c5c939f1d librbd: fix includes for portability
This needs limits.h for Centos, and the inttypes.h wrapper for FreeBSD.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-27 13:34:22 -07:00
Sage Weil
aae9214c80 Merge remote-tracking branch 'gh/wip-osd'
Reviewed-by: Samuel Just <sam.just@inktank.com>
2012-09-27 13:33:45 -07:00
Yehuda Sadeh
c9266d6541 rgw: check that realloc succeeded
Was missing a test after a realloc.

Backport: argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-27 13:31:48 -07:00
Mike Ryan
45133971cc ReplicatedPG: track incoming pushes with perf counters
Add perf counters tracking the number of inbound pushes along with the
amount of data in each request.

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
2012-09-27 13:26:05 -07:00
Samuel Just
3f952afe5d PG: explicitely delay ops on backfill_pos
Previously, we considered backfill_pos degraded in order to delay
ops since a write to backfill_pos could generate a snap before
backfill_pos, and we assume that (0, backfill_pos) is fully
backfilled.  This is a problem since it's possible that
backfill_pos is a valid object, but not one that currently exists.
For example, it might have been deleted since last_backfill was
last changed.  Instead, we will explicitly delay ops on
backfill_pos in waiting_for_backfill_pos.

This error resulted in  since wait_for_degraded_object also
attempts to recover the object. At this point, the primary would
attempt to recover the object, find that it isn't there, and put
it in the missing set with need=0,0.  Eventually, recover_primary
attempts to recover that object, finds that it has been deleted
in the log, and asserts.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-09-27 13:21:53 -07:00
Sage Weil
a351f7a1f4 Merge remote-tracking branch 'gh/wip_backfill_full2'
Conflicts:
	src/include/ceph_features.h
2012-09-27 13:21:23 -07:00
Samuel Just
0a2f827850 PG: last_complete might be outside of the log
When we encounter a divergent log entry, we put the
object into the missing set at the prior_version
for the divergent event.  Unfortunately, the event
at prior_version might have been trimmed leaving
the missing set with an item with a need prior to
log_tail.  Thus, last_complete also ends up being
prior to log_tail.

Caused .

There is another bug related to this one: .

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-09-27 13:20:35 -07:00
Sage Weil
4c4c9d503e doc: fix rpm url
Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-27 13:06:03 -07:00
Sage Weil
879b34daa9 v0.52
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQZIivAAoJEH6/3V0X7TFtgggQAKU97wvpdnqeYdGPDWH5A8sR
 HGzsSvJFTMTDCN42sJA/QFCaBYEO0BUlng8bJBFVCgPrn2Rl8GhMORRyTnzHiRhr
 DHHgI5zoGtteYHYByCXcTGh4iSxcClmXLNIP4kd4TY15By/npcHo5zDZ7fOQENb8
 9OCF38eu7xIU1VhNCo97pNoKCGM0THfCvY+qbRiZ7rSaMPoU2h55+f28n/8NHyoC
 a3COmQB3QHErf9J1o+6zwBRM+z03+5i5J5ojv+FFaOj8r0KgNTssDCuolYPdyhL/
 xaQOtEc6QHH4qYpEMxbMdTgyTkssnn8Qtqb1XqxjCoL7W1YxKiRfQCathVjROQ2b
 wTkyN1JihLxzcWmoFph7z2gtPcTaqajlp800qxUjC8kQj63YhIUiSLMMMUqkxhLw
 GkWRflrzVXRhrVfTajFzKrzjDm9vuzZz+hxvJLVRGwReJ48rxOybzA69hUc9fpbo
 Tgui3CSJAEqlqgXb8VKmwOJJu+IYjJrOEON/5++lNSexN8fAqDyMC2HTPlClQqnp
 fDK9AT9xGsm6V/PB40I8jmhOVH23LttAUqW6M3kEMmIBBdF/krv1K+UPfKCMxFS/
 xsxfRNmVd84ycJWvPSxUPkWdl0bDRj9PQnV9iCuZiAY9f19dYhPWJp3c8v7ThPTB
 oFL9UJFMDcFJ3uWcsa/p
 =MsuW
 -----END PGP SIGNATURE-----

Merge tag 'v0.52'

v0.52

Conflicts:
	src/rgw/rgw_rados.cc
2012-09-27 12:54:07 -07:00
Yehuda Sadeh
214327ef6f rgw: copy_object should not override ETAG implicitly
When copying an object with new attrs, we still need to
maintain the ETAG.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>

Conflicts:
	src/rgw/rgw_rados.cc
2012-09-27 12:52:21 -07:00
Jim Schutt
25a9620a72 FileJournal: correctly check return value of lseek in write_fd
Signed-off-by: Jim Schutt <jaschut@sandia.gov>
2012-09-27 11:09:50 -07:00
Josh Durgin
303f640ce5 OSDCap: remove grants added during failed parsing
Parsing has side effects that must be undone if it fails.  A
capability string like 'allow rwx pool=bar' will add the grant for
'allow rwx' and then fail on the 'pool=bar'. Thus, the client will
effectively have 'rwx' permissions on all pools.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-27 10:50:10 -07:00
Josh Durgin
3144690937 doc: fix injectargs syntax
The OSD processes only a single string. The existing example wouldn't
even be passed to the OSD, since it would be interpreted as an option
to the ceph command.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-27 10:19:59 -07:00
Gary Lowell
e48859474c v0.52 2012-09-27 16:26:11 +00:00
Sage Weil
9e9c5f2591 osd: make 'pg <pgid> revert ...' command idempotent
A failure in the ceph tool -> osd connection may mean this command is sent
twice.  This regularly causes failures in QA.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-27 08:11:58 -07:00
Sage Weil
d3d1b7b377 Merge remote-tracking branch 'gh/wip-rbd-docs' 2012-09-26 18:43:34 -07:00
Sage Weil
de5bb62e9c Merge remote-tracking branch 'gh/wip_coverity_osd'
Conflicts:
	src/librbd/internal.cc

Reviewed-by: Sage Weil <sage@inktank.com>
2012-09-26 18:43:12 -07:00
Sage Weil
f6da4377d0 Merge branch 'wip-rpm-doc' 2012-09-26 18:42:52 -07:00