]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agov0.60 v0.60
Gary Lowell [Mon, 1 Apr 2013 19:22:53 +0000 (12:22 -0700)]
v0.60

12 years agolibrados: don't use lockdep for AioCompletionImpl
Josh Durgin [Mon, 1 Apr 2013 18:09:52 +0000 (11:09 -0700)]
librados: don't use lockdep for AioCompletionImpl

This is a quick workaround for the next branch. A more complete fix
will be done for the master branch. This does not affect correctness,
just what qa runs with lockdep enabled do.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage.weil@inktank.com>
12 years agoMerge pull request #178 from ceph/wip-client
Sage Weil [Mon, 1 Apr 2013 15:48:45 +0000 (08:48 -0700)]
Merge pull request #178 from ceph/wip-client

Fix client with cache disabled, and a use-after-free

Reviewed-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: do sync read when 'client oc = false' 178/head
Sage Weil [Mon, 1 Apr 2013 04:40:42 +0000 (21:40 -0700)]
client: do sync read when 'client oc = false'

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: fix use-after-free on session close and cond signals
Sage Weil [Mon, 1 Apr 2013 04:05:49 +0000 (21:05 -0700)]
client: fix use-after-free on session close and cond signals

Move the signal into the closed method, before we deallocate the
MetaSession, so that other callers catch it too.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #170 from ceph/wip-rbd-aio-flush
Josh Durgin [Fri, 29 Mar 2013 20:20:32 +0000 (13:20 -0700)]
Merge pull request #170 from ceph/wip-rbd-aio-flush

Reviewed-by: Sage Weil <sage.weil@inktank.com>
12 years agolibrados: move snapc creation to caller for aio_operate 170/head
Josh Durgin [Fri, 29 Mar 2013 19:46:27 +0000 (12:46 -0700)]
librados: move snapc creation to caller for aio_operate

The common case already has a snapshot context, so avoid duplicating
it (copying a potentially large vector) in IoCtxImpl::aio_operate().

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoceph: propagate do_command()'s return value to user space
Joao Eduardo Luis [Thu, 28 Mar 2013 02:07:18 +0000 (02:07 +0000)]
ceph: propagate do_command()'s return value to user space

We were returning '1' regardless of what do_command() returned in case
of error.  This would make building tools relying on command error codes
short of useless, and forced them to rely instead on error messages.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit e91405d540ce11b9996e4977212553bd33afb3ed)

12 years agoMerge pull request #168 from athanatos/wip_4471
Sage Weil [Thu, 28 Mar 2013 21:15:07 +0000 (14:15 -0700)]
Merge pull request #168 from athanatos/wip_4471

Wip 4471

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoPG: update PGPool::name in PGPool::update 168/head
Samuel Just [Thu, 28 Mar 2013 21:09:17 +0000 (14:09 -0700)]
PG: update PGPool::name in PGPool::update

Fixes: #4471
Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG: use int64_t for pool id in PGPool
Samuel Just [Thu, 28 Mar 2013 21:01:45 +0000 (14:01 -0700)]
PG: use int64_t for pool id in PGPool

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agolibrbd: increment version for new functions is_complete() and aio_flush()
Josh Durgin [Wed, 27 Mar 2013 22:48:17 +0000 (15:48 -0700)]
librbd: increment version for new functions is_complete() and aio_flush()

This done in a separate commit since the increased version number
should not be backported.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: add an async flush
Josh Durgin [Thu, 21 Mar 2013 23:04:10 +0000 (16:04 -0700)]
librbd: add an async flush

At this point it's a simple wrapper around the ObjectCacher or
librados.

This is needed for QEMU so that its main thread can continue while a
flush is occurring. Since this will be backported, don't update the
librbd version yet, just add a #define that QEMU and others can use to
detect the presence of aio_flush().

Refs: #3737
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: use the same IoCtx for each request
Josh Durgin [Wed, 27 Mar 2013 22:42:10 +0000 (15:42 -0700)]
librbd: use the same IoCtx for each request

Before we were duplicating the IoCtx for each new request since they
could have a different snapshot context or read from a different
snapshot id. Since librados now supports setting these explicitly
for a given request, do that instead.

Since librados tracks outstanding requests on a per-IoCtx basis, this
also fixes a bug that causes flush() without caching to ignore
all the outstanding requests, since they were to separate,
duplicate IoCtxs.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: add an is_complete() method to AioCompletions
Josh Durgin [Wed, 27 Mar 2013 22:37:27 +0000 (15:37 -0700)]
librbd: add an is_complete() method to AioCompletions

Mainly this is useful for testing, like flushing and checking that
all pending writes are complete after the flush finishes.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrados: add versions of a couple functions taking explicit snap args
Josh Durgin [Wed, 27 Mar 2013 22:32:29 +0000 (15:32 -0700)]
librados: add versions of a couple functions taking explicit snap args

Usually the snapid to read from or the snapcontext to send with a write
are determined implicitly by the IoCtx the operations are done on.

This makes it difficult to have multiple ops in flight to the same
IoCtx using different snapcontexts or reading from different snapshots,
particularly when more than one operation may be needed past the initial
scheduling.

Add versions of aio_read, aio_sparse_read, and aio_operate
that don't depend on the snap id or snapcontext stored in the IoCtx,
but get them from the caller. Specifying this information for each
operation can be a more useful interface in general, but for now just
add it for the methods used by librbd.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrados: add async flush interface
Josh Durgin [Wed, 27 Mar 2013 21:48:31 +0000 (14:48 -0700)]
librados: add async flush interface

Sometimes you don't want flush to block, and can't modify
already scheduled aio_writes. This will be useful for a
librbd async flush interface.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrados: increase version number to indicated new functions
Josh Durgin [Tue, 26 Mar 2013 22:20:48 +0000 (15:20 -0700)]
librados: increase version number to indicated new functions

Listing snaps and listing watchers were added to the C++ api.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: remove unneeded var from flush_set()
Josh Durgin [Thu, 28 Mar 2013 17:34:37 +0000 (10:34 -0700)]
ObjectCacher: remove unneeded var from flush_set()

The gather will only have subs if there is something to flush. Remove
the safe variable, which indicates the same thing, and convert the
conditionals that used it to an else branch. Movinig gather.activate()
inside the has_subs() check has no effect since activate() does
nothing when there are no subs.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: remove NULL checks in flush_set()
Josh Durgin [Fri, 22 Mar 2013 19:17:43 +0000 (12:17 -0700)]
ObjectCacher: remove NULL checks in flush_set()

Callers will always pass a callback, so assert this and remove the
checks for it being NULL.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: always complete flush_set() callback
Josh Durgin [Fri, 22 Mar 2013 19:13:36 +0000 (12:13 -0700)]
ObjectCacher: always complete flush_set() callback

This removes the last remnants of
b5e9995f59d363ba00d9cac413d9b754ee44e370. If there's nothing to flush,
immediately call the callback instead of deleting it. Callers were
assuming they were responsible for completing the callback whenever
flush_set() returned true, and always called complete(0) in this
case. Simplify the interface and just do this in flush_set(), so that
it always calls the callback.

Since C_GatherBuilder deletes its finisher if there are no subs,
only set its finisher when subs are present. This way we can still
call ->complete() for the callback.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: make aio_writes to the cache always non-blocking by default
Josh Durgin [Wed, 13 Mar 2013 16:42:43 +0000 (09:42 -0700)]
librbd: make aio_writes to the cache always non-blocking by default

When the ObjectCacher's writex blocks, it affects the thread requesting
the aio, which can cause starvation for other I/O when used by QEMU.

Preserve the old behavior via a config option in case this has any
bad side-effects, like too much memory usage under heavy write loads.

Fixes: #4091
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: optionally make writex always non-blocking
Josh Durgin [Wed, 13 Mar 2013 16:37:21 +0000 (09:37 -0700)]
ObjectCacher: optionally make writex always non-blocking

Add a callback argument to writex, and a finisher to run the
callbacks. Move the check for dirty+tx > max_dirty into a helper that
can be called from a wrapper around the callbacks from writex, or from
the current place in _wait_for_write().

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge pull request #163 from ceph/wip-rbd-snapset-cache
Sage Weil [Thu, 28 Mar 2013 14:33:50 +0000 (07:33 -0700)]
Merge pull request #163 from ceph/wip-rbd-snapset-cache

librbd: flush cache when set_snap() is called

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: flush cache when set_snap() is called 163/head
Josh Durgin [Thu, 28 Mar 2013 00:30:42 +0000 (17:30 -0700)]
librbd: flush cache when set_snap() is called

If there are writes pending, they should be sent while the image
is still writeable. If the image becomes read-only, flushing the
cache will just mark everything dirty again due to -EROFS.

Fixes: #4525
Backport: bobtail
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge pull request #159 from ceph/wip-4564
Sage Weil [Thu, 28 Mar 2013 04:20:50 +0000 (21:20 -0700)]
Merge pull request #159 from ceph/wip-4564

mds: Delay session close if in clientreplay

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomds: Delay session close if in clientreplay 159/head
Sam Lang [Wed, 27 Mar 2013 15:58:25 +0000 (10:58 -0500)]
mds: Delay session close if in clientreplay

If the mds is in clientreplay, a session close
request needs to be delayed until it reaches
active.  Otherwise, the session state gets set to
'closing', and the replay requests get dropped on the
floor.

Fixes #4564.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoMerge pull request #157 from ceph/wip-4539
Sage Weil [Wed, 27 Mar 2013 15:26:25 +0000 (08:26 -0700)]
Merge pull request #157 from ceph/wip-4539

mds: Clear backtrace updates on standby_trim_seg

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomds: Clear backtrace updates on standby_trim_seg 155/head 157/head
Sam Lang [Wed, 27 Mar 2013 14:35:08 +0000 (09:35 -0500)]
mds: Clear backtrace updates on standby_trim_seg

If the mds is standby, when a segment is trimmed, we need
to clear the backtrace updates list to avoid the following
assertion when the segment is deleted.

./include/elist.h: 92: FAILED assert(_head.empty())
ceph version 0.59-478-g8befbca (8befbca77aa50a1188969892aabedaf11d8f8ce7)
(MDLog::standby_trim_segments()+0xce5) [0x6ccec5]
(MDS::C_MDS_StandbyReplayRestartFinish::finish(int)+0x39) [0x4e86b9]
(Journaler::_finish_reprobe(int, unsigned long, Context*)+0x190)
[0x6d3210]
(Filer::_probed(Filer::Probe*, object_t const&, unsigned long,
utime_t)+0x558) [0x704a88]
(Objecter::C_Stat::finish(int)+0xc0) [0x705900]
(Objecter::handle_osd_op_reply(MOSDOpReply*)+0xe38) [0x6f1df8]
(MDS::handle_core_message(Message*)+0xae8) [0x4dc318]
(MDS::_dispatch(Message*)+0x2f) [0x4dc4df]
(MDS::ms_dispatch(Message*)+0x1db) [0x4ddf7b]
(DispatchQueue::entry()+0x341) [0x81f561]
(DispatchQueue::DispatchThread::entry()+0xd) [0x79c6ad]
(()+0x7e9a) [0x7f346bb9ee9a]
(clone()+0x6d) [0x7f346a3574bd]

Fixes #4539.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoReplicatedPG: send entire stats on OP_BACKFILL_FINISH
Samuel Just [Tue, 26 Mar 2013 22:10:37 +0000 (15:10 -0700)]
ReplicatedPG: send entire stats on OP_BACKFILL_FINISH

Otherwise, we update the stat.stat structure, but not the
stat.invalid_stats part.  This will result in a recently
split primary propogating the invalid stats but not the
invalid marker.  Sending the whole pg_stat_t structure
also mirrors MOSDSubOp.

Fixes: #4557
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #147 from ceph/wip-4537
Sage Weil [Tue, 26 Mar 2013 16:29:42 +0000 (09:29 -0700)]
Merge pull request #147 from ceph/wip-4537

mds: CInode::build_backtrace() always incr iter

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomds: CInode::build_backtrace() always incr iter 147/head
Sam Lang [Tue, 26 Mar 2013 13:55:40 +0000 (08:55 -0500)]
mds: CInode::build_backtrace() always incr iter

Always increment the iterator when adding old pools
to the backtrace.  This fixes a bug on files where
the layout had been set to a different pool and then
back to the same pool, causing continuous looping in
the build_backtrace() function.

Fixes #4537.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agorgw: bucket index ops on system buckets shouldn't do anything
Yehuda Sadeh [Mon, 25 Mar 2013 16:50:33 +0000 (09:50 -0700)]
rgw: bucket index ops on system buckets shouldn't do anything

Fixes: #4508
Backport: bobtail
On certain bucket index operations we didn't check whether
the bucket was a system bucket, which caused the operations
to fail. This triggered an error message on bucket removal
operations.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoclient: don't set other if lookup fails in rename
Sam Lang [Sat, 23 Mar 2013 19:07:59 +0000 (14:07 -0500)]
client: don't set other if lookup fails in rename

On rename, only set the other inode if the
lookup for the destination succeeds, otherwise we hit
a segv in set_other_inode().

Fixes #4517.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Tested-by: Noah Watkins <jayhawk@cs.ucsc.edu>
12 years agoclient: Fix rename returning ENOENT for dest
Sam Lang [Fri, 22 Mar 2013 20:02:58 +0000 (15:02 -0500)]
client: Fix rename returning ENOENT for dest

Introduced by fc80c1dc6ee315ae5e039986602ffadba46cb43b,
the client should _not_ fail if the lookup for the
destination path on rename returns ENOENT.

The previous code also did not check that the lookup
returned ENOENT or success.  We add the check and fail
if we get any other errors.

Fixes #4517.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agopreserve /var/lib/ceph on deb/rpm purge
Sage Weil [Fri, 22 Mar 2013 22:24:39 +0000 (15:24 -0700)]
preserve /var/lib/ceph on deb/rpm purge

We should clobber configuration and log data, but *not* user data.  Leave
/var/lib/ceph alone.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
12 years agoPG::GetMissing: need to check need_up_thru in MLogRec handler
Samuel Just [Fri, 22 Mar 2013 20:51:14 +0000 (13:51 -0700)]
PG::GetMissing: need to check need_up_thru in MLogRec handler

Backport: bobtail
Fixes: #4534
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoPG,osd_types: improve check_new_interval debugging
Samuel Just [Fri, 22 Mar 2013 20:48:49 +0000 (13:48 -0700)]
PG,osd_types: improve check_new_interval debugging

Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agocommon/MemoryModel: remove logging to /tmp/memlog
Sage Weil [Fri, 22 Mar 2013 20:25:49 +0000 (13:25 -0700)]
common/MemoryModel: remove logging to /tmp/memlog

This was a hack for dev purposes ages ago; remove it.  The predictable
filename is a security issue.

CVE-2013-1882

Reported-by: Michael Scherer <misc@zarb.org>
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agoinit-ceph: clean up temp ceph.conf filename on exit
Sage Weil [Fri, 22 Mar 2013 20:25:43 +0000 (13:25 -0700)]
init-ceph: clean up temp ceph.conf filename on exit

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agoinit-ceph: push temp conf file to a unique location on remote host
Sage Weil [Fri, 22 Mar 2013 20:25:33 +0000 (13:25 -0700)]
init-ceph: push temp conf file to a unique location on remote host

The predictable file name is a security problem.

CVE-2013-1882

Reported-by: Michael Scherer <misc@zarb.org>
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agomkcephfs: make remote temp directory name unique
Sage Weil [Fri, 22 Mar 2013 20:25:23 +0000 (13:25 -0700)]
mkcephfs: make remote temp directory name unique

The predictable file name is a security problem.

CVE-2013-1882

Reported-by: Michael Scherer <misc@zarb.org>
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agoosd: reenable 'journal aio = true'
Sage Weil [Tue, 19 Mar 2013 21:01:08 +0000 (14:01 -0700)]
osd: reenable 'journal aio = true'

Now that #4079 is resolved.  Reverts 1cfc3ae0.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoos/FileJournal: fix aio self-throttling deadlock
Sage Weil [Tue, 19 Mar 2013 21:26:16 +0000 (14:26 -0700)]
os/FileJournal: fix aio self-throttling deadlock

This block of code tries to limit the number of aios in flight by waiting
for the amount of data to be written to grow relative to a function of the
number of aios.  Strictly speaking, the condition we are waiting for is a
function of both aio_num and the write queue, but we are only woken by
changes in aio_num, and were (in rare cases) waiting when aio_num == 0 and
there was no possibility of being woken.

Fix this by verifying that aio_num > 0, and restructuring the loop to
recheck that condition on each wakeup.

Fixes: #4079
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoMerge pull request #135 from ceph/wip-4519
Sage Weil [Fri, 22 Mar 2013 01:25:01 +0000 (18:25 -0700)]
Merge pull request #135 from ceph/wip-4519

mon: AuthMonitor: delete auth_handler while increasing max_global_id

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: AuthMonitor: delete auth_handler while increasing max_global_id 135/head
Joao Eduardo Luis [Fri, 22 Mar 2013 00:49:28 +0000 (00:49 +0000)]
mon: AuthMonitor: delete auth_handler while increasing max_global_id

By not deleting and setting NULL the session's auth_handler, we could
hit a scenario in which we'd end up dispatching a previously-wait-listed
auth message and we wouldn't start its auth session.

This only happened when increasing max_global_id via Paxos (in which case
we would wait-list the message) and would only be noticeable when running
with cephx disabled.

Fixes: #4519
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoFileJournal: quieter debugging on journal scanning
Samuel Just [Tue, 19 Mar 2013 21:45:41 +0000 (14:45 -0700)]
FileJournal: quieter debugging on journal scanning

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 6740d512ac12263f7bee370bc14b1179f83af5be)

12 years agoMerge branch 'next'
Gary Lowell [Thu, 21 Mar 2013 07:40:16 +0000 (00:40 -0700)]
Merge branch 'next'

12 years agodoc/release-notes: v0.59
Sage Weil [Thu, 21 Mar 2013 05:11:15 +0000 (22:11 -0700)]
doc/release-notes: v0.59

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #126 from alram/master
Sage Weil [Thu, 21 Mar 2013 00:07:11 +0000 (17:07 -0700)]
Merge pull request #126 from alram/master

Update Chef deployment documentation

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoUpdate Chef deployment documentation 126/head
Alexandre Marangone [Wed, 20 Mar 2013 21:23:06 +0000 (14:23 -0700)]
Update Chef deployment documentation

Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
12 years agoMerge pull request #124 from ceph/wip-4509
Sage Weil [Wed, 20 Mar 2013 23:17:51 +0000 (16:17 -0700)]
Merge pull request #124 from ceph/wip-4509

mon: DataHealthService: shutdown mon if failed to obtain disk stats

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: DataHealthService: log to derr instead if we're about to shutdown 124/head
Joao Eduardo Luis [Wed, 20 Mar 2013 20:51:06 +0000 (20:51 +0000)]
mon: DataHealthService: log to derr instead if we're about to shutdown

Otherwise the message would -- or could -- be lost.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: DataHealthService: shutdown mon if failed to obtain disk stats
Joao Eduardo Luis [Wed, 20 Mar 2013 20:49:20 +0000 (20:49 +0000)]
mon: DataHealthService: shutdown mon if failed to obtain disk stats

Being unable to run a ::statfs() may be a symptom of something bigger.

We want to cleanly shutdown the monitor ASAP if such thing happens.

Fixes: #4509
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoMerge pull request #123 from dalgaaf/wip-da-sca-misc-1
Sage Weil [Wed, 20 Mar 2013 17:12:06 +0000 (10:12 -0700)]
Merge pull request #123 from dalgaaf/wip-da-sca-misc-1

Some smaller misc fixes

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoclient/Client.cc: handle error if _lookup() fails 123/head
Danny Al-Gaaf [Wed, 20 Mar 2013 16:08:42 +0000 (17:08 +0100)]
client/Client.cc: handle error if _lookup() fails

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoqa/workunits/direct_io/test_sync_io.c: add proper error handling
Danny Al-Gaaf [Wed, 20 Mar 2013 15:56:03 +0000 (16:56 +0100)]
qa/workunits/direct_io/test_sync_io.c: add proper error handling

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest_short_dio_read.c: add proper error handling
Danny Al-Gaaf [Wed, 20 Mar 2013 15:37:37 +0000 (16:37 +0100)]
test_short_dio_read.c: add proper error handling

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/Locker.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Wed, 20 Mar 2013 15:15:06 +0000 (16:15 +0100)]
mds/Locker.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomount/mount.ceph.c: remove unused variable
Danny Al-Gaaf [Tue, 19 Mar 2013 12:09:08 +0000 (13:09 +0100)]
mount/mount.ceph.c: remove unused variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoMerge pull request #121 from ceph/wip-4448
Sage Weil [Wed, 20 Mar 2013 13:33:18 +0000 (06:33 -0700)]
Merge pull request #121 from ceph/wip-4448

mon: Monitor: clearer output on error during attempt to convert store

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: Monitor: clearer output on error during attempt to convert store 121/head
Joao Eduardo Luis [Wed, 20 Mar 2013 13:31:14 +0000 (13:31 +0000)]
mon: Monitor: clearer output on error during attempt to convert store

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agov0.59 v0.59
Gary Lowell [Wed, 20 Mar 2013 05:27:13 +0000 (22:27 -0700)]
v0.59

12 years agoMerge pull request #106 from ceph/wip-crush
Sage Weil [Tue, 19 Mar 2013 21:53:23 +0000 (14:53 -0700)]
Merge pull request #106 from ceph/wip-crush

crush: update weights properly for DAG (not tree) maps

Reviewed-by: caleb miles <caleb.miles@inktank.com>
12 years agoMerge pull request #118 from dalgaaf/wip-da-enum
Sage Weil [Tue, 19 Mar 2013 20:36:12 +0000 (13:36 -0700)]
Merge pull request #118 from dalgaaf/wip-da-enum

QuorumService.h: use enum instead of static const int

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoQuorumService.h: use enum instead of static const int 118/head
Danny Al-Gaaf [Tue, 19 Mar 2013 20:33:18 +0000 (21:33 +0100)]
QuorumService.h: use enum instead of static const int

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoMissed adding rados_types.hpp to package
David Zafman [Wed, 6 Mar 2013 22:33:12 +0000 (14:33 -0800)]
Missed adding rados_types.hpp to package

Caused by 3bd48cbbadb7908dd833ccde75359f085828fc5c
feature 4207 implementation

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
(cherry picked from commit e1e2d5d2176cc9debd436ba944e6ca65b3253c8a)

12 years agoPendingReleaseNotes: fix typo
Josh Durgin [Sat, 16 Mar 2013 00:51:13 +0000 (17:51 -0700)]
PendingReleaseNotes: fix typo

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: optionally wait for a flush before enabling writeback
Josh Durgin [Sat, 16 Mar 2013 00:28:13 +0000 (17:28 -0700)]
librbd: optionally wait for a flush before enabling writeback

Older guests may not send flushes properly (i.e. never), so if this is
enabled, rbd_cache=true is safe for them transparently.

Disable by default, since it will unnecessarily slow down newer guest
boot, and prevent writeback caching for things that don't need to send
flushes, like the command line tool.

Refs: #3817
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMakefile: missing header
Sage Weil [Tue, 19 Mar 2013 17:39:50 +0000 (10:39 -0700)]
Makefile: missing header

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: use enum instead of static const int
Sage Weil [Tue, 19 Mar 2013 17:21:52 +0000 (10:21 -0700)]
mon: use enum instead of static const int

This way it compiles.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/Paxos: set state to RECOVERING during restart
Sage Weil [Tue, 19 Mar 2013 17:15:41 +0000 (10:15 -0700)]
mon/Paxos: set state to RECOVERING during restart

This ensures that the paxos state is not active when the PaxosService
restart() methods run right afterwards, and that EAGAIN waiters will get
requeued appropriately.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMakefile.am: fix misspelt header name
Joao Eduardo Luis [Tue, 19 Mar 2013 16:31:48 +0000 (16:31 +0000)]
Makefile.am: fix misspelt header name

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon/PaxosService: handle non-zero return values
Sage Weil [Tue, 19 Mar 2013 06:09:51 +0000 (23:09 -0700)]
mon/PaxosService: handle non-zero return values

If 7aec13f749035b9bef5e398c1ac3d56ceec8eb81 we started passing non-zero
return values to these completions; now we have to deal with them
accordingly.

RetryMessage behaves just like the Monitor variant.

Propose and Committed update state but otherwise ignore non-zero
return values.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'next'
Sage Weil [Tue, 19 Mar 2013 05:54:25 +0000 (22:54 -0700)]
Merge branch 'next'

12 years agoceph-disk-prepare: 'mkfs -t' instead of 'mkfs --type='
Sage Weil [Tue, 19 Mar 2013 04:13:34 +0000 (21:13 -0700)]
ceph-disk-prepare: 'mkfs -t' instead of 'mkfs --type='

Older mkfs (el6) doesn't like --type=.

Fixes: #4495
Reported-by: Alexandre Maragone <alexandre.maragone@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomds: Handle ENODATA returned from getxattr
Sam Lang [Mon, 18 Mar 2013 21:59:04 +0000 (16:59 -0500)]
mds: Handle ENODATA returned from getxattr

The osds might return ENODATA if we request an
xattr that doesn't exist.  In this case, we're
requesting the 'parent' xattr so that we can
remove all the forwarding pointers, but the xattr
may not have been written (which only happens on
log segment trim), so we don't assert here.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon/PaxosService: fix proposal waiter handling
Sage Weil [Tue, 19 Mar 2013 04:00:06 +0000 (21:00 -0700)]
mon/PaxosService: fix proposal waiter handling

- Cancel the propsal waiters with EAGAIN on election, etc.
- Drop the wakeup helper and open-code the one caller.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoMakefile: fix header name
Sage Weil [Mon, 18 Mar 2013 23:18:46 +0000 (16:18 -0700)]
Makefile: fix header name

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #115 from ceph/wip-4199
Sage Weil [Mon, 18 Mar 2013 22:53:56 +0000 (15:53 -0700)]
Merge pull request #115 from ceph/wip-4199

Resolves #4199

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: Monitor: take advantage of the new HealthMonitor class. 115/head
Joao Eduardo Luis [Sun, 17 Mar 2013 18:41:42 +0000 (18:41 +0000)]
mon: Monitor: take advantage of the new HealthMonitor class.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: HealthMonitor: Keep track of monitor cluster's health
Joao Eduardo Luis [Sun, 17 Mar 2013 18:40:58 +0000 (18:40 +0000)]
mon: HealthMonitor: Keep track of monitor cluster's health

The HealthMonitor builds upon the QuorumService interface, and should be
used to keep track of all and any relevant information about the monitor
cluster (maybe even about all the cluster if need be).

This patch also introduces the HealthService interface, used to define
a HealthMonitor service, responsible for dispatching 'MMonHealth' messages
(the QuorumService interface dispatches generic 'Message').

Based on the HealthService interface, we introduce the DataHealthService
class, a service that will track disk space consumption by the monitors,
warn when a given threshold is crossed, and gracefully shutdown the monitor
if disk space usage hits critical levels that might affect the correct
monitor behavior.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: QuorumService: Allow for services quorum-bound to be easily created
Joao Eduardo Luis [Sun, 17 Mar 2013 18:33:15 +0000 (18:33 +0000)]
mon: QuorumService: Allow for services quorum-bound to be easily created

As the monitor grows in features, we have been dumping them in the Monitor
class as they don't really fit anywhere else.

Most of those latest features have been, and some of the future changes
will also be, quorum-bounded.  By that we mean that these features tend
to require a quorum to be present in order to work.

Although we already have the PaxosService interface, it really isn't
adequate for this kind of features, as they don't really require Paxos,
nor do they access the store.  Furthermore, they don't really need to
tick at the same rate as the monitor, and can be fairly independent.

Therefore we now introduce the concept of a QuorumService, a class to be
built upon, managing the tick and dispatch for any kind of service
basically requiring a quorum to function.

Among the already existing monitor features that could take advantage of
this new class we can find the Timecheck infrastructure, as it is by
nature quorum bounded.  The monitor store sync could also take advantage
of this service, although it doesn't really require a quorum to work,
and even the PaxosService-related classes could use this.

This patch also introduces the MMonQuorumService base class, to be used
by any message that should want to.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoqa: add 16MB direct-io write test
Sage Weil [Mon, 18 Mar 2013 21:13:29 +0000 (14:13 -0700)]
qa: add 16MB direct-io write test

See bug #2657.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #113 from dalgaaf/wip-da-performance-3
Sage Weil [Mon, 18 Mar 2013 20:53:16 +0000 (13:53 -0700)]
Merge pull request #113 from dalgaaf/wip-da-performance-3

Iterator related fixes

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #112 from dalgaaf/wip-da-performance-2-v2
Sage Weil [Mon, 18 Mar 2013 20:51:57 +0000 (13:51 -0700)]
Merge pull request #112 from dalgaaf/wip-da-performance-2-v2

prefer prefix ++/--operator for e.g. iterators for performance reasons

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agosignal_handler: add func to queue an async signal
Sage Weil [Mon, 18 Mar 2013 20:10:36 +0000 (13:10 -0700)]
signal_handler: add func to queue an async signal

For example, queue a SIGINT without actually sending the signal via the
OS.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: Remove unecessary set_inode() in _rmdir()
Sam Lang [Mon, 18 Mar 2013 19:40:48 +0000 (14:40 -0500)]
client:  Remove unecessary set_inode() in _rmdir()

With the recent changes in fc80c1dc6ee315ae5e039986602ffadba46cb43b,
we only allow setting the inode once on a MetaRequest.  This triggered
a bug in _rmdir(), where the parent dir inode passed in and being set
on the MetaRequest, and then also setting the dir inode on the MetaRequest.
Removing the set_inode() using the parent dir inode resolves this issue.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon/Session.h: prefer prefix ++operator for iterators 113/head
Danny Al-Gaaf [Mon, 18 Mar 2013 14:00:41 +0000 (15:00 +0100)]
mon/Session.h: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/filestore/workload_generator.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Mon, 18 Mar 2013 13:39:09 +0000 (14:39 +0100)]
test/filestore/workload_generator.cc: prefer prefix ++operator for iterators

Prefer prefix ++operator for iterator. Move the iterator declaration into
the for-loop header since the iterator isn't used outside the loop.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/filestore/test_idempotent.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Mon, 18 Mar 2013 13:38:49 +0000 (14:38 +0100)]
test/filestore/test_idempotent.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/filestore/test_idempotent.cc: fix ~TestFileStoreState()
Danny Al-Gaaf [Mon, 18 Mar 2013 13:34:37 +0000 (14:34 +0100)]
test/filestore/test_idempotent.cc: fix ~TestFileStoreState()

Fix interator handling in ~TestFileStoreState(). After std::map::erase()
the used iterator is invalid. Use a while-loop and erase the object with
post-incremented iterator instead.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/test_snap_mapper.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Mon, 18 Mar 2013 13:34:15 +0000 (14:34 +0100)]
test/test_snap_mapper.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/osd/RadosModel.h: prefer prefix ++operator for iterators
Danny Al-Gaaf [Mon, 18 Mar 2013 13:33:32 +0000 (14:33 +0100)]
test/osd/RadosModel.h: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/filestore/TestFileStoreState.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Mon, 18 Mar 2013 13:33:06 +0000 (14:33 +0100)]
test/filestore/TestFileStoreState.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/xattr_bench.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Mon, 18 Mar 2013 13:32:41 +0000 (14:32 +0100)]
test/xattr_bench.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/osd/Object.cc: prefer prefix --/++operator for iterators
Danny Al-Gaaf [Mon, 18 Mar 2013 13:31:23 +0000 (14:31 +0100)]
test/osd/Object.cc: prefer prefix --/++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/encoding/ceph_dencoder.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Mon, 18 Mar 2013 13:30:51 +0000 (14:30 +0100)]
test/encoding/ceph_dencoder.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/bench/bencher.h: prefer prefix ++operator for iterators
Danny Al-Gaaf [Mon, 18 Mar 2013 13:30:23 +0000 (14:30 +0100)]
test/bench/bencher.h: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoObjectMap/test_object_map.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Mon, 18 Mar 2013 13:29:38 +0000 (14:29 +0100)]
ObjectMap/test_object_map.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>