]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agoreflect recent changes in the pg deletion logic 283/head
Loic Dachary [Tue, 14 May 2013 13:29:03 +0000 (15:29 +0200)]
reflect recent changes in the pg deletion logic

No need to wait on DeletingStateRef for flush https://github.com/ceph/ceph/commit/d3dd99b725afaa026fe6f700ddc14a7f657f2170
Fix typos

http://tracker.ceph.com/issues/5058 refs #5058

Signed-off-by: Loic Dachary <loic@dachary.org>
12 years agofix typos and add hyperlink to peering
Loic Dachary [Tue, 14 May 2013 10:06:21 +0000 (12:06 +0200)]
fix typos and add hyperlink to peering

s/;/:/
s/up_acting_affected/acting_up_affected/
Add relative link to ../../peering

http://tracker.ceph.com/issues/5058 refs #5058

Signed-off-by: Loic Dachary <loic@dachary.org>
12 years agotypo s/come/some/
Loic Dachary [Tue, 14 May 2013 09:15:11 +0000 (11:15 +0200)]
typo s/come/some/

http://tracker.ceph.com/issues/5058 refs #5058

Signed-off-by: Loic Dachary <loic@dachary.org>
12 years agoupdate op added to a waiting queue or discarded
Loic Dachary [Tue, 14 May 2013 08:52:40 +0000 (10:52 +0200)]
update op added to a waiting queue or discarded

The decision to discard an op happens either in OSD or in PG.
The operation queue goes to a single OpWQ object if waiting_map does not impose a delay op_queue.
The decision to add an op to a waiting queue regardless of its type is updated.
The decision to add a CEPH_MSG_OSD_OP to a waiting queue is described in full.

http://tracker.ceph.com/issues/5058 refs #5058

Signed-off-by: Loic Dachary <loic@dachary.org>
12 years agodoc/release-notes: v0.61.2
Sage Weil [Tue, 14 May 2013 03:48:20 +0000 (20:48 -0700)]
doc/release-notes: v0.61.2

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Tue, 14 May 2013 00:17:43 +0000 (17:17 -0700)]
Merge remote-tracking branch 'gh/next'

12 years agoMerge pull request #281 from ceph/wip-rbd-rm-enoent
Sage Weil [Mon, 13 May 2013 23:07:55 +0000 (16:07 -0700)]
Merge pull request #281 from ceph/wip-rbd-rm-enoent

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoPG: fix some brace styling
Samuel Just [Mon, 13 May 2013 22:44:17 +0000 (15:44 -0700)]
PG: fix some brace styling

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
12 years agoPG: subset_last_update must be at least log.tail
Samuel Just [Mon, 13 May 2013 21:23:00 +0000 (14:23 -0700)]
PG: subset_last_update must be at least log.tail

Fixes: 5020
Backport: bobtail, cuttlefish
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
12 years agoSimpleThrottle: fix -ENOENT checking 281/head
Josh Durgin [Mon, 13 May 2013 21:49:42 +0000 (14:49 -0700)]
SimpleThrottle: fix -ENOENT checking

The condition was reversed. Rewrite it so it's clear that we're
ignoring -ENOENT only when m_ignore_enoent is set.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoReplace mis-named mon config variables using mon_osd_min_down_reports/mon_osd_min_dow...
David Zafman [Mon, 13 May 2013 19:53:11 +0000 (12:53 -0700)]
Replace mis-named mon config variables using mon_osd_min_down_reports/mon_osd_min_down_reporters

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #280 from ceph/wip-4996
Sage Weil [Mon, 13 May 2013 19:31:31 +0000 (12:31 -0700)]
Merge pull request #280 from ceph/wip-4996

Reviewed-by: Joao Luis <joao.luis@inktank.com>
12 years agomon: fix validatation of mds ids in mon commands 280/head
Sage Weil [Sat, 11 May 2013 05:14:05 +0000 (22:14 -0700)]
mon: fix validatation of mds ids in mon commands

Fixes: #4996
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #278 from ceph/wip-4974
Sage Weil [Mon, 13 May 2013 18:39:36 +0000 (11:39 -0700)]
Merge pull request #278 from ceph/wip-4974

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: Monitor: tolerate GV duplicates during conversion 278/head
Joao Eduardo Luis [Mon, 13 May 2013 14:36:59 +0000 (15:36 +0100)]
mon: Monitor: tolerate GV duplicates during conversion

Fixes: #4974
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoceph_test_libcephfs: fix xattr test
Sage Weil [Mon, 13 May 2013 17:12:44 +0000 (10:12 -0700)]
ceph_test_libcephfs: fix xattr test

This broke in 0c70e44630734760fd36e0c770a33fb0e74b42a4.

Fixes: #5030
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoOSD: We need to wait on CLEARING_DIR, not DELETED_DIR
Samuel Just [Mon, 13 May 2013 16:50:14 +0000 (09:50 -0700)]
OSD: We need to wait on CLEARING_DIR, not DELETED_DIR

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #274 from dalgaaf/wip-da-fix-osd_h
athanatos [Mon, 13 May 2013 16:42:26 +0000 (09:42 -0700)]
Merge pull request #274 from dalgaaf/wip-da-fix-osd_h

osd/OSD.h: fix try_stop_deletion

Reviewed-by: Sam Just <sam.just@inktank.com>
12 years agoMerge pull request #275 from ceph/wip-rbd-read-from-replica
Josh Durgin [Mon, 13 May 2013 06:01:14 +0000 (23:01 -0700)]
Merge pull request #275 from ceph/wip-rbd-read-from-replica

Reviewed-by: Sage Weil <sage.weil@inktank.com>
12 years agolibrbd: add options to enable balanced or localized reads for snapshots 275/head
Josh Durgin [Sun, 12 May 2013 21:53:26 +0000 (14:53 -0700)]
librbd: add options to enable balanced or localized reads for snapshots

Since snapshots never change, it's safe to read from replicas for them.
A common use for this would be reading from a parent snapshot shared by
many clones.

Convert LibrbdWriteback and AioRead to use the ObjectOperation api
so we can set flags. Fortunately the external wrapper holds no data,
so its lifecycle doesn't need to be managed.

Include a simple workunit that sets the flags in various combinations
and looks for their presence in the logs from 'rbd export'.

Fixes: #3064
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoReplicatedPG: send -EAGAIN for both balanced and localized reads
Josh Durgin [Sun, 12 May 2013 21:47:20 +0000 (14:47 -0700)]
ReplicatedPG: send -EAGAIN for both balanced and localized reads

This logic for localized reads applies to balanced reads too.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrados: add per-ObjectOperation flags for balanced and localized reads
Josh Durgin [Sun, 12 May 2013 21:45:36 +0000 (14:45 -0700)]
librados: add per-ObjectOperation flags for balanced and localized reads

These need to apply to the entire ObjectOperation, not just a subop,
so use a new enum and a new aio_operate() call that takes them.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrados: add sparse_read() to the C++ bindings for an ObjectOperation
Josh Durgin [Sun, 12 May 2013 21:43:13 +0000 (14:43 -0700)]
librados: add sparse_read() to the C++ bindings for an ObjectOperation

This will allow it to be used with general aio_operate() so we don't have
to add new versions of each operation when we want to add new per-op
arguments, like flags, namespaces, or explicit snapshot contexts/ids.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjecter, librados: use only ObjectOperation form of sparse_read internally
Josh Durgin [Sun, 12 May 2013 21:39:58 +0000 (14:39 -0700)]
Objecter, librados: use only ObjectOperation form of sparse_read internally

This will be used when exposing an ObjectOperation version of sparse_read()
to the librados user, and there's no reason to duplicate code for creating
and handling it. Add a wrapper Context for handling the lifecycle of the
::ObjectOperation.

This cleans up the synchronous version of sparse_read quite a bit by
using the general operate_read() instead of duplicating decoding and
a bunch of sync boilerplate.

Move handling the decoding of a sparse_read into the Objecter, with
the rest of the decoding of rados operations. librados shouldn't be
the only user of the Objecter that can understand sparse_reads.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjecter: fix error handling for decoding stat
Josh Durgin [Sun, 12 May 2013 21:29:28 +0000 (14:29 -0700)]
Objecter: fix error handling for decoding stat

r is just a local variable, changing it has no effect.
Set the per-operation return value if provided when a decoding
error occurs.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoqa: rsync test: exclude /usr/local
Sage Weil [Sun, 12 May 2013 00:36:13 +0000 (17:36 -0700)]
qa: rsync test: exclude /usr/local

Some plana have non-world-readable crap in /usr/local/samba.  Avoid
/usr/local entirely for that and any similar landmines.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd/OSD.h: fix try_stop_deletion 274/head
Danny Al-Gaaf [Sat, 11 May 2013 17:51:02 +0000 (19:51 +0200)]
osd/OSD.h: fix try_stop_deletion

Fix try_stop_deletion(): The comment above the while loop says "If we are
in DELETING_DIR or DELETED_DIR", but the while loop checks for DELETING_DIR
twice. Change one check to DELETED_DIR otherwise on state get missed.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoMerge pull request #272 from ceph/wip-rbd-parallel
Sage Weil [Sat, 11 May 2013 00:13:12 +0000 (17:13 -0700)]
Merge pull request #272 from ceph/wip-rbd-parallel

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-4273'
David Zafman [Fri, 10 May 2013 23:44:19 +0000 (16:44 -0700)]
Merge branch 'wip-4273'

Reviewed-by: Sam Just <sam.just@inktank.com>
12 years agoThrottle: move start_op() to C_SimpleThrottle constructor 272/head
Josh Durgin [Fri, 10 May 2013 22:59:10 +0000 (15:59 -0700)]
Throttle: move start_op() to C_SimpleThrottle constructor

This is done by all callers right before constructing this.
Since C_SimpleThrottle is already responsible for calling ->end_op(),
it makes sense to call start_op() there too.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: run copy in parallel
Josh Durgin [Fri, 10 May 2013 22:54:51 +0000 (15:54 -0700)]
librbd: run copy in parallel

Instead of using read_iterate(), loop over each period of objects in
the source, read from them asynchronously, and then asynchronously
write to the destination.

The callbacks make this a bit more complex, but it can perform much
better.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: move completion release into rbd_ctx_cb()
Josh Durgin [Fri, 10 May 2013 22:45:57 +0000 (15:45 -0700)]
librbd: move completion release into rbd_ctx_cb()

All the users of rbd_ctx_cb() do this separately right now, but
there's no reason to keep the completion around after the nested
completion has been called. Also declare rbd_ctx_cb() in the header
so it can be used before its definition.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: parallelize and simplify flatten
Josh Durgin [Fri, 10 May 2013 00:12:33 +0000 (17:12 -0700)]
librbd: parallelize and simplify flatten

Flattening reads the logical child object from the parent image, and
then does a copyup operation if the data is non-zero. This is
equivalent to doing a zero-length write to each object in the
child image. Do this instead, so that we can easily control how
many are in flight, and eliminate some code as well.

Since we no longer read from the parent within the flatten function,
the buffer is not needed. It would be leaked in some error conditions,
but since's it's unecessary we can just get rid of it.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: only send non-zero copyup data
Josh Durgin [Fri, 10 May 2013 00:05:20 +0000 (17:05 -0700)]
librbd: only send non-zero copyup data

If the parent image is logically zero for the range of a child object,
it's equivalent to the object not existing. Save some I/O and network
bandwidth and don't send the useless zeroes.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: parallelize rollback
Josh Durgin [Thu, 9 May 2013 22:39:16 +0000 (15:39 -0700)]
librbd: parallelize rollback

Use a SimpleThrottle like trim_image() to limit the number of
requests in flight.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge pull request #273 from dalgaaf/wip-da-CID-fixes-v2
Sage Weil [Fri, 10 May 2013 22:08:57 +0000 (15:08 -0700)]
Merge pull request #273 from dalgaaf/wip-da-CID-fixes-v2

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomds/CDir.cc: fix possible dereference after NULL check 273/head
Danny Al-Gaaf [Fri, 10 May 2013 20:08:23 +0000 (22:08 +0200)]
mds/CDir.cc: fix possible dereference after NULL check

CID 1019553 Dereference after null check (FORWARD_NULL, CWE-476)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoceph-monstore-tool.cc: check if open() was successful
Danny Al-Gaaf [Fri, 10 May 2013 17:11:26 +0000 (19:11 +0200)]
ceph-monstore-tool.cc: check if open() was successful

Should fix: "fd" is passed to a parameter that cannot be negative.

CID 1019566 Improper use of negative value (NEGATIVE_RETURNS, CWE-394)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agokv_flat_btree_async.cc: fix resource leak
Danny Al-Gaaf [Fri, 10 May 2013 16:15:10 +0000 (18:15 +0200)]
kv_flat_btree_async.cc: fix resource leak

Call AioCompletion::release() if the completion is no longer
needed to free the resources.

CID 727976 Resource leak (CWE-404)
CID 727977 Resource leak (CWE-404)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoclient/SyntheticClient.cc: check return value of describe_layout()
Danny Al-Gaaf [Fri, 10 May 2013 15:43:03 +0000 (17:43 +0200)]
client/SyntheticClient.cc: check return value of describe_layout()

Fix SyntheticClient::chunk_file(): check return value of
describe_layout() and handle the error.

CID 966615 Unchecked return value (CWE-252)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoclient/Client.cc: fix possible NULL pointer dereference
Danny Al-Gaaf [Fri, 10 May 2013 15:30:41 +0000 (17:30 +0200)]
client/Client.cc: fix possible NULL pointer dereference

CID 751332 Dereference null return value (CWE-476)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorados.cc: fix leaking of Formatter*
Danny Al-Gaaf [Fri, 10 May 2013 14:54:39 +0000 (16:54 +0200)]
rados.cc: fix leaking of Formatter*

Make sure Formatter* is deleted in error case.

717096 Resource leak (CWE-404) (25 of 25 cases)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoclient/SyntheticClient.cc: fix another memory leak
Danny Al-Gaaf [Fri, 10 May 2013 13:54:46 +0000 (15:54 +0200)]
client/SyntheticClient.cc: fix another memory leak

Fix memory leak in read_random: call delete[] on buf before
call new[] again in the for-loop.

CID 717071 Resource leak (CWE-404)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoclient/SyntheticClient.cc: fix memory leak
Danny Al-Gaaf [Fri, 10 May 2013 13:49:56 +0000 (15:49 +0200)]
client/SyntheticClient.cc: fix memory leak

Fix memory leak in read_random: call delete[] on buf before
call new[] again in the for-loop.

CID 717070 Resource leak (CWE-404)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/MDCache.cc: fix dereference NULL pointer
Danny Al-Gaaf [Fri, 10 May 2013 13:28:32 +0000 (15:28 +0200)]
mds/MDCache.cc: fix dereference NULL pointer

Fix possible NULL pointer dereference. Change return value of
CInode::get_dirfrag() to return NULL instead of 0 since it's a
pointer returned.

CID 716991 Dereference null return value (CWE-478)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/MDCache.cc: add NULL pointer check
Danny Al-Gaaf [Fri, 10 May 2013 13:19:55 +0000 (15:19 +0200)]
mds/MDCache.cc: add NULL pointer check

Check for result of get_inode() for NULL before use the pointer.

716990 Dereference null return value (CWE-476)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/Server.cc: remove dead default in switch
Danny Al-Gaaf [Fri, 10 May 2013 13:12:26 +0000 (15:12 +0200)]
mds/Server.cc: remove dead default in switch

The default switch can't get executed since the switch value
can only have the two values already checked.

CID 716894 Dead default in switch (CWE-561)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoosd/OSD.h: add missing unlock of osd_lock
Danny Al-Gaaf [Fri, 10 May 2013 12:11:14 +0000 (14:11 +0200)]
osd/OSD.h: add missing unlock of osd_lock

CID 1019560 Missing unlock (CWE-667)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_rest.cc: remove dead and unneeded code
Danny Al-Gaaf [Fri, 10 May 2013 12:03:13 +0000 (14:03 +0200)]
rgw/rgw_rest.cc: remove dead and unneeded code

Since origin and meth are already checked to be true there is
no need to check again in s->cio->print() after the initial check.

1019551 Logically dead code (CWE-561)
1019552 Logically dead code (CWE-561)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorbd.cc: fix error handling
Danny Al-Gaaf [Fri, 10 May 2013 11:55:43 +0000 (13:55 +0200)]
rbd.cc: fix error handling

Fix undead code. Get error code from write_fd() before check
the result against < 0.

CID 1019550 Logically dead code (CWE-561)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorados_sync.cc: remove dead and not needed code
Danny Al-Gaaf [Fri, 10 May 2013 11:44:50 +0000 (13:44 +0200)]
rados_sync.cc: remove dead and not needed code

The first if handles all chars < 32, the last 2 if's check for
'\n' (10) and '\r' (13). This code will never be reached and
is already covered. Remove unneeded code.

CID 1019549 Logically dead code (CWE-561)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/omap_bench.cc: remove dead code
Danny Al-Gaaf [Fri, 10 May 2013 11:28:32 +0000 (13:28 +0200)]
test/omap_bench.cc: remove dead code

CID 716900 Logically dead code (CWE-561)
CID 716901 Logically dead code (CWE-561)
CID 727968 Logically dead code (CWE-561)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agolibcephfs/test.cc: add assert for result of ceph_getxattr()
Danny Al-Gaaf [Fri, 10 May 2013 11:07:24 +0000 (13:07 +0200)]
libcephfs/test.cc: add assert for result of ceph_getxattr()

Check result of ceph_getxattr() before pass it as parameter to
strncmp(). Make sure it's not negative.

CID 739411 Argument cannot be negative (CWE-687)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_user.cc: add missing break in switch
Danny Al-Gaaf [Fri, 10 May 2013 10:41:04 +0000 (12:41 +0200)]
rgw/rgw_user.cc: add missing break in switch

Fix switch handling for case KEY_TYPE_SWIFT, add break after the
case to prevent fall through into KEY_TYPE_S3 case.

CID 1019563 Missing break in switch (CWE-484)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoclient/SyntheticClient.cc: add missing break in switch
Danny Al-Gaaf [Fri, 10 May 2013 10:31:31 +0000 (12:31 +0200)]
client/SyntheticClient.cc: add missing break in switch

Fix switch handling for case SYNCLIENT_MODE_OVERLOAD_OSD_0, add break
after the case to prevent fall through into next case.

CID 716958 Missing break in switch (CWE-484)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoObjectStore.cc: add missing break in switch
Danny Al-Gaaf [Fri, 10 May 2013 10:22:42 +0000 (12:22 +0200)]
ObjectStore.cc: add missing break in switch

Fix switch handling for case OP_SPLIT_COLLECTION2, add break after
the case to prevent fall through into default case.

CID 1019562 Missing break in switch (CWE-484)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agodoc: Fixed typos. Somehow got a merge error.
John Wilkins [Fri, 10 May 2013 21:39:23 +0000 (14:39 -0700)]
doc: Fixed typos. Somehow got a merge error.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agomds: be more explicit about path_traverse completion
Sage Weil [Fri, 10 May 2013 21:14:52 +0000 (14:14 -0700)]
mds: be more explicit about path_traverse completion

Coverity turned up

CID 717085 (#1 of 1): Resource leak (RESOURCE_LEAK)
10. leaked_storage: Variable "c" going out of scope leaks the storage it points to.

from _find_ino_dir(), but for all r > 0 cases fin is consumed.  Make this
a bit more explicit by using the helper in the mdr-only case, and by
asserting it is zero in the return 2 path.  Hopefully coverity will notice.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: fix broken link to ceph-deploy in release notes
Ross Turk [Fri, 10 May 2013 20:53:21 +0000 (13:53 -0700)]
doc: fix broken link to ceph-deploy in release notes

Signed-off-by: Ross Turk <ross@inktank.com>
12 years agolibrados: add selfmanaged_snap_rollback as an ObjectOperation
Josh Durgin [Tue, 7 May 2013 00:07:30 +0000 (17:07 -0700)]
librados: add selfmanaged_snap_rollback as an ObjectOperation

This allows it to be done asynchronously, or in conjunction with
other operations.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: delete more than one object at once
Josh Durgin [Tue, 7 May 2013 00:03:34 +0000 (17:03 -0700)]
librbd: delete more than one object at once

Speed up deletions when resizing down or removing an image by keeping
up 10 operations in flight by default.

Refs: #2256
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoThrottle: add a simpler throttle that just blocks above a threshold
Josh Durgin [Mon, 6 May 2013 23:51:12 +0000 (16:51 -0700)]
Throttle: add a simpler throttle that just blocks above a threshold

This is convenient to use to turn synchronous calls into asynchronous
calls with a limited number of operations in flight concurrently.
It assumes the caller will wait for all operations to complete at the
end.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agodoc: Added entry for the RGW Admin Ops API.
John Wilkins [Fri, 10 May 2013 18:30:48 +0000 (11:30 -0700)]
doc: Added entry for the RGW Admin Ops API.

fixes: #5002

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoMerge pull request #271 from dalgaaf/wip-da-sca-cppcheck-v2.1
Sage Weil [Fri, 10 May 2013 17:26:05 +0000 (10:26 -0700)]
Merge pull request #271 from dalgaaf/wip-da-sca-cppcheck-v2.1

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agolibcephfs_jni.cc: reduce scope of ret variable 271/head
Danny Al-Gaaf [Tue, 7 May 2013 15:42:34 +0000 (17:42 +0200)]
libcephfs_jni.cc: reduce scope of ret variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoinclude/ceph_hash.cc: reduce scope of a var in ceph_str_hash_rjenkins()
Danny Al-Gaaf [Tue, 7 May 2013 15:40:51 +0000 (17:40 +0200)]
include/ceph_hash.cc: reduce scope of a var in ceph_str_hash_rjenkins()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoinclude/addr_parsing.c: reduce scope of port_str in safe_cat()
Danny Al-Gaaf [Tue, 7 May 2013 15:35:21 +0000 (17:35 +0200)]
include/addr_parsing.c: reduce scope of port_str in safe_cat()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoglobal/global_init.cc: reduce scope of ret in global_init_daemonize()
Danny Al-Gaaf [Tue, 7 May 2013 15:32:52 +0000 (17:32 +0200)]
global/global_init.cc: reduce scope of ret in global_init_daemonize()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agocrush/builder.c: reduce scope of oldsize in crush_add_bucket()
Danny Al-Gaaf [Tue, 7 May 2013 15:26:33 +0000 (17:26 +0200)]
crush/builder.c: reduce scope of oldsize in crush_add_bucket()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agocommon/safe_io.c: reduce scope of some ssize_t variables
Danny Al-Gaaf [Tue, 7 May 2013 15:25:26 +0000 (17:25 +0200)]
common/safe_io.c: reduce scope of some ssize_t variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agocommon/obj_bencher.cc: reduce scope of avg_bandwidth
Danny Al-Gaaf [Tue, 7 May 2013 15:19:36 +0000 (17:19 +0200)]
common/obj_bencher.cc: reduce scope of avg_bandwidth

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agocommon/ceph_argparse.cc: remove scope of some variables
Danny Al-Gaaf [Tue, 7 May 2013 15:17:49 +0000 (17:17 +0200)]
common/ceph_argparse.cc: remove scope of some variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agocommon/admin_socket.cc: remove scope of ret variable in do_accept()
Danny Al-Gaaf [Tue, 7 May 2013 15:11:32 +0000 (17:11 +0200)]
common/admin_socket.cc: remove scope of ret variable in do_accept()

Reduce scope of ret variable and remove usage in one case.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agocls/rbd/cls_rbd.cc: reduce scope of variable rc
Danny Al-Gaaf [Tue, 7 May 2013 15:06:29 +0000 (17:06 +0200)]
cls/rbd/cls_rbd.cc: reduce scope of variable rc

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_op.cc: use empty() instead of size()
Danny Al-Gaaf [Tue, 7 May 2013 14:59:18 +0000 (16:59 +0200)]
rgw/rgw_op.cc: use empty() instead of size()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoceph-filestore-dump.cc: use empty() instead of size()
Danny Al-Gaaf [Tue, 7 May 2013 14:58:33 +0000 (16:58 +0200)]
ceph-filestore-dump.cc: use empty() instead of size()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agodoc: Updated usage syntax. Added links to hardware and manual OSD remove.
John Wilkins [Fri, 10 May 2013 16:37:03 +0000 (09:37 -0700)]
doc: Updated usage syntax. Added links to hardware and manual OSD remove.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoMerge branch 'wip_4955' into next
Samuel Just [Fri, 10 May 2013 05:37:37 +0000 (22:37 -0700)]
Merge branch 'wip_4955' into next

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip_pg_res'
Samuel Just [Fri, 10 May 2013 05:24:25 +0000 (22:24 -0700)]
Merge branch 'wip_pg_res'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoOSD: rename clear_temp to recursive_remove_collection()
Samuel Just [Fri, 10 May 2013 00:25:57 +0000 (17:25 -0700)]
OSD: rename clear_temp to recursive_remove_collection()

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoosd: remove_dir use collection_list_partial
Samuel Just [Fri, 10 May 2013 00:17:35 +0000 (17:17 -0700)]
osd: remove_dir use collection_list_partial

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG,OSD: delay ops for map prior to queueing in the OpWQ
Samuel Just [Wed, 8 May 2013 23:19:34 +0000 (16:19 -0700)]
PG,OSD: delay ops for map prior to queueing in the OpWQ

Previously, we simply queued ops in the OpWQ without checking.  The PG
would then check in do_request whether the message should wait for a new
map.  Unfortunately, this has the side effect that any op requeued for
any reason must also requeue the waiting_for_map queue.

Now, we will check before queueing the op whether it must wait on a map.
To avoid contention, there is now a map_lock which must be held along
with the PG lock in order to update the osdmap_ref.  The map_lock also
protects the waiting_for_map list and queueing PG ops at the back of
the OpWQ.  A few details:
1) It is no longer necessary to requeue waiting_for_map in on_change()
since the other ops are queued at the front.
2) Once waiting_for_map is non-empty, all ops are delayed to simplify
ordering.
3) waiting_for_map may now be non-empty during split, so we must split
waiting_for_map along with waiting_for_active.  This must be done
under the map_lock.

The bug which uncovered this involved an out of order op as follows:

client.4208.0:2378 (e252) arrives, object is degraded
client.4208.0:2379 (e253) arrives, waits for map
client.4208.0:2378 (e252) is requeued after recovery
client.4208.0:2379 (e253) is requeued on map arrival
client.4208.0:2379 is processed
client.4208.0:2378 is processed

Fixes: #4955
Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG: no need to wait on DeletingStateRef for flush
Samuel Just [Thu, 9 May 2013 23:49:46 +0000 (16:49 -0700)]
PG: no need to wait on DeletingStateRef for flush

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoosd_internals/pg_removal.rst: update for pg resurrection
Samuel Just [Thu, 9 May 2013 19:13:46 +0000 (12:13 -0700)]
osd_internals/pg_removal.rst: update for pg resurrection

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoOSD: add pg deletion cancelation
Samuel Just [Tue, 7 May 2013 18:12:43 +0000 (11:12 -0700)]
OSD: add pg deletion cancelation

DeletingState now allows _create_lock_pg() to attempt to cancel
pg deletion.

PG::init() must mark the PG as backfill iff we stopped a deletion.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agocommon/sharedptr_registry.hpp: add remove
Samuel Just [Thu, 9 May 2013 23:29:28 +0000 (16:29 -0700)]
common/sharedptr_registry.hpp: add remove

remove() can be used to clear an entry before all of its
references are removed.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoMerge branch 'master' of https://github.com/ceph/ceph
John Wilkins [Thu, 9 May 2013 19:49:59 +0000 (12:49 -0700)]
Merge branch 'master' of https://github.com/ceph/ceph

12 years agodoc: Updated doc for connectivity. Updated text with glossary terms.
John Wilkins [Thu, 9 May 2013 19:48:59 +0000 (12:48 -0700)]
doc: Updated doc for connectivity. Updated text with glossary terms.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Updated disk syntax. Updated text with glossary terms.
John Wilkins [Thu, 9 May 2013 19:48:14 +0000 (12:48 -0700)]
doc: Updated disk syntax. Updated text with glossary terms.

fixes: #4933

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoMerge pull request #267 from ceph/wip-coverity
Sage Weil [Thu, 9 May 2013 19:47:47 +0000 (12:47 -0700)]
Merge pull request #267 from ceph/wip-coverity

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agodoc: Added connectivity section. Updated doc with glossary terms.
John Wilkins [Thu, 9 May 2013 19:46:03 +0000 (12:46 -0700)]
doc: Added connectivity section. Updated doc with glossary terms.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added the non-implemented bit for the gateway to the dev/radosgw TOC.
John Wilkins [Thu, 9 May 2013 19:22:21 +0000 (12:22 -0700)]
doc: Added the non-implemented bit for the gateway to the dev/radosgw TOC.

fixes: #4978

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoOSD: don't rename pg collections, handle PGs in RemoveWQ
Samuel Just [Thu, 9 May 2013 19:20:24 +0000 (12:20 -0700)]
OSD: don't rename pg collections, handle PGs in RemoveWQ

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoMerge branch 'master' of https://github.com/ceph/ceph
John Wilkins [Thu, 9 May 2013 19:09:00 +0000 (12:09 -0700)]
Merge branch 'master' of https://github.com/ceph/ceph

12 years agodoc: Republishing the admin operations API for the gateway.
John Wilkins [Thu, 9 May 2013 19:08:28 +0000 (12:08 -0700)]
doc: Republishing the admin operations API for the gateway.

fixes: #4978

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Republishing the admin operations API for the gateway.
John Wilkins [Thu, 9 May 2013 19:07:05 +0000 (12:07 -0700)]
doc: Republishing the admin operations API for the gateway.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoosd: prioritize recovery for degraded pgs
David Zafman [Wed, 8 May 2013 01:03:25 +0000 (18:03 -0700)]
osd: prioritize recovery for degraded pgs

Three Reservation priorities from RECOVERY, BACKFILL_HIGH, BACKFILL_LOW

fixes: #4273

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoAdd priority option to AsyncReserver class
David Zafman [Tue, 7 May 2013 22:58:48 +0000 (15:58 -0700)]
Add priority option to AsyncReserver class

Add priority to request_reservation()
Change to map of lists by prioriry
Add priority to queue_pointers mappped type

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoAsyncReserver: Remove assert in set_max() for max > 0
David Zafman [Thu, 9 May 2013 18:46:32 +0000 (11:46 -0700)]
AsyncReserver: Remove assert in set_max() for max > 0

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agodoc: Document admin api web interface.
caleb miles [Fri, 5 Apr 2013 18:38:00 +0000 (14:38 -0400)]
doc: Document admin api web interface.

Signed-off-by: caleb miles <caleb.miles@inktank.com>