]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
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>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Sat, 29 Dec 2012 01:19:46 +0000 (17:19 -0800)]
Merge remote-tracking branch 'gh/next'

12 years agotest: mon: workloadgen: debug when message fsid != monmap fsid
Joao Eduardo Luis [Wed, 19 Dec 2012 01:37:47 +0000 (01:37 +0000)]
test: mon: workloadgen: debug when message fsid != monmap fsid

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agotest: mon: workloadgen: assert if monmap's fsid is zero after authenticate
Joao Eduardo Luis [Tue, 18 Dec 2012 15:34:12 +0000 (15:34 +0000)]
test: mon: workloadgen: assert if monmap's fsid is zero after authenticate

Fixes: #3629
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agodoc: update Hadoop documentation
Noah Watkins [Mon, 24 Dec 2012 00:01:42 +0000 (16:01 -0800)]
doc: update Hadoop documentation

Updates configuration option names, and adds object.size,
localize.reads, and root.dir control options.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoinit-ceph: ok, 8K files
Sage Weil [Sat, 29 Dec 2012 01:12:06 +0000 (17:12 -0800)]
init-ceph: ok, 8K files

16K might be a bit many.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsg/Pipe: remove broken cephs signing requirement check
Sage Weil [Fri, 28 Dec 2012 00:01:49 +0000 (16:01 -0800)]
msg/Pipe: remove broken cephs signing requirement check

Remove the special-case check, which does not inform the peer what
protocol features are missing.  It also enforces this requirement even
when we negotiate auth none.

Reported as part of bug #3657.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsg/Pipe: include remote socket addr in debug output
Sage Weil [Sat, 29 Dec 2012 00:00:47 +0000 (16:00 -0800)]
msg/Pipe: include remote socket addr in debug output

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: Added a new upgrade document.
John Wilkins [Fri, 28 Dec 2012 23:55:46 +0000 (15:55 -0800)]
doc: Added a new upgrade document.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Minor edit.
John Wilkins [Fri, 28 Dec 2012 23:55:22 +0000 (15:55 -0800)]
doc: Minor edit.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added upgrade link to index.
John Wilkins [Fri, 28 Dec 2012 23:54:57 +0000 (15:54 -0800)]
doc: Added upgrade link to index.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoos/FileJournal: logger is optional
Sage Weil [Fri, 28 Dec 2012 23:44:51 +0000 (15:44 -0800)]
os/FileJournal: logger is optional

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: fix fh leak in non-create case
Sage Weil [Fri, 28 Dec 2012 23:14:25 +0000 (15:14 -0800)]
client: fix fh leak in non-create case

We may take the O_CREAT path and get an fh from _create, but created can
still be false.  In that case, skip the final _open call.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomds: Return created inode in mds reply to create
Sam Lang [Wed, 19 Dec 2012 20:17:29 +0000 (10:17 -1000)]
mds: Return created inode in mds reply to create

If multiple clients race to create a file, multiple clients will send a
create request and get back a valid dentry+inode, but only one client
will actually win the race to create the file.  All other clients should
treat the reply as an open of an existing file and check permissions.
This patch adds the created inode number to the mds create reply if that
request actually created the inode/file (and the feature is supported),
so the client can properly check permissions if the inode number isn't
returned.  Fixes #3625.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Make ll_create use _create
Sam Lang [Mon, 17 Dec 2012 19:54:23 +0000 (09:54 -1000)]
client: Make ll_create use _create

This is a fix for bug #3625, where multiple clients race to create a
file, and the loser returns EEXIST instead of a valid file handle.
The patch modifies ll_create in the Client class to use _create(),
which sends the request to the MDS (where an atomic create/open is
performed).

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agolog: broadcast cond signals
Sage Weil [Fri, 28 Dec 2012 21:07:18 +0000 (13:07 -0800)]
log: broadcast cond signals

We were using a single cond, and only signalling one waiter.  That means
that if the flusher and several logging threads are waiting, and we hit
a limit, we the logger could signal another logger instead of the flusher,
and we could deadlock.

Similarly, if the flusher empties the queue, it might signal only a single
logger, and that logger could re-signal the flusher, and the other logger
could wait forever.

Intead, break the single cond into two: one for loggers, and one for the
flusher.  Always signal the (one) flusher, and always broadcast to all
loggers.

Backport: bobtail, argonaut
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agoosd: allow RecoveryDone self-transition in RepNotRecovering
Sage Weil [Fri, 28 Dec 2012 19:34:47 +0000 (11:34 -0800)]
osd: allow RecoveryDone self-transition in RepNotRecovering

In a mixed cluster where some OSDs support the recovery reservations and
some don't, the replica may be new code in RepNotRecoverying and will
complete a backfill.  In that case, we want to just stayin
RepNotRecovering.

It may also be possible to make it infer what the primary is doing even
thought it is not sending recovery reservation messages, but this is much
more complicated and doesn't accomplish much.

Fixes: #3689
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'origin/wip-gl-docs'
Gary Lowell [Fri, 28 Dec 2012 22:15:37 +0000 (14:15 -0800)]
Merge remote-tracking branch 'origin/wip-gl-docs'

Update release process documentation.

12 years agodocs: fix typo in release-process doc
Gary Lowell [Fri, 28 Dec 2012 22:05:56 +0000 (14:05 -0800)]
docs:  fix typo in release-process doc

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
12 years agodoc/release-notes: document new 'max open files' default
Sage Weil [Fri, 28 Dec 2012 21:47:08 +0000 (13:47 -0800)]
doc/release-notes: document new 'max open files' default

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: less noise about inefficient tmap updates
Sage Weil [Fri, 28 Dec 2012 20:34:15 +0000 (12:34 -0800)]
osd: less noise about inefficient tmap updates

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoinit-ceph: default to 16K max_open_files
Sage Weil [Fri, 28 Dec 2012 20:11:55 +0000 (12:11 -0800)]
init-ceph: default to 16K max_open_files

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-fuse: Avoid doing handle cleanup in dtor
Sam Lang [Fri, 28 Dec 2012 19:58:39 +0000 (13:58 -0600)]
ceph-fuse: Avoid doing handle cleanup in dtor

The CephFuse::Handle class needs the client
pointer to be valid for finalizing, so don't finalize
in the destructor (which doesn't get called till the
fuse handle leaves scope), instead use a finalize method that
gets called explicitly before the client pointer is freed.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoceph-fuse: Pass client handle as userdata
Sam Lang [Fri, 28 Dec 2012 19:10:04 +0000 (13:10 -0600)]
ceph-fuse:  Pass client handle as userdata

The fuse lowlevel API isn't getting the client
handle when when it gets initialized, resulting
in a null pointer for all the subsequent calls.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agorelease-notes: rgw logging now off by default
Sage Weil [Fri, 28 Dec 2012 06:08:05 +0000 (22:08 -0800)]
release-notes: rgw logging now off by default

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: warn about using caching without QEMU knowing
Josh Durgin [Wed, 26 Dec 2012 22:25:51 +0000 (14:25 -0800)]
doc: warn about using caching without QEMU knowing

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorgw: disable ops and usage logging by default
Sage Weil [Thu, 27 Dec 2012 21:27:46 +0000 (13:27 -0800)]
rgw: disable ops and usage logging by default

Most users don't need this, and having it on will just fill their clusters
with objects that will need to be cleaned up later.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agofeatures is uint64_t
Sage Weil [Fri, 28 Dec 2012 00:38:45 +0000 (16:38 -0800)]
features is uint64_t

This won't bite us for a while yet (we're on bit 26), but it will soon!

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Fri, 28 Dec 2012 01:15:29 +0000 (17:15 -0800)]
Merge remote-tracking branch 'gh/next'

12 years agoceph-fuse: Split main into init/main/finalize
Sam Lang [Thu, 6 Dec 2012 05:21:12 +0000 (23:21 -0600)]
ceph-fuse:  Split main into init/main/finalize

With the invalidate callback enabled for fuse, the Client::unmount
call requires the fuse channel and session objects remain for performing
the invalidate callbacks.  This patch splits the ceph_fuse_ll_main
call into init, main, and finalize functions, so finalization of the
channel and session objects can be done after the unmount completes.

The patch includes cleanup for the code in fuse_ll.cc to make it more
in the style of C++ and make use of the pimpl idiom to hide the fuse
structures within the CephFuse::Handle pimpl class.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agojava: remove deprecated libcephfs
Noah Watkins [Thu, 27 Dec 2012 20:06:02 +0000 (12:06 -0800)]
java: remove deprecated libcephfs

Removes ceph_set_default_*

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>