]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agov0.43 v0.53
Gary Lowell [Tue, 16 Oct 2012 17:42:36 +0000 (17:42 +0000)]
v0.43

12 years agoMerge remote-tracking branch 'gh/wip-fedora18' into next
Sage Weil [Tue, 16 Oct 2012 16:05:55 +0000 (09:05 -0700)]
Merge remote-tracking branch 'gh/wip-fedora18' into next

12 years agoadmin_socket: fix '0' protocol version
Sage Weil [Mon, 15 Oct 2012 23:37:05 +0000 (16:37 -0700)]
admin_socket: fix '0' protocol version

Broken by 895e24d198ced83ab7fed3725f12f75e3bc97b0b.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMakefile: Add CRYPTO_C(XX)FLAGS to librdb
Gary Lowell [Thu, 11 Oct 2012 18:05:10 +0000 (11:05 -0700)]
Makefile:  Add CRYPTO_C(XX)FLAGS to librdb

12 years agoMakefiles: Add ar-lib to .gitignore.
Gary Lowell [Tue, 9 Oct 2012 22:09:11 +0000 (15:09 -0700)]
Makefiles:  Add ar-lib to .gitignore.

12 years agoautogen.sh: On some platforms, the m4 is created earlier.
Gary Lowell [Tue, 9 Oct 2012 20:36:43 +0000 (13:36 -0700)]
autogen.sh:  On some platforms, the m4 is created earlier.

12 years agoautogen.sh: Create m4 directory for leveldb submodule.
Gary Lowell [Tue, 9 Oct 2012 20:10:15 +0000 (13:10 -0700)]
autogen.sh:  Create m4 directory for leveldb submodule.

12 years agoMakefiles: Update submodule reference to latestes for leveldb.
Gary Lowell [Tue, 9 Oct 2012 19:24:16 +0000 (12:24 -0700)]
Makefiles:  Update submodule reference to latestes for leveldb.

12 years agoMakefile: update submodule reference for leveldb.
Gary Lowell [Tue, 9 Oct 2012 16:28:22 +0000 (09:28 -0700)]
Makefile: update submodule reference for leveldb.

12 years agoleveldb: fix-up submodule entry.
Gary Lowell [Tue, 9 Oct 2012 06:45:45 +0000 (23:45 -0700)]
leveldb: fix-up submodule entry.

12 years agoMakefile: Improve test for boost system library.
Gary Lowell [Tue, 9 Oct 2012 05:56:05 +0000 (22:56 -0700)]
Makefile: Improve test for boost system library.

12 years agoMakefiles: Missing boost library should not be fatal.
Gary Lowell [Tue, 9 Oct 2012 02:18:56 +0000 (19:18 -0700)]
Makefiles:  Missing boost library should not be fatal.

12 years agoMakefiles: ignore the m4 macro directory
Gary Lowell [Tue, 9 Oct 2012 01:12:06 +0000 (18:12 -0700)]
Makefiles:  ignore the m4 macro directory

12 years agoMakefile: Updates to eliminates warnings, add test for boost system lib.
Gary Lowell [Mon, 8 Oct 2012 17:04:25 +0000 (10:04 -0700)]
Makefile:  Updates to eliminates warnings, add test for boost system lib.

12 years agoMOSDBoot: fix compatibility with ~argonaut
Sage Weil [Tue, 2 Oct 2012 21:59:11 +0000 (14:59 -0700)]
MOSDBoot: fix compatibility with ~argonaut

I revved this message and forgot to set the compat version correctly,
preventing post-change (e.g., bobtail) OSDs from talking to pre-change
(e.g., argonaut) monitors.  This was in b64641c.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: simplify math
Sage Weil [Sat, 29 Sep 2012 08:22:19 +0000 (01:22 -0700)]
librbd: simplify math

Bending over backwards hasn't made coverity happy.  We'll just ignore it
there.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit c517fde2691f974693ce581f8e215512194e79d3)

12 years agomon: Elector: clean ack set on election start
Joao Eduardo Luis [Thu, 4 Oct 2012 16:34:37 +0000 (17:34 +0100)]
mon: Elector: clean ack set on election start

We should never consider old 'acks' from monitors on a new election. We
usually do it, but we didn't if an election expired, because this code
didn't foresee the possibility of monitors changing ranks in-between
elections -- which doesn't happen if we specify the monmap during the
monitor's mkfs, but may happen when relying on 'mon initial peers'.

Failing to do so triggered an assertion after fixing bug #3252.

Backport: argonaut

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: Elector: bootstrap on new monmap from elector
Joao Eduardo Luis [Thu, 4 Oct 2012 16:29:22 +0000 (17:29 +0100)]
mon: Elector: bootstrap on new monmap from elector

Whenever we update the monmap we should bootstrap, in order to reset the
monitor's on-going activities and re-probe.

Not doing so contributed to bug #3252, during which we entered an infinite
election cycle. This may only happen though when we rely on 'mon initial
peers'. Specifying a monmap during the monitor's mkfs should not trigger
this bug.

Fixes: #3252
Backport: argonaut

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: do not tick() until all paxos instances recover
Sage Weil [Wed, 3 Oct 2012 23:24:18 +0000 (16:24 -0700)]
mon: do not tick() until all paxos instances recover

We cannot propose until they all recover.

Fixes: #3260
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoMerge branch 'wip-msgr' into next
Dan Mick [Tue, 2 Oct 2012 23:06:59 +0000 (16:06 -0700)]
Merge branch 'wip-msgr' into next

12 years agoAvoid sign-extension of non-magic Message* values
Dan Mick [Tue, 2 Oct 2012 22:37:42 +0000 (15:37 -0700)]
Avoid sign-extension of non-magic Message* values

Cast to (unsigned long) when checking for magic values, so
real ptrs don't get sign-extended.  Avoids triggering
assert(inq == &local_queue) failure.

Fixes: #3251
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage.weil@inktank.com>
12 years agotest_libcephfs: fix test
Sage Weil [Mon, 1 Oct 2012 03:24:23 +0000 (20:24 -0700)]
test_libcephfs: fix test

Can't close an already-closed dir handle.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibcephfs: fix test workunit
Sage Weil [Mon, 1 Oct 2012 03:54:25 +0000 (20:54 -0700)]
libcephfs: fix test workunit

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: fix recovered_peon assert
Sage Weil [Sun, 30 Sep 2012 22:12:46 +0000 (15:12 -0700)]
mon: fix recovered_peon assert

Recovered_peon() can get called multiple times for a given machine id.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: debug recovered_{peon,leader}
Sage Weil [Sun, 30 Sep 2012 21:26:52 +0000 (14:26 -0700)]
mon: debug recovered_{peon,leader}

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoFileStore: use fresh vector for calls for listing collection
Samuel Just [Fri, 28 Sep 2012 23:19:56 +0000 (16:19 -0700)]
FileStore: use fresh vector for calls for listing collection

In collection_list_range, use an empty vector to pass into
collection_list_partial.  collection_list_partial stops
listing when the output vector exceeds the specified max.
If this happens before we hit the end of the range,
collection_list_range will spin forever.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Mike Ryan <mike.ryan@inktank.com>
Reviewed-by: Greg Farnum <greg@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