]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agoAdded python wrapper to rados_cluster_stat 31/head
Chris Glass [Thu, 10 Jan 2013 13:43:49 +0000 (14:43 +0100)]
Added python wrapper to rados_cluster_stat

The new get_cluster_stats() method on the rados.Rados object calls
the rados_cluster_stat() function in the librados library.

Signed-off-by: Christopher Glass <christopher.glass@canonical.com>
12 years agorbd: allow copy of zero-length images. Includes simple test.
Dan Mick [Wed, 9 Jan 2013 22:50:48 +0000 (14:50 -0800)]
rbd: allow copy of zero-length images.  Includes simple test.

Fixes: #3765
Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agodoc/install/debian.rst: fix typo in link ref; broke doc build
Dan Mick [Thu, 10 Jan 2013 00:10:36 +0000 (16:10 -0800)]
doc/install/debian.rst: fix typo in link ref; broke doc build

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoMerge branch 'next'
Dan Mick [Wed, 9 Jan 2013 23:11:36 +0000 (15:11 -0800)]
Merge branch 'next'

Want to get various rbd-related fixes together for upgrade testing

12 years agoReplicatedPG: increment scrubber.errors rather than errors
Samuel Just [Wed, 9 Jan 2013 22:39:00 +0000 (14:39 -0800)]
ReplicatedPG: increment scrubber.errors rather than errors

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agolibrados: add aio stat tests
Filippos Giannakos [Thu, 20 Dec 2012 20:05:11 +0000 (22:05 +0200)]
librados: add aio stat tests

Implement simple write-stat test, and a write-stat-remove-stat test cycle.

Signed-off-by: Filippos Giannakos <philipgian@grnet.gr>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrados: implement aio_stat
Filippos Giannakos [Thu, 20 Dec 2012 20:05:10 +0000 (22:05 +0200)]
librados: implement aio_stat

Implement aio stat and also export this functionality to the C API.

Signed-off-by: Filippos Giannakos <philipgian@grnet.gr>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoosd: make missing head non-fatal during scrub
Sage Weil [Wed, 2 Jan 2013 17:39:26 +0000 (09:39 -0800)]
osd: make missing head non-fatal during scrub

If we encounter a scrub without a preceeding head, warn instead of
crashing.  Note that this is still something we can't repair.

See #3705.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agorgw: Fix crash when FastCGI frontend doesn't set SCRIPT_URI
Sylvain Munaut [Mon, 7 Jan 2013 12:13:49 +0000 (13:13 +0100)]
rgw: Fix crash when FastCGI frontend doesn't set SCRIPT_URI

Fixes: #3735
Signed-off-by: caleb miles <caleb.miles@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agorgw: fix handler leak in handle_request
caleb miles [Tue, 8 Jan 2013 20:56:00 +0000 (15:56 -0500)]
rgw: fix handler leak in handle_request

Fixes: #3682
Signed-off-by: caleb miles <caleb.miles@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: Allow get_lock_info to fail
Dan Mick [Tue, 8 Jan 2013 19:21:22 +0000 (11:21 -0800)]
librbd: Allow get_lock_info to fail

If the lock class isn't present, EOPNOTSUPP is returned for lock calls
on newer OSDs, but sadly EIO on older; we need to treat both as
acceptable failures for RBD images.  rados lock list will still fail.

Fixes #3744.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agodoc/release-notes: v0.48.3argonaut
Sage Weil [Wed, 9 Jan 2013 02:21:12 +0000 (18:21 -0800)]
doc/release-notes: v0.48.3argonaut

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc/install: new URLs for argonaut vs bobtail
Sage Weil [Tue, 8 Jan 2013 04:51:04 +0000 (20:51 -0800)]
doc/install: new URLs for argonaut vs bobtail

Also restructure the document a bit to make the choice of packages more
clear.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc/release-notes: v0.56.1
Sage Weil [Tue, 8 Jan 2013 04:46:31 +0000 (20:46 -0800)]
doc/release-notes: v0.56.1

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-stripe-gran'
Noah Watkins [Tue, 8 Jan 2013 00:14:16 +0000 (16:14 -0800)]
Merge branch 'wip-stripe-gran'

Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agotest: enforce -ENOTCONN contract in libcephfs
Noah Watkins [Mon, 7 Jan 2013 23:50:36 +0000 (15:50 -0800)]
test: enforce -ENOTCONN contract in libcephfs

Tests all relevant calls for -ENOTCONN when used with an unmounted
ceph_mount_info param.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agolibcephfs: return -ENOTCONN when call unmounted
Noah Watkins [Mon, 7 Jan 2013 23:47:38 +0000 (15:47 -0800)]
libcephfs: return -ENOTCONN when call unmounted

Adds -ENOTCONN return value for stat, fchmod, fchown, lchown.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoPG: set DEGRADED in Active AdvMap handler based on pool size
Samuel Just [Mon, 7 Jan 2013 23:02:34 +0000 (15:02 -0800)]
PG: set DEGRADED in Active AdvMap handler based on pool size

Otherwise, if the acting set does not change, the pg might
not show up as degraded if the pool size now exceeds the
acting set size.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agolibcephfs: clarify interface return value
Noah Watkins [Mon, 7 Jan 2013 23:04:33 +0000 (15:04 -0800)]
libcephfs: clarify interface return value

Document that ceph_get_stripe_unit_granularity may return an error code
(e.g. -ENOTCONN). The interface requires a mount, but currently we
return a compile-time constant. Other error codes may be possible in the
future.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoMerge branch 'next'
Sage Weil [Mon, 7 Jan 2013 21:12:33 +0000 (13:12 -0800)]
Merge branch 'next'

12 years agoMerge branch 'wip-3678-b' into next
Sage Weil [Mon, 7 Jan 2013 21:04:13 +0000 (13:04 -0800)]
Merge branch 'wip-3678-b' into next

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agomsg/Pipe: prepare Message data for wire under pipe_lock
Sage Weil [Sun, 6 Jan 2013 16:38:27 +0000 (08:38 -0800)]
msg/Pipe: prepare Message data for wire under pipe_lock

We cannot trust the Message bufferlists or other structures to be
stable without pipe_lock, as another Pipe may claim and modify the sent
list items while we are writing to the socket.

Related to #3678.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsgr: update Message envelope in encode, not write_message
Sage Weil [Sun, 6 Jan 2013 16:33:01 +0000 (08:33 -0800)]
msgr: update Message envelope in encode, not write_message

Fill out the Message header, footer, and calculate CRCs during
encoding, not write_message().  This removes most modifications from
Pipe::write_message().

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/Objecter: fix linger_ops iterator invalidation on pool deletion
Sage Weil [Mon, 7 Jan 2013 20:58:39 +0000 (12:58 -0800)]
osdc/Objecter: fix linger_ops iterator invalidation on pool deletion

The call to check_linger_pool_dne() may unregister the linger request,
invalidating the iterator.  To avoid this, increment the iterator at
the top of the loop.

This mirror the fix in 4bf9078286d58c2cd4e85cb8b31411220a377092 for
regular non-linger ops.

Fixes: #3734
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoceph-fuse: rename ceph_ll_* to fuse_ll_*
David Zafman [Fri, 4 Jan 2013 21:37:20 +0000 (13:37 -0800)]
ceph-fuse: rename ceph_ll_* to fuse_ll_*

To not conflict with future linuxbox pull for nfs-ganesha.

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomsg/Pipe: encode message inside pipe_lock
Sage Weil [Sun, 6 Jan 2013 16:25:40 +0000 (08:25 -0800)]
msg/Pipe: encode message inside pipe_lock

This modifies bufferlists in the Message struct, and it is possible
for multiple instances of the Pipe to get references on the Message;
make sure they don't modify those bufferlists concurrently.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsg/Pipe: associate sending msgs to con inside lock
Sage Weil [Sat, 5 Jan 2013 18:39:08 +0000 (10:39 -0800)]
msg/Pipe: associate sending msgs to con inside lock

Associate a sending message with the connection inside the pipe_lock.
This way if a racing thread tries to steal these messages it will
be sure to reset the con point *after* we do such that it the con
pointer is valid in encode_payload() (and later).

This may be part of #3678.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsg/Pipe: fix msg leak in requeue_sent()
Sage Weil [Sat, 5 Jan 2013 17:29:50 +0000 (09:29 -0800)]
msg/Pipe: fix msg leak in requeue_sent()

The sent list owns a reference to each message.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoos/FileJournal: include limits.h
Sage Weil [Sun, 6 Jan 2013 04:53:49 +0000 (20:53 -0800)]
os/FileJournal: include limits.h

Needed for IOV_MAX.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agojava: add stripe unit granularity tests
Noah Watkins [Sat, 5 Jan 2013 19:17:58 +0000 (11:17 -0800)]
java: add stripe unit granularity tests

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: update javadoc comments
Noah Watkins [Sat, 5 Jan 2013 19:12:25 +0000 (11:12 -0800)]
java: update javadoc comments

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: fix whitespace
Noah Watkins [Sat, 5 Jan 2013 19:10:53 +0000 (11:10 -0800)]
java: fix whitespace

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: add support for get_stripe_unit_granularity
Joe Buck [Sat, 5 Jan 2013 01:33:26 +0000 (17:33 -0800)]
java: add support for get_stripe_unit_granularity

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
12 years agolibcephfs: expose stripe unit granularity
Noah Watkins [Fri, 4 Jan 2013 22:57:20 +0000 (14:57 -0800)]
libcephfs: expose stripe unit granularity

Assists clients in choosing layout parameters.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoMerge branch 'next'
Sage Weil [Sat, 5 Jan 2013 04:48:12 +0000 (20:48 -0800)]
Merge branch 'next'

12 years agoosd: special case CALL op to not have RD bit effects
Sage Weil [Sat, 5 Jan 2013 01:43:41 +0000 (17:43 -0800)]
osd: special case CALL op to not have RD bit effects

In commit 20496b8d2b2c3779a771695c6f778abbdb66d92a we treat a CALL as
different from a normal "read", but we did not adjust the behavior
determined by the RD bit in the op.  We tried to fix that in
91e941aef9f55425cc12204146f26d79c444cfae, but changing the op code breaks
compatibility, so that was reverted.

Instead, special-case CALL in the helper--the only point in the code that
actually checks for the RD bit.  (And fix one lingering user to use that
helper appropriately.)

Fixes: #3731
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agoRevert "OSD: remove RD flag from CALL ops"
Sage Weil [Sat, 5 Jan 2013 04:46:48 +0000 (20:46 -0800)]
Revert "OSD: remove RD flag from CALL ops"

This reverts commit 91e941aef9f55425cc12204146f26d79c444cfae.

We cannot change this op code without breaking compatibility
with old code (client and server).  We'll have to special case
this op code instead.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agolibcephfs: delete client after messenger shutdown
Noah Watkins [Fri, 4 Jan 2013 22:15:31 +0000 (14:15 -0800)]
libcephfs: delete client after messenger shutdown

Prevents race between messages being dispatched to the client after the
client has been free'd.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agorbd: Don't call ProgressContext's finish() if there's an error.
Dan Mick [Sat, 5 Jan 2013 02:00:24 +0000 (18:00 -0800)]
rbd: Don't call ProgressContext's finish() if there's an error.

do_copy was different from the others; call pc.fail() on error and
do not call pc.finish().

Fixes: #3729
Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoReplicatedPG: remove old-head optization from push_to_replica
Samuel Just [Fri, 4 Jan 2013 20:43:52 +0000 (12:43 -0800)]
ReplicatedPG: remove old-head optization from push_to_replica

This optimization allowed the primary to push a clone as a single push in the
case that the head object on the replica is old and happens to be at the same
version as the clone.  In general, using head in clone_subsets is tricky since
we might be writing to head during the push.  calc_clone_subsets does not
consider head (probably for this reason).  Handling the clone from head case
properly would require blocking writes on head in the interim which is probably
a bad trade off anyway.

Because the old-head optimization only comes into play if the replica's state
happens to fall on the last write to head prior to the snap that caused the
clone in question, it's not worth the complexity.

Fixes: #3698
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote branch 'origin/wip-rbd-watch'
Josh Durgin [Fri, 4 Jan 2013 21:37:29 +0000 (13:37 -0800)]
Merge remote branch 'origin/wip-rbd-watch'

Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agoos/FileStore: fix non-btrfs op_seq commit order
Sage Weil [Fri, 4 Jan 2013 01:15:07 +0000 (17:15 -0800)]
os/FileStore: fix non-btrfs op_seq commit order

The op_seq file is the starting point for journal replay.  For stable btrfs
commit mode, which is using a snapshot as a reference, we should write this
file before we take the snap.  We normally ignore current/ contents anyway.

On non-btrfs file systems, however, we should only write this file *after*
we do a full sync, and we should then fsync(2) it before we continue
(and potentially trim anything from the journal).

This fixes a serious bug that could cause data loss and corruption after
a power loss event.  For a 'kill -9' or crash, however, there was little
risk, since the writes were still captured by the host's cache.

Fixes: #3721
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agodoc: Removed the --without-tcmalloc flag until further advised.
John Wilkins [Fri, 4 Jan 2013 00:13:13 +0000 (16:13 -0800)]
doc: Removed the --without-tcmalloc flag until further advised.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoMerge pull request #30 from rca/master
Sage Weil [Fri, 4 Jan 2013 00:07:59 +0000 (16:07 -0800)]
Merge pull request #30 from rca/master

Minor clarification in docs.

12 years agodoc: Added defaults for PGs, links to recommended settings, and updated note on split...
John Wilkins [Thu, 3 Jan 2013 22:51:33 +0000 (14:51 -0800)]
doc: Added defaults for PGs, links to recommended settings, and updated note on splitting.

Fixes: #3555
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoOSD: for old osds, dispatch peering messages immediately
Samuel Just [Thu, 3 Jan 2013 17:59:45 +0000 (09:59 -0800)]
OSD: for old osds, dispatch peering messages immediately

Normally, we batch up peering messages until the end of
process_peering_events to allow us to combine many notifies, etc
to the same osd into the same message.  However, old osds assume
that the actiavtion message (log or info) will be _dispatched
before the first sub_op_modify of the interval.  Thus, for those
peers, we need to send the peering messages before we drop the
pg lock, lest we issue a client repop from another thread before
activation message is sent.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agodoc: Added comments on --without-tcmalloc option when building Ceph.
John Wilkins [Thu, 3 Jan 2013 21:30:14 +0000 (13:30 -0800)]
doc: Added comments on --without-tcmalloc option when building Ceph.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoUpdate doc/rados/configuration/filesystem-recommendations.rst 30/head
rca [Thu, 3 Jan 2013 21:30:01 +0000 (13:30 -0800)]
Update doc/rados/configuration/filesystem-recommendations.rst

Clarified when it's necessary to use the setting:

filestore xattr use omap = true

12 years agodoc: Added some packages to the copyable line.
John Wilkins [Thu, 3 Jan 2013 21:29:20 +0000 (13:29 -0800)]
doc: Added some packages to the copyable line.

Fixes: #3686
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Fixed syntax error.
John Wilkins [Thu, 3 Jan 2013 21:28:06 +0000 (13:28 -0800)]
doc: Fixed syntax error.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-3714-b' into next
Sage Weil [Thu, 3 Jan 2013 20:53:07 +0000 (12:53 -0800)]
Merge remote-tracking branch 'gh/wip-3714-b' into next

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years ago qa/workunit: Add dbench-short.sh for nfs suite
David Zafman [Thu, 3 Jan 2013 20:44:19 +0000 (12:44 -0800)]
qa/workunit:  Add dbench-short.sh for nfs suite

    A multi-client dbench run doesn't work over NFS,
    see bug #3718.  Make single client dbench available.

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoosd: move common active vs booting code into consume_map
Sage Weil [Thu, 3 Jan 2013 06:38:53 +0000 (22:38 -0800)]
osd: move common active vs booting code into consume_map

Push osdmaps to PGs in separate method from activate_map() (whose name
is becoming less and less accurate).

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: let pgs process map advances before booting
Sage Weil [Thu, 3 Jan 2013 06:20:06 +0000 (22:20 -0800)]
osd: let pgs process map advances before booting

The OSD deliberate consumes and processes most OSDMaps from while it
was down before it marks itself up, as this is can be slow.  The new
threading code does this asynchronously in peering_wq, though, and
does not let it drain before booting the OSD.  The OSD can get into
a situation where it marks itself up but is not responsive or useful
because of the backlog, and only makes the situation works by
generating more osdmaps as result.

Fix this by calling activate_map() even when booting, and when booting
draining the peering_wq on each call.  This is harmless since we are
not yet processing actual ops; we only need to be async when active.

Fixes: #3714
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: drop oldest_last_clean from activate_map
Sage Weil [Thu, 3 Jan 2013 06:04:34 +0000 (22:04 -0800)]
osd: drop oldest_last_clean from activate_map

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: drop unused variables from activate_map
Sage Weil [Thu, 3 Jan 2013 06:04:08 +0000 (22:04 -0800)]
osd: drop unused variables from activate_map

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoOSDMap: fix modifed -> modified typo
Sage Weil [Thu, 3 Jan 2013 05:09:07 +0000 (21:09 -0800)]
OSDMap: fix modifed -> modified typo

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Thu, 3 Jan 2013 02:13:25 +0000 (18:13 -0800)]
Merge remote-tracking branch 'gh/next'

12 years agolog: fix locking typo/stupid for dump_recent()
Sage Weil [Wed, 2 Jan 2013 21:58:44 +0000 (13:58 -0800)]
log: fix locking typo/stupid for dump_recent()

We weren't locking m_flush_mutex properly, which in turn was leading to
racing threads calling dump_recent() and garbling the crash dump output.

Backport: bobtail, argonaut
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agoMerge branch 'master' of https://github.com/ceph/ceph
John Wilkins [Wed, 2 Jan 2013 23:59:59 +0000 (15:59 -0800)]
Merge branch 'master' of https://github.com/ceph/ceph

12 years agodoc: Added a memory profiling section. Ported from the wiki.
John Wilkins [Wed, 2 Jan 2013 23:58:03 +0000 (15:58 -0800)]
doc: Added a memory profiling section. Ported from the wiki.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added memory profiling to the index.
John Wilkins [Wed, 2 Jan 2013 23:57:22 +0000 (15:57 -0800)]
doc: Added memory profiling to the index.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoqa/workunit: Update pjd script to use new tarball
Sam Lang [Wed, 2 Jan 2013 20:39:12 +0000 (14:39 -0600)]
qa/workunit:  Update pjd script to use new tarball

The pjd script now uses the latest version of pjd
with an additional test for opening a non-existent
file.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agofuse: Fix cleanup code path on init failure
Sam Lang [Wed, 2 Jan 2013 22:07:13 +0000 (16:07 -0600)]
fuse: Fix cleanup code path on init failure

With the changes from 856f32ab, the cfuse.init call returns
a _positive_ errno, which was getting ignored.  Also, if an
error occurs during cfuse.init(), we need to teardown the client
mount.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agolibrbd: establish watch before reading header
Josh Durgin [Wed, 2 Jan 2013 22:15:24 +0000 (14:15 -0800)]
librbd: establish watch before reading header

This eliminates a window in which a race could occur when we have an
image open but no watch established. The previous fix (using
assert_version) did not work well with resend operations.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge branch 'wip-journal-aio' into next
Sage Weil [Wed, 2 Jan 2013 21:42:22 +0000 (13:42 -0800)]
Merge branch 'wip-journal-aio' into next

Reviewed-by: Samuel Just <sam.just@inktank.com>
Backport: bobtail

12 years agotest_filejournal: optionally specify journal filename as an argument
Sage Weil [Sat, 29 Dec 2012 00:48:22 +0000 (16:48 -0800)]
test_filejournal: optionally specify journal filename as an argument

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agotest_filejournal: test journaling bl with >IOV_MAX segments
Sage Weil [Sat, 29 Dec 2012 00:48:05 +0000 (16:48 -0800)]
test_filejournal: test journaling bl with >IOV_MAX segments

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoos/FileJournal: limit size of aio submission
Sage Weil [Sat, 29 Dec 2012 00:47:28 +0000 (16:47 -0800)]
os/FileJournal: limit size of aio submission

Limit size of each aio submission to IOV_MAX-1 (to be safe).  Take care to
only mark the last aio with the seq to signal completion.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoRevert "librbd: ensure header is up to date after initial read"
Josh Durgin [Wed, 2 Jan 2013 20:32:33 +0000 (12:32 -0800)]
Revert "librbd: ensure header is up to date after initial read"

Using assert version for linger ops doesn't work with retries,
since the version will change after the first send.
This reverts commit e1776809031c6dad441cfb2b9fac9612720b9083.

Conflicts:

qa/workunits/rbd/watch_correct_version.sh

12 years agodoc: Minor edits.
John Wilkins [Wed, 2 Jan 2013 19:24:39 +0000 (11:24 -0800)]
doc: Minor edits.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Fixed typo, clarified usage.
John Wilkins [Wed, 2 Jan 2013 19:15:16 +0000 (11:15 -0800)]
doc: Fixed typo, clarified usage.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-bobtail-docs'
Sage Weil [Tue, 1 Jan 2013 18:36:57 +0000 (10:36 -0800)]
Merge remote-tracking branch 'gh/wip-bobtail-docs'

12 years agoMerge branch 'master' of https://github.com/ceph/ceph
Gary Lowell [Tue, 1 Jan 2013 05:35:03 +0000 (21:35 -0800)]
Merge branch 'master' of https://github.com/ceph/ceph

12 years agoMerge branch 'next'
Gary Lowell [Tue, 1 Jan 2013 05:31:17 +0000 (21:31 -0800)]
Merge branch 'next'

12 years agoMerge branch 'next'
Sage Weil [Tue, 1 Jan 2013 02:37:12 +0000 (18:37 -0800)]
Merge branch 'next'

12 years agoMerge remote-tracking branch 'gh/wip-3675'
Sage Weil [Tue, 1 Jan 2013 02:36:39 +0000 (18:36 -0800)]
Merge remote-tracking branch 'gh/wip-3675'

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agov0.56 v0.56
Gary Lowell [Tue, 1 Jan 2013 01:10:11 +0000 (17:10 -0800)]
v0.56

12 years agoclient: fix _create created ino condition
Sage Weil [Mon, 31 Dec 2012 23:28:25 +0000 (15:28 -0800)]
client: fix _create created ino condition

We get 8 bytes back for the created ino.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibcephfs: choose more unique nonce
Sage Weil [Mon, 31 Dec 2012 23:22:23 +0000 (15:22 -0800)]
libcephfs: choose more unique nonce

We were using a per-process counter combined with the pid.  A short
running process can easily loop through and reuse the same pid later.
Instead, go for 48 bits of randomness and the pid.  This way if we get
a dup pid we'll only get a dup nonce once out of 2^48 tries.

Avoids #3630 when running a libcephfs test in a loop (so that the pid
is eventually reused).  This is a better fix than the broken
8b599083705c2495810c00f9f5fd5bb8ace7f32e.  The real solution on the MDS
side involves cleaning up the msgr/MDS interaction with session
shutdown.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: fix _create
Sage Weil [Mon, 31 Dec 2012 23:23:29 +0000 (15:23 -0800)]
client: fix _create

make_request() clear out req->reply and frees req; we can't inspect
it here.

Instead, just assume that extra_bl is the create flag/ino if it is
present.  Old code does not include an extra_bl on CREATE, and new code
will have the same first bytes for compatibility.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-3625'
Sage Weil [Mon, 31 Dec 2012 18:16:31 +0000 (10:16 -0800)]
Merge remote-tracking branch 'gh/wip-3625'

12 years agoMerge remote-tracking branch 'gh/wip-rbd-unprotect' into next
Sage Weil [Sun, 30 Dec 2012 23:29:37 +0000 (15:29 -0800)]
Merge remote-tracking branch 'gh/wip-rbd-unprotect' into next

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agodoc: add-or-rm-mons.rst: Add 'Changing Monitor's IPs' section
Joao Eduardo Luis [Thu, 20 Dec 2012 18:25:14 +0000 (18:25 +0000)]
doc: add-or-rm-mons.rst: Add 'Changing Monitor's IPs' section

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: add-or-rm-mons.rst: Clarify what the monitor name/id is.
Joao Eduardo Luis [Wed, 19 Dec 2012 16:48:37 +0000 (16:48 +0000)]
doc: add-or-rm-mons.rst: Clarify what the monitor name/id is.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agodoc: fix rbd permissions for unprotect
Josh Durgin [Sun, 30 Dec 2012 07:57:01 +0000 (23:57 -0800)]
doc: fix rbd permissions for unprotect

Unprotect examines all pools, so use blanket x before 0.54. After
that, use class-read restricted by object_prefix to rbd_children.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: fix race between unprotect and clone
Josh Durgin [Sun, 30 Dec 2012 04:35:15 +0000 (20:35 -0800)]
librbd: fix race between unprotect and clone

Clone needs to actually re-read the header to make sure the image is
still protected before returning. Additionally, it needs to consider
the image protected *only* if the protection status is protected -
unprotecting does not count. I thought I'd already fixed this, but
can't find the commit.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: open (source) image as read-only
Josh Durgin [Sun, 30 Dec 2012 04:26:57 +0000 (20:26 -0800)]
rbd: open (source) image as read-only

This allows users without write access to copy, export and list
information about an image.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: open parent as read-only during clone
Josh Durgin [Sat, 29 Dec 2012 06:13:37 +0000 (22:13 -0800)]
librbd: open parent as read-only during clone

We never write to the parent, and don't need to watch it during this process.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: add {rbd_}open_read_only()
Josh Durgin [Sat, 29 Dec 2012 00:54:51 +0000 (16:54 -0800)]
librbd: add {rbd_}open_read_only()

Since 58890cfad5f7bee933baa599a68e6c65993379d4, regular {rbd_}open()
would fail with -EPERM if the user did not have write access to the
pool, since a watch on the header was requested.

For many uses of read-only access, establishing a watch is not
necessary, since changes to the header do not matter. For example,
getting metadata about an image via 'rbd info' does not care if a new
snapshot is created while it is in progress.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoOSD: remove RD flag from CALL ops
Josh Durgin [Sat, 29 Dec 2012 03:47:09 +0000 (19:47 -0800)]
OSD: remove RD flag from CALL ops

20496b8d2b2c3779a771695c6f778abbdb66d92a forgot to do this. Without
this change, all class methods required regular read permission in
addition to class-read or class-write.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agocls_rbd: get_children does not need write permission
Josh Durgin [Sat, 29 Dec 2012 03:44:36 +0000 (19:44 -0800)]
cls_rbd: get_children does not need write permission

This prevented a read-only user from being able to unprotect a
snapshot without write permission on all pools. This was masked before
by the CLS_METHOD_PUBLIC flag.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agodoc/release-notes: link to upgrade doc
Sage Weil [Sun, 30 Dec 2012 04:46:36 +0000 (20:46 -0800)]
doc/release-notes: link to upgrade doc

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc/install/upgrading: edits to upgrade document
Sage Weil [Sun, 30 Dec 2012 03:54:24 +0000 (19:54 -0800)]
doc/install/upgrading: edits to upgrade document

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoRevert "mds: replace closed sessions on connect"
Sage Weil [Sat, 29 Dec 2012 16:38:52 +0000 (08:38 -0800)]
Revert "mds: replace closed sessions on connect"

This reverts commit 8b599083705c2495810c00f9f5fd5bb8ace7f32e.

This fix is not correct.  See #3696.

12 years agomsg/Pipe: use state_closed atomic_t for _lookup_pipe
Sage Weil [Sat, 29 Dec 2012 01:20:43 +0000 (17:20 -0800)]
msg/Pipe: use state_closed atomic_t for _lookup_pipe

We shouldn't look at Pipe::state in SimpleMessenger::_lookup_pipe() without
holding pipe_lock.  Instead, use an atomic that we set to non-zero only
when transitioning to the terminal STATE_CLOSED state.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsgr: inject delays at inconvenient times
Sage Weil [Sun, 23 Dec 2012 21:43:15 +0000 (13:43 -0800)]
msgr: inject delays at inconvenient times

Exercise some rare races by injecting delays before taking locks
via the 'ms inject internal delays' option.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsgr: fix race on Pipe removal from hash
Sage Weil [Sun, 23 Dec 2012 17:22:18 +0000 (09:22 -0800)]
msgr: fix race on Pipe removal from hash

When a pipe is faulting and shutting down, we have to drop pipe_lock to
take msgr lock and then remove the entry.  The Pipe in this case will
have STATE_CLOSED.  Handle this case in all places we do a lookup on
the rank_pipe hash so that we effectively ignore entries that are
CLOSED.

This fixes a race introduced by the previous commit where we won't use
the CLOSED pipe and try to register a new one, but the old one is still
registered.

See bug #3675.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsgr: don't queue message on closed pipe
Sage Weil [Sun, 23 Dec 2012 17:19:05 +0000 (09:19 -0800)]
msgr: don't queue message on closed pipe

If we have a con that refs a pipe but it is closed, don't use it.  If
the ref is still there, it is only because we are racing with fault()
and it is about to (or just was) be detached.  Either way,

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsgr: atomically queue first message with connect_rank
Sage Weil [Sun, 23 Dec 2012 05:24:52 +0000 (21:24 -0800)]
msgr: atomically queue first message with connect_rank

Atomically queue the first message on the new pipe, without dropping
and retaking pipe_lock.

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