]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agoclient/hadoop/CephFSInterface.cc: prefer prefix ++operator for iterators 102/head
Danny Al-Gaaf [Tue, 12 Mar 2013 15:01:13 +0000 (16:01 +0100)]
client/hadoop/CephFSInterface.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agocls/rgw/cls_rgw.cc: prefer prefix --operator for iterators
Danny Al-Gaaf [Tue, 12 Mar 2013 14:59:29 +0000 (15:59 +0100)]
cls/rgw/cls_rgw.cc: prefer prefix --operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoclient/Inode.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Tue, 12 Mar 2013 14:43:30 +0000 (15:43 +0100)]
client/Inode.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoSyntheticClient.h: prefer prefix ++operator for iterators
Danny Al-Gaaf [Tue, 12 Mar 2013 14:36:14 +0000 (15:36 +0100)]
SyntheticClient.h: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoCephxKeyServer.h: prefer prefix ++operator for iterators
Danny Al-Gaaf [Tue, 12 Mar 2013 14:25:52 +0000 (15:25 +0100)]
CephxKeyServer.h: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoauth/Auth.h: prefer prefix ++operator for non-primitive types
Danny Al-Gaaf [Tue, 12 Mar 2013 14:18:01 +0000 (15:18 +0100)]
auth/Auth.h: prefer prefix ++operator for non-primitive types

Prefer prefix ++operator for non-primitive types like iterators for
performance reasons. Prefix ++/-- operators avoid creating a temporary
copy.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotools/rest_bench.cc: remove unused variable
Danny Al-Gaaf [Tue, 12 Mar 2013 11:47:22 +0000 (12:47 +0100)]
tools/rest_bench.cc: remove unused variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/test_filejournal.cc: use %u to format unsigned in sprintf()
Danny Al-Gaaf [Tue, 12 Mar 2013 11:28:53 +0000 (12:28 +0100)]
test/test_filejournal.cc: use %u to format unsigned in sprintf()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/system/st_rados_list_objects.cc: remove not needed statement
Danny Al-Gaaf [Tue, 12 Mar 2013 11:25:28 +0000 (12:25 +0100)]
test/system/st_rados_list_objects.cc: remove not needed statement

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/osd/RadosModel.h: remove unused variables
Danny Al-Gaaf [Tue, 12 Mar 2013 11:17:30 +0000 (12:17 +0100)]
test/osd/RadosModel.h: remove unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/osd/Object.cc: catch exception by reference
Danny Al-Gaaf [Tue, 12 Mar 2013 11:15:44 +0000 (12:15 +0100)]
test/osd/Object.cc: catch exception by reference

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/omap_bench.cc: remove unused variables
Danny Al-Gaaf [Tue, 12 Mar 2013 11:12:03 +0000 (12:12 +0100)]
test/omap_bench.cc: remove unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest_mon_workloadgen.cc: remove unused variables
Danny Al-Gaaf [Tue, 12 Mar 2013 10:53:59 +0000 (11:53 +0100)]
test_mon_workloadgen.cc: remove unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/librados/aio.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Tue, 12 Mar 2013 10:40:41 +0000 (11:40 +0100)]
test/librados/aio.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/encoding/ceph_dencoder.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Tue, 12 Mar 2013 10:04:24 +0000 (11:04 +0100)]
test/encoding/ceph_dencoder.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agobench/dumb_backend.h: remove never executed delete statement
Danny Al-Gaaf [Tue, 12 Mar 2013 10:00:32 +0000 (11:00 +0100)]
bench/dumb_backend.h: remove never executed delete statement

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest_object_map.cc: use %u to format unsigned in snprintf()
Danny Al-Gaaf [Tue, 12 Mar 2013 09:51:46 +0000 (10:51 +0100)]
test_object_map.cc: use %u to format unsigned in snprintf()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest_keyvaluedb_iterators.cc: remove unused variable
Danny Al-Gaaf [Tue, 12 Mar 2013 09:39:16 +0000 (10:39 +0100)]
test_keyvaluedb_iterators.cc: remove unused variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_xml.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Tue, 12 Mar 2013 09:36:53 +0000 (10:36 +0100)]
rgw/rgw_xml.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_user.cc: remove unused variables
Danny Al-Gaaf [Tue, 12 Mar 2013 09:33:26 +0000 (10:33 +0100)]
rgw/rgw_user.cc: remove unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_rest_usage.cc: remove unused variables
Danny Al-Gaaf [Tue, 12 Mar 2013 09:30:33 +0000 (10:30 +0100)]
rgw/rgw_rest_usage.cc: remove unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_rest_s3.cc: remove unused variables
Danny Al-Gaaf [Tue, 12 Mar 2013 09:29:48 +0000 (10:29 +0100)]
rgw/rgw_rest_s3.cc: remove unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_rados.cc: perform initialization of prefix in initialization list
Danny Al-Gaaf [Tue, 12 Mar 2013 09:18:32 +0000 (10:18 +0100)]
rgw/rgw_rados.cc: perform initialization of prefix in initialization list

Perform initialization of IntentLogNameFilter:prefix in initialization list
instead of constructor body.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_rados.cc: remove unused variables
Danny Al-Gaaf [Tue, 12 Mar 2013 09:16:45 +0000 (10:16 +0100)]
rgw/rgw_rados.cc: remove unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_rados.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Tue, 12 Mar 2013 09:01:07 +0000 (10:01 +0100)]
rgw/rgw_rados.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotesting: fix hadoop-internal-tests
Joe Buck [Tue, 12 Mar 2013 05:19:24 +0000 (22:19 -0700)]
testing: fix hadoop-internal-tests

The hadoop-internal-tests workunit needs
to be updated in light of our moving to
using stock Hadoop with our hadoop-cephfs
jars.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
12 years agoceph-disk-activate: rely on default/configured keyring path
Sage Weil [Tue, 12 Mar 2013 04:15:11 +0000 (21:15 -0700)]
ceph-disk-activate: rely on default/configured keyring path

No reason to override the default or configured value here.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-disk-activate: don't override default or configured osd journal path
Sage Weil [Tue, 12 Mar 2013 04:14:53 +0000 (21:14 -0700)]
ceph-disk-activate: don't override default or configured osd journal path

There is no reason not to rely on the default or obey any configured
value here.

Fixes: #4031
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'next'
Josh Durgin [Mon, 11 Mar 2013 23:59:05 +0000 (16:59 -0700)]
Merge branch 'next'

12 years agoMerge branch 'wip-rbd-flatten-cache' into next
Josh Durgin [Mon, 11 Mar 2013 23:56:35 +0000 (16:56 -0700)]
Merge branch 'wip-rbd-flatten-cache' into next

Reviewed-by: Sage Weil <sage.weil@inktank.com>
12 years agodebian: stop ceph-mds before uninstalling ceph-mds
Sage Weil [Tue, 12 Mar 2013 00:09:37 +0000 (17:09 -0700)]
debian: stop ceph-mds before uninstalling ceph-mds

Fixes: #4384
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Mon, 11 Mar 2013 23:57:00 +0000 (16:57 -0700)]
Merge remote-tracking branch 'gh/next'

12 years agolog: drop default 'log max recent' from 100k -> 10k
Sage Weil [Mon, 11 Mar 2013 23:25:16 +0000 (16:25 -0700)]
log: drop default 'log max recent' from 100k -> 10k

Use less memory.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: invalidate cache when flattening
Josh Durgin [Sat, 9 Mar 2013 02:57:24 +0000 (18:57 -0800)]
librbd: invalidate cache when flattening

The cache stores which objects don't exist. Flatten bypasses the cache
when doing its copyups, so when it is done the -ENOENT from the cache
is treated as zeroes instead of 'need to read from parent'.

Clients that have the image open need to forgot about the cached
non-existent objects as well. Do this during ictx_refresh, while the
parent_lock is held exclusively so no new reads from the parent can
happen until the updated parent metadata is visible, so no new reads
from the parent will occur.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: add a method to clear -ENOENT caching
Josh Durgin [Sat, 9 Mar 2013 01:53:31 +0000 (17:53 -0800)]
ObjectCacher: add a method to clear -ENOENT caching

Clear the exists and complete flags for any objects that have exists
set to false, and force any in-flight reads to retry if they get
-ENOENT instead of generating zeros.

This is useful for getting the cache into a consistent state for rbd
after an image has been flattened, since many objects which previously
did not exist and went up to the parent to retrieve data may now exist
in the child.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: keep track of outstanding reads on an object
Josh Durgin [Sat, 9 Mar 2013 01:49:27 +0000 (17:49 -0800)]
ObjectCacher: keep track of outstanding reads on an object

Reads always use C_ReadFinish as a callback (and they are the only
user of this callback). Keep an xlist of these for each object, so
they can remove themselves as they finish. To prevent racing requests
and with discard removing objects from the cache, clear the xlist in
the object destructor, so if the Object is still valid the set_item
will still be on the list.

Make the ObjectCacher constructor take an Object* instead of the pool
and object id, which are derived from the Object* anyway.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoceph: fix cli test
Sage Weil [Mon, 11 Mar 2013 21:54:50 +0000 (14:54 -0700)]
ceph: fix cli test

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoRevert "Use start-stop-daemon --chuid option to setuid to www-data."
Sage Weil [Mon, 11 Mar 2013 20:23:13 +0000 (13:23 -0700)]
Revert "Use start-stop-daemon --chuid option to setuid to www-data."

This reverts commit a99ed038ecaf170574ee75cd5ddb12f252f9bc26.

On second thought, this will require a bit more care to ensure that all
of the paths radosgw needs to read/write from have the correct permissions
in the packages and so forth.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-4135'
David Zafman [Mon, 11 Mar 2013 19:50:38 +0000 (12:50 -0700)]
Merge branch 'wip-4135'

Feature: #4135 - osd: noscrub, nodeepscrub osdmap flags

Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agomon: Paxos: increase trim tolerance from 3 to 30.
Joao Eduardo Luis [Mon, 11 Mar 2013 16:45:10 +0000 (16:45 +0000)]
mon: Paxos: increase trim tolerance from 3 to 30.

This increase only means that we'll keep more versions around before we
trim.  It doesn't change the number of versions we'll keep around after
trimming (that's still as much as 'paxos_max_join_drift', i.e. 10), nor
does it change the criteria used to consider a monitor as having drifted
(same rule applies, 'paxos_max_join_drift').

This change however will enable the leader to put off trimming for a longer
period of time, giving a better chance for a monitor to join the cluster.
See, after going through the probing phase, at which point a monitor may
only be, say, 5 versions off, the same monitor may end up getting into the
quorum only to find that in-between probing and finally triggering an
election some 6 versions might have come to existence.  Before this patch,
by then the state had been trimmed and the monitor would have to bootstrap
to perform a full store sync.  With this patch in place, the monitor would
be able to sync the remaining 11 versions.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: Paxos: bootstrap leader if he has fallen behind upon reaching collect
Joao Eduardo Luis [Mon, 11 Mar 2013 16:25:35 +0000 (16:25 +0000)]
mon: Paxos: bootstrap leader if he has fallen behind upon reaching collect

Fixes: #4256
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoDocument scrubbing behavior
David Zafman [Mon, 11 Mar 2013 19:44:47 +0000 (12:44 -0700)]
Document scrubbing behavior

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoMerge pull request #100 from jaharkes/init
Sage Weil [Mon, 11 Mar 2013 19:00:52 +0000 (12:00 -0700)]
Merge pull request #100 from jaharkes/init

Fixes for RadosGW init script

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #99 from dalgaaf/wip-da-sca-style-3
Sage Weil [Mon, 11 Mar 2013 19:00:14 +0000 (12:00 -0700)]
Merge pull request #99 from dalgaaf/wip-da-sca-style-3

More smaller (style related) fixes

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #91 from Youscribe/defaultweight
Sage Weil [Mon, 11 Mar 2013 16:31:57 +0000 (09:31 -0700)]
Merge pull request #91 from Youscribe/defaultweight

Set weight of an osd based on df.

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoUse start-stop-daemon --chuid option to setuid to www-data. 100/head
Jan Harkes [Fri, 8 Mar 2013 21:40:06 +0000 (16:40 -0500)]
Use start-stop-daemon --chuid option to setuid to www-data.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
12 years agoFix radosgw actually reloading after rotating logs.
Jan Harkes [Fri, 8 Mar 2013 17:45:57 +0000 (12:45 -0500)]
Fix radosgw actually reloading after rotating logs.

The --signal argument to Debian's start-stop-daemon doesn't
make it send a signal, but defines which signal should be send
when --stop is specified.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
12 years agorgw/rgw_op.cc: remove unused variables 99/head
Danny Al-Gaaf [Mon, 11 Mar 2013 15:31:15 +0000 (16:31 +0100)]
rgw/rgw_op.cc: remove unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_op.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 15:28:02 +0000 (16:28 +0100)]
rgw/rgw_op.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_multi_del.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 15:25:49 +0000 (16:25 +0100)]
rgw/rgw_multi_del.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_multi.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 15:23:05 +0000 (16:23 +0100)]
rgw/rgw_multi.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_http_client.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 15:19:04 +0000 (16:19 +0100)]
rgw/rgw_http_client.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorados_sync.cc: fix typo in error msg
Danny Al-Gaaf [Mon, 11 Mar 2013 15:10:54 +0000 (16:10 +0100)]
rados_sync.cc: fix typo in error msg

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_common.cc: initialize has_acl_header in constructor with 'false'
Danny Al-Gaaf [Mon, 11 Mar 2013 15:08:00 +0000 (16:08 +0100)]
rgw/rgw_common.cc: initialize has_acl_header in constructor with 'false'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_admin.cc: remove some unused variables
Danny Al-Gaaf [Mon, 11 Mar 2013 15:00:16 +0000 (16:00 +0100)]
rgw/rgw_admin.cc: remove some unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_admin.cc: reduce scope of 'int ret'
Danny Al-Gaaf [Mon, 11 Mar 2013 14:56:28 +0000 (15:56 +0100)]
rgw/rgw_admin.cc: reduce scope of 'int ret'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_admin.cc: remove twice check for 'object'
Danny Al-Gaaf [Mon, 11 Mar 2013 14:52:34 +0000 (15:52 +0100)]
rgw/rgw_admin.cc: remove twice check for 'object'

Remove twice checked 'object'. Put checks in alphabetic order to make
double checks easier to catch.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_rados.h: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 14:47:14 +0000 (15:47 +0100)]
rgw/rgw_rados.h: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_acl_s3.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 14:44:13 +0000 (15:44 +0100)]
rgw/rgw_acl_s3.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_common.h: pass some const variables by reference to 'operator<<'
Danny Al-Gaaf [Mon, 11 Mar 2013 14:35:53 +0000 (15:35 +0100)]
rgw/rgw_common.h: pass some const variables by reference to 'operator<<'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorbd_fuse/rbd-fuse.c: remove consecutive return/break statement
Danny Al-Gaaf [Mon, 11 Mar 2013 14:31:50 +0000 (15:31 +0100)]
rbd_fuse/rbd-fuse.c: remove consecutive return/break statement

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorbd.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 14:30:55 +0000 (15:30 +0100)]
rbd.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorados_sync.{cc,h}: pass some const std::string by reference
Danny Al-Gaaf [Mon, 11 Mar 2013 14:23:15 +0000 (15:23 +0100)]
rados_sync.{cc,h}: pass some const std::string by reference

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorados_sync.cc: remove unused variable
Danny Al-Gaaf [Mon, 11 Mar 2013 14:14:41 +0000 (15:14 +0100)]
rados_sync.cc: remove unused variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorados_export.cc: reduce scope of 'int ret' in do_rados_export()
Danny Al-Gaaf [Mon, 11 Mar 2013 14:07:36 +0000 (15:07 +0100)]
rados_export.cc: reduce scope of 'int ret' in do_rados_export()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agosrc/rados.cc: remove unused variable
Danny Al-Gaaf [Mon, 11 Mar 2013 14:05:00 +0000 (15:05 +0100)]
src/rados.cc: remove unused variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agosrc/osdmaptool.cc: remove some unused variables
Danny Al-Gaaf [Mon, 11 Mar 2013 14:02:09 +0000 (15:02 +0100)]
src/osdmaptool.cc: remove some unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoosdc/Objecter.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 13:58:59 +0000 (14:58 +0100)]
osdc/Objecter.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoosdc/ObjectCacher.cc: set left to 0 instead off 'left -= left'
Danny Al-Gaaf [Mon, 11 Mar 2013 13:50:23 +0000 (14:50 +0100)]
osdc/ObjectCacher.cc: set left to 0 instead off 'left -= left'

Instead of call 'left -= left', which results in 0, set left directly
to 0 and remove not needed assert call 'left == 0'.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoosdc/ObjectCacher.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 13:38:24 +0000 (14:38 +0100)]
osdc/ObjectCacher.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoos/FileStore.cc: move variable async_done to the right #ifdef block
Danny Al-Gaaf [Mon, 11 Mar 2013 13:06:10 +0000 (14:06 +0100)]
os/FileStore.cc: move variable async_done to the right #ifdef block

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoos/FileStore.cc: remove assignment of a never used value
Danny Al-Gaaf [Mon, 11 Mar 2013 13:03:27 +0000 (14:03 +0100)]
os/FileStore.cc: remove assignment of a never used value

There is no need to set local variable basedir_fd to -1 after
closing and right before leaving the function.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomsg/SimpleMessenger.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 12:45:33 +0000 (13:45 +0100)]
msg/SimpleMessenger.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomon/PGMonitor.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 12:30:04 +0000 (13:30 +0100)]
mon/PGMonitor.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomon/Monitor.cc: Clarify calculation precedence for '%' and '?'
Danny Al-Gaaf [Mon, 11 Mar 2013 12:25:41 +0000 (13:25 +0100)]
mon/Monitor.cc: Clarify calculation precedence for '%' and '?'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agolibrbd/internal.cc: clarify expression with parentheses
Danny Al-Gaaf [Mon, 11 Mar 2013 11:52:44 +0000 (12:52 +0100)]
librbd/internal.cc: clarify expression with parentheses

From cppcheck:
 [src/librbd/internal.cc:379]: (style) Boolean result is used in
 bitwise operation. Clarify expression with parentheses.

12 years agoSyntheticClient.cc: Clarify calculation precedence for '%' and '?'
Danny Al-Gaaf [Mon, 11 Mar 2013 11:25:06 +0000 (12:25 +0100)]
SyntheticClient.cc: Clarify calculation precedence for '%' and '?'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agofusetrace_ll.cc: reduce scope of 'int err' in main()
Danny Al-Gaaf [Mon, 11 Mar 2013 11:11:06 +0000 (12:11 +0100)]
fusetrace_ll.cc: reduce scope of 'int err' in main()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/Locker.cc: fix warning about 'Possible null pointer dereference'
Danny Al-Gaaf [Fri, 1 Mar 2013 19:12:03 +0000 (20:12 +0100)]
mds/Locker.cc: fix warning about 'Possible null pointer dereference'

Fix following warning from cppcheck:
 [src/mds/Locker.cc:2255] -> [src/mds/Locker.cc:2258]: (error)
   Possible null pointer dereference: in - otherwise it is redundant
   to check it against null.

Since head_in used for call pick_inode_snap() is already valid,
there is no need to check if 'CInode *in' is not NULL. Remove
not needed check.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/Locker.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Fri, 1 Mar 2013 18:55:05 +0000 (19:55 +0100)]
mds/Locker.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomon/MonMap: don't crash on dup IP in mon host
Sage Weil [Sun, 10 Mar 2013 06:12:00 +0000 (22:12 -0800)]
mon/MonMap: don't crash on dup IP in mon host

If the mon_host line has an IP twice, we shouldn't crash.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoAdd code to check flag state
David Zafman [Sat, 9 Mar 2013 04:23:21 +0000 (20:23 -0800)]
Add code to check flag state

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Sat, 9 Mar 2013 02:38:32 +0000 (18:38 -0800)]
Merge remote-tracking branch 'gh/next'

12 years agoceph_common.sh: add warning if 'host' contains dots
Dan Mick [Fri, 8 Mar 2013 23:18:54 +0000 (15:18 -0800)]
ceph_common.sh: add warning if 'host' contains dots

This is a common error and there's no reason the script can't
at least tell you it's a really bad idea.  One might argue it
could even successfully proactively truncate the host parameter
at the first dot, but that's a little controlling, perhaps.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoRevert "Update conf.py"
Dan Mick [Fri, 8 Mar 2013 23:46:34 +0000 (15:46 -0800)]
Revert "Update conf.py"

This reverts commit 700899206224436255522d8469612e6603fe3116.
Apparently github's edit lets you commit directly to the repo.
Oops.

12 years agoUpdate conf.py
Dan Mick [Fri, 8 Mar 2013 23:44:28 +0000 (15:44 -0800)]
Update conf.py

12 years agoosd: noscrub, nodeepscrub osdmap flags
David Zafman [Fri, 8 Mar 2013 22:06:24 +0000 (14:06 -0800)]
osd: noscrub, nodeepscrub osdmap flags

Just add NOSCRUB/NODEEP_SCRUB to OSDMap flags and  allow set/unset

Feature: #4135

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoMerge pull request #96 from concubidated/master
Sage Weil [Fri, 8 Mar 2013 21:49:04 +0000 (13:49 -0800)]
Merge pull request #96 from concubidated/master

Fix output of command 'ceph osd tree --format=json'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agodoc: Added a new network configuration reference document.
John Wilkins [Fri, 8 Mar 2013 21:45:04 +0000 (13:45 -0800)]
doc: Added a new network configuration reference document.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoFix output of 'ceph osd tree --format=json' 96/head
Concubidated [Fri, 8 Mar 2013 21:44:39 +0000 (13:44 -0800)]
Fix output of 'ceph osd tree --format=json'

Signed-off-by: Tyler Brekke <tyler.brekke@inktank.com>
12 years agodoc: Added network settings. Reorganized index.
John Wilkins [Fri, 8 Mar 2013 21:44:31 +0000 (13:44 -0800)]
doc: Added network settings. Reorganized index.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Excised network settings.
John Wilkins [Fri, 8 Mar 2013 21:43:44 +0000 (13:43 -0800)]
doc: Excised network settings.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Format edits. Excised much of network discussion. Added reference to network...
John Wilkins [Fri, 8 Mar 2013 21:43:12 +0000 (13:43 -0800)]
doc: Format edits. Excised much of network discussion. Added reference to network guide.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoMerge branch 'wip-osd-map' into next
Samuel Just [Fri, 8 Mar 2013 20:44:42 +0000 (12:44 -0800)]
Merge branch 'wip-osd-map' into next

Fixes: 4369
Backport: bobtail
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoosd: mark down connections from old peers
Sage Weil [Fri, 8 Mar 2013 16:56:44 +0000 (08:56 -0800)]
osd: mark down connections from old peers

Close out any connection with an old peer.  This avoids a race like:

- peer marked down
- we get map, mark down the con
- they reconnect and try to send us some stuff
- we share our map to tell them they are old and dead, but leave the con
  open
...
- peer marks itself up a few times, eventually reuses the same port
- sends messages on their fresh con
- we discard because of our old con

This could cause a tight reconnect loop, but it is better than wrong
behavior.

Other possible fixes:
 - make addr nonce truly unique (augment pid in nonce)
 - make a smarter 'disposable' msgr state (bleh)

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd/PG: rename require_same_or_newer_map -> is_same_or_newer_map
Sage Weil [Fri, 8 Mar 2013 16:53:40 +0000 (08:53 -0800)]
osd/PG: rename require_same_or_newer_map -> is_same_or_newer_map

This avoids confusion with the OSD method of the same name, and better
matches what the function tests (and does not do).

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/Paxos: make old clock skew message more/less suggestive
Sage Weil [Fri, 8 Mar 2013 18:43:21 +0000 (10:43 -0800)]
mon/Paxos: make old clock skew message more/less suggestive

There is a separate clock skew check now, and more often than not this
suggests laggy messages, and not necessarily skew.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #92 from jaharkes/content_length
Yehuda Sadeh [Fri, 8 Mar 2013 17:45:44 +0000 (09:45 -0800)]
Merge pull request #92 from jaharkes/content_length

Properly format Content-Length: header on 32-bit systems.

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoProperly format Content-Length: header on 32-bit systems. 92/head
Jan Harkes [Thu, 7 Mar 2013 21:07:26 +0000 (16:07 -0500)]
Properly format Content-Length: header on 32-bit systems.

- Promote len argument in dump_content_length to uint64_t.
- Make sure there is sufficient scratch space to format string.
- Use PRIu64 macro for formatting.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
12 years agorgw: set attrs on various list bucket xml results (swift)
Yehuda Sadeh [Fri, 22 Feb 2013 23:04:37 +0000 (15:04 -0800)]
rgw: set attrs on various list bucket xml results (swift)

Fixes: #4247
The list buckets operation was missing some attrs on the different
xml result entities. This fixes it.

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