]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agoutime: restore ostream state
Sage Weil [Fri, 28 Sep 2012 14:10:05 +0000 (07:10 -0700)]
utime: restore ostream state

CID 717130: Not restoring ostream format (STREAM_FORMAT_STATE)
At (4): Changing format state of stream "out" for category fill without later restoring it.

CID 717131: Not restoring ostream format (STREAM_FORMAT_STATE)
At (4): Changing format state of stream "out" for category fill without later restoring it.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agostringify: use const ref
Sage Weil [Fri, 28 Sep 2012 14:09:33 +0000 (07:09 -0700)]
stringify: use const ref

CID 727974: 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>
12 years agoaddr_parsing: fix memory leak
Sage Weil [Fri, 28 Sep 2012 14:05:27 +0000 (07:05 -0700)]
addr_parsing: fix memory leak

CID 717082: Resource leak (RESOURCE_LEAK)
At (4): Variable "buf" going out of scope leaks the storage it points to.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agopidfile: fix fd leak from pidfile_remove()
Sage Weil [Fri, 28 Sep 2012 14:04:06 +0000 (07:04 -0700)]
pidfile: fix fd leak from pidfile_remove()

CID 717081: Resource leak (RESOURCE_LEAK)
At (10): Handle variable "fd" going out of scope leaks the handle.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocrushtester: fix uninit var
Sage Weil [Fri, 28 Sep 2012 14:00:12 +0000 (07:00 -0700)]
crushtester: fix uninit var

CID 717197: Uninitialized scalar variable (UNINIT)
At (35): Using uninitialized value "only_osd_affected".

Fix some whitespace too.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocrushtester: avoid divide by zero
Sage Weil [Fri, 28 Sep 2012 13:57:58 +0000 (06:57 -0700)]
crushtester: avoid divide by zero

CID 716906: Division or modulo by zero (DIVIDE_BY_ZERO)
At (214): In expression "(float)weight[i] / (float)total_weight", division by expression "total_weight" which may be zero has undefined behavior.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocrushtester: avoid divide by zero
Sage Weil [Fri, 28 Sep 2012 13:56:20 +0000 (06:56 -0700)]
crushtester: avoid divide by zero

CID 716904: Division or modulo by zero (DIVIDE_BY_ZERO)
At (4): In expression "(float)weight[i] / (float)total_weight", division by expression "total_weight" which may be zero has undefined behavior.

At (8): On this path, function call "this->crush->get_max_devices()" has return value of 0
CID 716905: Division or modulo by zero (DIVIDE_BY_ZERO)
At (9): In expression "lrand48() % this->crush->get_max_devices()" modulo by expression "this->crush->get_max_devices()" which may be zero has undefined behavior.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoadminsocket: fix sock-fd leak in failure path
Sage Weil [Fri, 28 Sep 2012 13:48:11 +0000 (06:48 -0700)]
adminsocket: fix sock-fd leak in failure path

CID 728088: Resource leak (RESOURCE_LEAK)
At (9): Handle variable "sock_fd" going out of scope leaks the handle.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoPrebufferedStream: avoid dereferencing end()
Sage Weil [Fri, 28 Sep 2012 13:45:06 +0000 (06:45 -0700)]
PrebufferedStream: avoid dereferencing end()

This appeared to work, but probably isn't a good idea.

CID 716940: Using invalid iterator (INVALIDATE_ITERATOR)
At (4): Dereferencing iterator "this->m_overflow.end()" though it is already past the end of its container.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoperfcounters: remove unused members
Sage Weil [Fri, 28 Sep 2012 04:03:02 +0000 (21:03 -0700)]
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>
12 years agoobj_bencher: protect with lock
Sage Weil [Fri, 28 Sep 2012 03:55:37 +0000 (20:55 -0700)]
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>
12 years agoobj_bencher: possible divice by zero
Sage Weil [Fri, 28 Sep 2012 01:21:08 +0000 (18:21 -0700)]
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>
12 years agolockep: fix leak in failure/assert path
Sage Weil [Fri, 28 Sep 2012 01:20:46 +0000 (18:20 -0700)]
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>
12 years agoipaddr: fix buffer overrun on ipv6 prefix of 128
Sage Weil [Fri, 28 Sep 2012 01:17:08 +0000 (18:17 -0700)]
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>
12 years agoconfig: don't leak buf on dump config
Sage Weil [Fri, 28 Sep 2012 01:15:11 +0000 (18:15 -0700)]
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>
12 years agobuffer: init data val in ctor
Sage Weil [Fri, 28 Sep 2012 01:13:24 +0000 (18:13 -0700)]
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>
12 years agobuffer: restore stream state after hexdump()
Sage Weil [Fri, 28 Sep 2012 01:12:20 +0000 (18:12 -0700)]
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>
12 years agoadminsocket: init vars in ctor
Sage Weil [Fri, 28 Sep 2012 01:11:51 +0000 (18:11 -0700)]
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>
12 years agoadminsocket: change failure test
Sage Weil [Fri, 28 Sep 2012 01:02:45 +0000 (18:02 -0700)]
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>
12 years agoadminsocket: check return value
Sage Weil [Fri, 28 Sep 2012 01:02:10 +0000 (18:02 -0700)]
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>
12 years agoworkqueue: reset heartbeat timeout under lock
Sage Weil [Fri, 28 Sep 2012 00:55:28 +0000 (17:55 -0700)]
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>
12 years agoMemoryModel: init in ctor
Sage Weil [Fri, 28 Sep 2012 00:49:44 +0000 (17:49 -0700)]
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>
12 years agoLogEntry: init in ctor
Sage Weil [Fri, 28 Sep 2012 00:48:26 +0000 (17:48 -0700)]
LogEntry: init in ctor

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: Added commentary for BMC and VLAN.
John Wilkins [Thu, 27 Sep 2012 23:50:16 +0000 (16:50 -0700)]
doc: Added commentary for BMC and VLAN.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-osd-caps'
Sage Weil [Thu, 27 Sep 2012 23:34:03 +0000 (16:34 -0700)]
Merge remote-tracking branch 'gh/wip-osd-caps'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agotest: add more OSDCap unit tests
Josh Durgin [Thu, 27 Sep 2012 22:24:03 +0000 (15:24 -0700)]
test: add more OSDCap unit tests

Check that allow_all() returns false when 'allow *' is not specified.
This would have caught #3228.
Add tests for the output operators as well.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoOSDCaps: fix allow_all()
Josh Durgin [Thu, 27 Sep 2012 21:44:57 +0000 (14:44 -0700)]
OSDCaps: fix allow_all()

OSD_CAP_ANY is not a mask. Treating it as one made any allowance
equivalent to 'allow *'.

Fixes: #3228
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoOSDCap: fix output operators for caps
Josh Durgin [Thu, 27 Sep 2012 21:41:24 +0000 (14:41 -0700)]
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>
12 years agoOSDCap: fix typo in comment
Josh Durgin [Wed, 26 Sep 2012 23:54:37 +0000 (16:54 -0700)]
OSDCap: fix typo in comment

The grammar uses auid, not uid.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agodoc: RST cleanup for RPM dev package installs.
John Wilkins [Thu, 27 Sep 2012 22:02:42 +0000 (15:02 -0700)]
doc: RST cleanup for RPM dev package installs.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Removed old ops directory structure and redundant files.
John Wilkins [Thu, 27 Sep 2012 22:02:05 +0000 (15:02 -0700)]
doc: Removed old ops directory structure and redundant files.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoclient: add WARN_UNUSED_RESULT to client init func
Sam Lang [Mon, 24 Sep 2012 21:09:43 +0000 (14:09 -0700)]
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>
12 years agoclient: Remove unmaintained ldceph.cc from tree
Sam Lang [Mon, 24 Sep 2012 20:37:52 +0000 (13:37 -0700)]
client: Remove unmaintained ldceph.cc from tree

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Mods to fix #3184 for messenger shutdown
Sam Lang [Mon, 24 Sep 2012 20:31:15 +0000 (13:31 -0700)]
client: Mods to fix #3184 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>
12 years agoRefresh manpages from .rst sources
Dan Mick [Thu, 27 Sep 2012 21:23:42 +0000 (14:23 -0700)]
Refresh manpages from .rst sources

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agomanpage-howto.txt: note that man/Makefile.am may need update too
Dan Mick [Thu, 27 Sep 2012 21:32:28 +0000 (14:32 -0700)]
manpage-howto.txt: note that man/Makefile.am may need update too

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoAdd howto for changing man pages
Dan Mick [Thu, 27 Sep 2012 21:20:04 +0000 (14:20 -0700)]
Add howto for changing man pages

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agomon: update 'auth' help/usage
Sage Weil [Thu, 27 Sep 2012 21:15:39 +0000 (14:15 -0700)]
mon: update 'auth' help/usage

Fixes: #3227
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agorados: fix man page
Sage Weil [Thu, 27 Sep 2012 21:10:51 +0000 (14:10 -0700)]
rados: fix man page

Default bench IO size if 4MB.

Fixes: 3230
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: fix rpm url (part deux)
Sage Weil [Thu, 27 Sep 2012 21:00:40 +0000 (14:00 -0700)]
doc: fix rpm url (part deux)

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-watch-header-race'
Sage Weil [Thu, 27 Sep 2012 20:37:52 +0000 (13:37 -0700)]
Merge remote-tracking branch 'gh/wip-watch-header-race'

12 years agolibrbd: fix includes for portability
Josh Durgin [Wed, 26 Sep 2012 23:58:32 +0000 (16:58 -0700)]
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>
12 years agoMerge remote-tracking branch 'gh/wip-osd'
Sage Weil [Thu, 27 Sep 2012 20:33:45 +0000 (13:33 -0700)]
Merge remote-tracking branch 'gh/wip-osd'

Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agorgw: check that realloc succeeded
Yehuda Sadeh [Wed, 22 Aug 2012 17:04:59 +0000 (10:04 -0700)]
rgw: check that realloc succeeded

Was missing a test after a realloc.

Backport: argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoReplicatedPG: track incoming pushes with perf counters
Mike Ryan [Fri, 21 Sep 2012 16:49:39 +0000 (09:49 -0700)]
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>
12 years agoPG: explicitely delay ops on backfill_pos
Samuel Just [Mon, 24 Sep 2012 21:33:17 +0000 (14:33 -0700)]
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 #2691 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>
12 years agoMerge remote-tracking branch 'gh/wip_backfill_full2'
Sage Weil [Thu, 27 Sep 2012 20:21:23 +0000 (13:21 -0700)]
Merge remote-tracking branch 'gh/wip_backfill_full2'

Conflicts:
src/include/ceph_features.h

12 years agoPG: last_complete might be outside of the log
Samuel Just [Tue, 25 Sep 2012 18:07:07 +0000 (11:07 -0700)]
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 #3208.

There is another bug related to this one: #3213.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agodoc: fix rpm url
Sage Weil [Thu, 27 Sep 2012 20:06:03 +0000 (13:06 -0700)]
doc: fix rpm url

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge tag 'v0.52'
Sage Weil [Thu, 27 Sep 2012 19:54:07 +0000 (12:54 -0700)]
Merge tag 'v0.52'

v0.52

Conflicts:
src/rgw/rgw_rados.cc

12 years agorgw: copy_object should not override ETAG implicitly
Yehuda Sadeh [Wed, 26 Sep 2012 22:43:56 +0000 (15:43 -0700)]
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

12 years agoFileJournal: correctly check return value of lseek in write_fd
Jim Schutt [Thu, 27 Sep 2012 18:06:29 +0000 (12:06 -0600)]
FileJournal: correctly check return value of lseek in write_fd

Signed-off-by: Jim Schutt <jaschut@sandia.gov>
12 years agoOSDCap: remove grants added during failed parsing
Josh Durgin [Wed, 26 Sep 2012 20:44:02 +0000 (13:44 -0700)]
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>
12 years agodoc: fix injectargs syntax
Josh Durgin [Thu, 27 Sep 2012 17:19:55 +0000 (10:19 -0700)]
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>
12 years agov0.52 v0.52
Gary Lowell [Thu, 27 Sep 2012 16:26:11 +0000 (16:26 +0000)]
v0.52

12 years agoosd: make 'pg <pgid> revert ...' command idempotent
Sage Weil [Thu, 27 Sep 2012 15:11:58 +0000 (08:11 -0700)]
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>
12 years agoMerge remote-tracking branch 'gh/wip-rbd-docs'
Sage Weil [Thu, 27 Sep 2012 01:43:34 +0000 (18:43 -0700)]
Merge remote-tracking branch 'gh/wip-rbd-docs'

12 years agoMerge remote-tracking branch 'gh/wip_coverity_osd'
Sage Weil [Thu, 27 Sep 2012 01:43:12 +0000 (18:43 -0700)]
Merge remote-tracking branch 'gh/wip_coverity_osd'

Conflicts:
src/librbd/internal.cc

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-rpm-doc'
Sage Weil [Thu, 27 Sep 2012 01:42:52 +0000 (18:42 -0700)]
Merge branch 'wip-rpm-doc'

12 years agocephfs: Fix breakage of cephfs link
Sam Lang [Thu, 27 Sep 2012 00:50:19 +0000 (17:50 -0700)]
cephfs:  Fix breakage of cephfs link

Add libcommon.la to LDADD for cephfs.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agodoc: update ceph-authtool man page
Josh Durgin [Thu, 27 Sep 2012 00:33:35 +0000 (17:33 -0700)]
doc: update ceph-authtool man page

* document osd capabilities
* fix librados user example
* fix example with outdated syntax (pool= and uid= are not supported)
* ignore auid, object prefix, and class restrictions for now since
  they aren't usable yet
* fix header for keyring file section

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agodoc: clarify rbd caching
Josh Durgin [Thu, 27 Sep 2012 00:29:18 +0000 (17:29 -0700)]
doc: clarify rbd caching

* note that it's only for librbd
* put settings in the [client] section for clarity
* fix typo
* re-indent and clarify sentence about clustered fs on top of RBD

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agodoc: fix typo in dev layering notes
Josh Durgin [Wed, 26 Sep 2012 00:23:23 +0000 (17:23 -0700)]
doc: fix typo in dev layering notes

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agodoc: small fixes to the OpenStack page
Josh Durgin [Wed, 26 Sep 2012 00:21:52 +0000 (17:21 -0700)]
doc: small fixes to the OpenStack page

* 'Ceph common' is not a package name
* config dir is /etc/nova, not /etc/conf
* remove trailing whitespace

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agodoc: remove MDS from diagram describing RBD and OpenStack
Josh Durgin [Wed, 26 Sep 2012 00:19:50 +0000 (17:19 -0700)]
doc: remove MDS from diagram describing RBD and OpenStack

The MDS is not used with RBD or librados.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agodoc: extend QEMU/RBD docs
Josh Durgin [Wed, 26 Sep 2012 00:08:48 +0000 (17:08 -0700)]
doc: extend QEMU/RBD docs

Describe running a vm from RBD, cache options, and discard support.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agodoc: minor fixups to rpm install doc
Sage Weil [Thu, 27 Sep 2012 00:38:24 +0000 (17:38 -0700)]
doc: minor fixups to rpm install doc

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: draft rpm installation
Gary Lowell [Wed, 26 Sep 2012 20:47:29 +0000 (13:47 -0700)]
doc: draft rpm installation

12 years agocephfs: Fix warning - use err instead of errno
Sam Lang [Thu, 27 Sep 2012 00:28:21 +0000 (17:28 -0700)]
cephfs: Fix warning - use err instead of errno

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Fix compile error: bad {0} initializers
Sam Lang [Thu, 27 Sep 2012 00:26:34 +0000 (17:26 -0700)]
client:  Fix compile error: bad {0} initializers

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-3186
Sage Weil [Thu, 27 Sep 2012 00:06:03 +0000 (17:06 -0700)]
Merge remote-tracking branch 'gh/wip-3186

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agorgw: different test for multi object delete
Yehuda Sadeh [Wed, 26 Sep 2012 23:55:15 +0000 (16:55 -0700)]
rgw: different test for multi object delete

We need to check for the existence of the sub-resource.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoMerge branch 'wip-coverity-client'
Sage Weil [Wed, 26 Sep 2012 23:45:07 +0000 (16:45 -0700)]
Merge branch 'wip-coverity-client'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoclient: Fix coverity UNINIT_CTOR defects
Sam Lang [Wed, 26 Sep 2012 02:32:52 +0000 (19:32 -0700)]
client: Fix coverity UNINIT_CTOR defects

Coverity finds cases where constructors are not initializing
all the members of the struct/class.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Fix coverity 716909 [FORWARD_NULL]
Sam Lang [Wed, 26 Sep 2012 02:11:45 +0000 (19:11 -0700)]
client: Fix coverity 716909 [FORWARD_NULL]

If we fill the request path from the dentry instead of the inode, we
need to use the dentry inode.  This fixes a segfault that would occur
in the case where request->inode is in fact null.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Add asserts for coverity bugs
Sam Lang [Wed, 26 Sep 2012 02:03:49 +0000 (19:03 -0700)]
client: Add asserts for coverity bugs

Coverity 716907-716909 [FORWARD_NULL} doesn't like using a pointer
that might be null.  Assertions check that pointers are valid
before dereferencing.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Fixes coverity defect 716891
Sam Lang [Tue, 25 Sep 2012 16:13:26 +0000 (09:13 -0700)]
client:  Fixes coverity defect 716891

Fix for coverity defect 716891 [DEADCODE] in
Client::encode_dentry_release where the released var is initialized
to 0, but never set, so the pre-emptive release of the dentry
capability (if requested by the drop flag) never happens.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Fixes coverity defect 716890 [DEADCODE]
Sam Lang [Tue, 25 Sep 2012 16:07:00 +0000 (09:07 -0700)]
client:  Fixes coverity defect 716890 [DEADCODE]

In choose_target_mds, the mds number is initialized to 0 and
then a separate target mds number is chosen based on the inode
set in the request.  If the inode isn't set, we drop to choosing
a random mds, but only if the mds number is < 0, which doesn't
happen with the initialize to 0.  This fix initializes the mds
number to -1, ensuring a random mds is chosen.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Coverity fixes for 716841-716844
Sam Lang [Tue, 25 Sep 2012 16:04:02 +0000 (09:04 -0700)]
client: Coverity fixes for 716841-716844

Fixes coverity errors (CHECKED_RETURN) for all calls to
Client::path_walk() where return value wasn't getting checked
in case of error.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agocephfs: Fixes for coverity bugs 716840 and 716970
Sam Lang [Tue, 25 Sep 2012 14:03:57 +0000 (07:03 -0700)]
cephfs:  Fixes for coverity bugs 716840 and 716970

Fixes for two coverity bugs in cephfs.cc.

716840 (CHECKED_RETURN) reported that the return value from
fstat wasn't getting checked.  It now is checked, reports an
error and returns to the caller.

716970 (NEGATIVE_RETURNS) reported that the file descriptor passed
to fstat (*fd) might be negative, which isn't allowed.  The check at
the top that open failed wasn't aborting the function (when *fd < 0),
now it does.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agorgw: copy_object should not override ETAG implicitly
Yehuda Sadeh [Wed, 26 Sep 2012 22:43:56 +0000 (15:43 -0700)]
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>
12 years agomds: Move check for empty path lookup to getattr
Sam Lang [Wed, 26 Sep 2012 23:04:50 +0000 (16:04 -0700)]
mds: Move check for empty path lookup to getattr

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoPG, OSD: reject backfills when an OSD is nearly full
Mike Ryan [Fri, 14 Sep 2012 17:31:42 +0000 (10:31 -0700)]
PG, OSD: reject backfills when an OSD is nearly full

Reject backfills when an OSD reaches a configurable full ratio. Retry
backfilling periodically in the hopes that the OSD has become less full.

This changeset introduces two configuration options for dealing with
this: osd_refuse_backfill_full_ratio and osd_backfill_retry_interval.

We also introduce two new state transitions in the PG's Active state.

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
12 years agotimer: add unsafe callbacks option
Mike Ryan [Fri, 14 Sep 2012 17:30:17 +0000 (10:30 -0700)]
timer: add unsafe callbacks option

Using unsafe callbacks drops the lock between invocations of event
callbacks. It is useful under some circumstances, but the user must take
caution. See the comment in Timer.h for full details.

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
12 years agodoc: Fixed typo.
John Wilkins [Wed, 26 Sep 2012 18:06:26 +0000 (11:06 -0700)]
doc: Fixed typo.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoJournalingObjectStore: lock journal_lock at top of journal_replay
Samuel Just [Tue, 25 Sep 2012 23:07:23 +0000 (16:07 -0700)]
JournalingObjectStore: lock journal_lock at top of journal_replay

CID 716968: Data race condition (MISSING_LOCK)At (6): Accessing "this->op_seq"
("JournalingObjectStore.op_seq") requires the "Mutex._m" lock.

Doesn't really matter, but this should satisfy coverity.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoFlatIndex: terminate dir_name buffer passed to strncpy
Samuel Just [Tue, 25 Sep 2012 22:47:34 +0000 (15:47 -0700)]
FlatIndex: terminate dir_name buffer passed to strncpy

CID 716836: Buffer not null terminated (BUFFER_SIZE_WARNING)At (1): Calling
strncpy with a maximum size argument of 4096 bytes on destination array
"dir_name" of size 4096 bytes might leave the destination string unterminated.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoFileStore: uninit var in ctor OpSequencer::parent
Samuel Just [Tue, 25 Sep 2012 22:46:44 +0000 (15:46 -0700)]
FileStore: uninit var in ctor OpSequencer::parent

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

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoFileStore: fix omap_store and dbomap leaks in mount
Samuel Just [Tue, 25 Sep 2012 22:35:39 +0000 (15:35 -0700)]
FileStore: fix omap_store and dbomap leaks in mount

CID 717093: Resource leak (RESOURCE_LEAK)At (48): Variable "omap_store" going
out of scope leaks the storage it points to.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoFileStore: don't leak r in mount
Samuel Just [Tue, 25 Sep 2012 22:29:18 +0000 (15:29 -0700)]
FileStore: don't leak r in mount

ID 717092: Resource leak (RESOURCE_LEAK)At (40): Handle variable "r" going out
of scope leaks the handle.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoFileStore: fix fd and tmpfd leaks in _detect_fs()
Samuel Just [Tue, 25 Sep 2012 22:22:35 +0000 (15:22 -0700)]
FileStore: fix fd and tmpfd leaks in _detect_fs()

CID 717088: Resource leak (RESOURCE_LEAK)At (11): Handle variable "tmpfd" going
out of scope leaks the handle.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoFileStore: fix leaked fd and check lseek in _test_fiemap
Samuel Just [Tue, 25 Sep 2012 22:18:13 +0000 (15:18 -0700)]
FileStore: fix leaked fd and check lseek in _test_fiemap

CID 716861: Other violation (CHECKED_RETURN)At (3): Calling function "lseek(fd,
off, 0)" without checking return value. This library function may fail and
return an error code.

CID 717090: Resource leak (RESOURCE_LEAK)At (10): Handle variable "fd" going
out of scope leaks the handle.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoFileStore: fix filedescriptor leak in mkfs
Samuel Just [Tue, 25 Sep 2012 22:15:58 +0000 (15:15 -0700)]
FileStore: fix filedescriptor leak in mkfs

CID 717091: Resource leak (RESOURCE_LEAK)At (39): Handle variable "fd" going
out of scope leaks the handle.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoFileStore: fix statfs,fstatfs,fstat ret val checks
Samuel Just [Tue, 25 Sep 2012 22:11:25 +0000 (15:11 -0700)]
FileStore: fix statfs,fstatfs,fstat ret val checks

CID 716863: Other violation (CHECKED_RETURN)At (20): Calling function
"fstat(basedir_fd, &basest)" without checking return value. This library
function may fail and return an error code.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoFileJournal: uninit var in ctor aio_ctx FileJournal
Samuel Just [Tue, 25 Sep 2012 22:05:09 +0000 (15:05 -0700)]
FileJournal: uninit var in ctor aio_ctx FileJournal

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

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoFileJournal: uninit var in ctor FileJournal
Samuel Just [Tue, 25 Sep 2012 21:59:07 +0000 (14:59 -0700)]
FileJournal: uninit var in ctor FileJournal

CID 717332: Uninitialized pointer field (UNINIT_CTOR)At (12): Non-static class
member field "iocb.aio_fildes" is not initialized in this constructor nor in
any functions that it calls.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoFileJournal: check return value of lseek in write_fd
Samuel Just [Tue, 25 Sep 2012 21:19:49 +0000 (14:19 -0700)]
FileJournal: check return value of lseek in write_fd

CID 716859: Other violation (CHECKED_RETURN)At (1): Calling function
"lseek64(this->fd, pos, 0)" without checking return value. This library
function may fail and return an error code.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-mon-gv'
Sage Weil [Wed, 26 Sep 2012 16:47:18 +0000 (09:47 -0700)]
Merge remote-tracking branch 'gh/wip-mon-gv'

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Conflicts:
src/include/ceph_features.h

12 years agoclient: Fix for #3184 cfuse segv with no keyring
Sam Lang [Mon, 24 Sep 2012 16:55:25 +0000 (09:55 -0700)]
client: Fix for #3184 cfuse segv with no keyring

Fixes bug #3184 where the ceph-fuse client segfaults if authx is
enabled but no keyring file is present.  This was due to the
client->init() return value not getting checked.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agomds: fix ino release on session close
Sage Weil [Sat, 22 Sep 2012 05:20:09 +0000 (22:20 -0700)]
mds: fix ino release on session close

If we project an inode release, we need to follow through, even if for
some reason we decide to keep the session active.  Clear out the session
interval_sets in case that happens.

Fixes: #1677
Signed-off-by: Sage Weil <sage@inktank.com>