]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agomon: OSDMonitor: add 'osd pool stats' command 596/head
Joao Eduardo Luis [Wed, 2 Oct 2013 01:06:42 +0000 (02:06 +0100)]
mon: OSDMonitor: add 'osd pool stats' command

Fixes: #6147
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: PGMap: rework client IO rate calc and output
Joao Eduardo Luis [Thu, 3 Oct 2013 00:09:16 +0000 (01:09 +0100)]
mon: PGMap: rework client IO rate calc and output

Create a function so we can use the same format when outputting per-pool
stats

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: PGMap: reuse existing summary functions to output pool stats
Joao Eduardo Luis [Thu, 3 Oct 2013 00:08:07 +0000 (01:08 +0100)]
mon: PGMap: reuse existing summary functions to output pool stats

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: PGMap: keep track of per-pool stats deltas
Joao Eduardo Luis [Mon, 14 Oct 2013 23:51:30 +0000 (00:51 +0100)]
mon: PGMap: keep track of per-pool stats deltas

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agorgw: swift update obj metadata also add generic attrs
Yehuda Sadeh [Fri, 4 Oct 2013 20:00:26 +0000 (13:00 -0700)]
rgw: swift update obj metadata also add generic attrs

Fixes: #6462
We were missing the generic attributes when we updated the object
metadata (operation that only exists in the swift api).

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoMerge branch 'wip-6444' into next
Yehuda Sadeh [Fri, 11 Oct 2013 22:44:00 +0000 (15:44 -0700)]
Merge branch 'wip-6444' into next

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agolibrados: add some clarifying comments
Yehuda Sadeh [Fri, 11 Oct 2013 21:52:13 +0000 (14:52 -0700)]
librados: add some clarifying comments

about async pool operation handle

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agolibrados: drop reference to completion in container destructor
Yehuda Sadeh [Thu, 3 Oct 2013 18:49:33 +0000 (11:49 -0700)]
librados: drop reference to completion in container destructor

Move the PoolAsyncCompletionImpl reference drop from
C_PoolAsync_Safe::finish() to ~C_PoolAsyncSafe(), as finish() is only
called when the async request is actually sent.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoGo back to $PWD in fsstress.sh if compiling from source.
Sandon Van Ness [Tue, 8 Oct 2013 18:58:57 +0000 (11:58 -0700)]
Go back to $PWD in fsstress.sh if compiling from source.

Although fsstress was being called with a static path the directory
it was writing to was in the current directory so doing a cd to the
source directory that is made in /tmp and then removing it later
caused it to be unable to write the files in a non-existent dir.

This change gets the current path first and cd's back into it after
it is done compiling fsstress.

Issue #6479.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
Reviewed-by: Alfredo Deza <alfredo.deza@inktank.com>
11 years agoReplicatedPG: copy: use aggregate return code instead of individual Op return
Greg Farnum [Mon, 7 Oct 2013 20:11:21 +0000 (13:11 -0700)]
ReplicatedPG: copy: use aggregate return code instead of individual Op return

It appears that the OSD is not filling in the individual return codes, and they
should be equivalent for all purposes we care about here (the only Op we are
doing is the copy-get, and if it fails we are getting its failure code).

Reported-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoos/FileStore: fix ENOENT error code for getattrs()
Sage Weil [Mon, 7 Oct 2013 12:22:20 +0000 (05:22 -0700)]
os/FileStore: fix ENOENT error code for getattrs()

In commit dc0dfb9e01d593afdd430ca776cf4da2c2240a20 the omap xattrs code
moved up a block and r was no longer local to the block.  Translate
ENOENT -> 0 to compensate.

Fix the same error in _rmattrs().

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #695 from ceph/wip-mon-auth
João Eduardo Luís [Mon, 7 Oct 2013 11:31:36 +0000 (04:31 -0700)]
Merge pull request #695 from ceph/wip-mon-auth

fix mon double-free when dropping unhandled messages, and allow "get monmap" messages to go through without authenticating for MonCliente::get_monmap_privately()

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: allow MMonGetMap without authentication 695/head
Sage Weil [Sun, 6 Oct 2013 22:17:19 +0000 (15:17 -0700)]
mon: allow MMonGetMap without authentication

This is used by the MonClient::get_monmap_privately() helper.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomon: do not put() unhandle message
Sage Weil [Sun, 6 Oct 2013 22:12:57 +0000 (15:12 -0700)]
mon: do not put() unhandle message

If we return false because we aren't handling a message, we should not put
the ref.  This fixes a double-free.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomon/PGMap: make generated test instances obey new invariant
Sage Weil [Sat, 5 Oct 2013 05:06:04 +0000 (22:06 -0700)]
mon/PGMap: make generated test instances obey new invariant

As of 091809b8149c7595cbcca439c5b8b75a0c42efe1 we keep an osd_map epoch
for any osd_stat update, and assert as much.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge branch 'next'
Gary Lowell [Sat, 5 Oct 2013 02:11:36 +0000 (02:11 +0000)]
Merge branch 'next'

11 years agodoc/release-notes: v0.67.4
Sage Weil [Fri, 4 Oct 2013 23:49:41 +0000 (16:49 -0700)]
doc/release-notes: v0.67.4

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #676 from ceph/wip-start-copy
Gregory Farnum [Fri, 4 Oct 2013 22:58:50 +0000 (15:58 -0700)]
Merge pull request #676 from ceph/wip-start-copy

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #667 from ceph/wip-6143
David Zafman [Fri, 4 Oct 2013 21:59:11 +0000 (14:59 -0700)]
Merge pull request #667 from ceph/wip-6143

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agocommon, os: Perform xattr handling based on detected fs type 667/head
David Zafman [Mon, 30 Sep 2013 22:53:35 +0000 (15:53 -0700)]
common, os: Perform xattr handling based on detected fs type

In FileStore::_detect_fs() store discovered filesystem type in m_fs_type
Add per-filesystem filestore_max_inline_xattr_size_* variants
Add per-filesystem filestore_max_inline_xattrs_* variants
New function set_xattr_limits_via_conf()
  Set m_filestore_max_inline_xattr_size based on override or fs type
  Set m_filestore_max_inline_xattrs based on override or fs type
Handle conf change of any relevant value by calling set_xattr_limits_via_conf()
Change filestore_max_inline_xattr_size to override if non-zero
Change filestore_max_inline_xattrs to override if non-zero

Fixes: #6143
Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoMerge pull request #692 from ceph/wip-5992-2
athanatos [Fri, 4 Oct 2013 21:04:41 +0000 (14:04 -0700)]
Merge pull request #692 from ceph/wip-5992-2

Wip 5992 2

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoReplicatedPG: lock snapdir obc during write 692/head
Samuel Just [Thu, 3 Oct 2013 01:00:04 +0000 (18:00 -0700)]
ReplicatedPG: lock snapdir obc during write

Otherwise, we won't block properly in prep_push_backfill_object.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoPGLog: on split, leave log head alone
Samuel Just [Mon, 30 Sep 2013 22:54:27 +0000 (15:54 -0700)]
PGLog: on split, leave log head alone

This way last_update doesn't go backwards.

Fixes: 6447
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoFileStore: make _setattrs not return -ENOENT most of the time
Samuel Just [Fri, 27 Sep 2013 22:31:56 +0000 (15:31 -0700)]
FileStore: make _setattrs not return -ENOENT most of the time

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG: add debugging in recover_replicas for objects added for backfill
Samuel Just [Fri, 20 Sep 2013 18:26:49 +0000 (11:26 -0700)]
ReplicatedPG: add debugging in recover_replicas for objects added for backfill

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG,PG: use PGBackend methods for getattr
Samuel Just [Tue, 17 Sep 2013 17:35:47 +0000 (10:35 -0700)]
ReplicatedPG,PG: use PGBackend methods for getattr

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG,PG: adapt collection_list* users to PGBackend interface
Samuel Just [Tue, 17 Sep 2013 17:12:11 +0000 (10:12 -0700)]
ReplicatedPG,PG: adapt collection_list* users to PGBackend interface

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoPG,ReplicatedPG: expose PGBackend to PG
Samuel Just [Tue, 17 Sep 2013 17:33:49 +0000 (10:33 -0700)]
PG,ReplicatedPG: expose PGBackend to PG

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoPG.cc: remove leading empty space
Samuel Just [Tue, 17 Sep 2013 17:18:57 +0000 (10:18 -0700)]
PG.cc: remove leading empty space

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoPGBackend,ReplicatedBackend: add interfaces for scanning the pg
Samuel Just [Tue, 17 Sep 2013 17:11:54 +0000 (10:11 -0700)]
PGBackend,ReplicatedBackend: add interfaces for scanning the pg

This will be important since the erasure coded pg will have a different
on-disk format than the replicated backend.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG: don't rescan the local collection if we can avoid it
Samuel Just [Tue, 17 Sep 2013 15:26:51 +0000 (08:26 -0700)]
ReplicatedPG: don't rescan the local collection if we can avoid it

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agocommon/hobject: add is_degenerate method
Samuel Just [Thu, 26 Sep 2013 19:31:35 +0000 (12:31 -0700)]
common/hobject: add is_degenerate method

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoPGMap: calc_min_last_epoch_clean() will now also use osd_epochs
Samuel Just [Sat, 10 Aug 2013 00:59:25 +0000 (17:59 -0700)]
PGMap: calc_min_last_epoch_clean() will now also use osd_epochs

We don't want to trim past the current osd map for any up osd.
osd_epochs provides a lower bound for that epoch for each osd.

Fixes: 5869
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoPGMap,PGMonitor: maintain mapping of osd to recent stat epoch
Samuel Just [Fri, 4 Oct 2013 19:29:26 +0000 (12:29 -0700)]
PGMap,PGMonitor: maintain mapping of osd to recent stat epoch

Also, osd_stat will be empty for out osd.

When an osd is marked out, rather than remove it from osd_stat,
we instead 0 out the structure.

This patch also makes osd_stat_updates and osd_stat_rm private.
This should make it simpler to enforce invariants on these
mappings.

Each up osd will have a mapping since out osds are now included as
empty stats.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agov0.70 mark-v0.70-wip v0.70
Gary Lowell [Fri, 4 Oct 2013 20:12:24 +0000 (20:12 +0000)]
v0.70

11 years agoMerge pull request #690 from ceph/wip-fuse
Sage Weil [Fri, 4 Oct 2013 20:05:46 +0000 (13:05 -0700)]
Merge pull request #690 from ceph/wip-fuse

a few ceph-fuse fixes

Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agoReplicatedPG: copy: add op progression output 676/head
Greg Farnum [Fri, 4 Oct 2013 17:50:29 +0000 (10:50 -0700)]
ReplicatedPG: copy: add op progression output

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoReplicatedPG: copy: don't leak a ctx on failed copy ops
Greg Farnum [Fri, 4 Oct 2013 16:47:54 +0000 (09:47 -0700)]
ReplicatedPG: copy: don't leak a ctx on failed copy ops

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoReplicatedPG: assert that we have succeeded in do_osd_ops on copyfrom repeats
Greg Farnum [Fri, 4 Oct 2013 16:26:02 +0000 (09:26 -0700)]
ReplicatedPG: assert that we have succeeded in do_osd_ops on copyfrom repeats

Our callback is handling errors on its own at this point.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoReplicatedPG: copy: switch CopyCallback to use a GenContext
Greg Farnum [Fri, 4 Oct 2013 16:10:20 +0000 (09:10 -0700)]
ReplicatedPG: copy: switch CopyCallback to use a GenContext

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agocommon,os: Remove filestore_xattr_use_omap option
David Zafman [Fri, 27 Sep 2013 23:23:09 +0000 (16:23 -0700)]
common,os: Remove filestore_xattr_use_omap option

Now we operate just like when this was set to true

Fixes: #6143
Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoMerge pull request #689 from ceph/wip-6254-model
athanatos [Fri, 4 Oct 2013 16:43:20 +0000 (09:43 -0700)]
Merge pull request #689 from ceph/wip-6254-model

ceph_test_rados: notice read error; do not race rollback with snap_delete

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #688 from ceph/wip-6474
athanatos [Fri, 4 Oct 2013 16:43:00 +0000 (09:43 -0700)]
Merge pull request #688 from ceph/wip-6474

osd/ReplicatedPG: fix null deref on rollback_to whiteout check

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoceph_test_rados: do not let rollback race with snap delete 689/head
Sage Weil [Fri, 4 Oct 2013 04:47:26 +0000 (21:47 -0700)]
ceph_test_rados: do not let rollback race with snap delete

Note that the OSD behaves in a weird way when you rollback to a non-
existent snap, so the test probably isn't the only party at fault here.

Fixes (test half of): #6254
Backport: dumpling, cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados: stop on read error!
Sage Weil [Fri, 4 Oct 2013 04:44:06 +0000 (21:44 -0700)]
ceph_test_rados: stop on read error!

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: fix null deref on rollback_to whiteout check 688/head
Sage Weil [Fri, 4 Oct 2013 04:27:36 +0000 (21:27 -0700)]
osd/ReplicatedPG: fix null deref on rollback_to whiteout check

Bring this whole if/else chain up one level so that we can capture both
ENOENT and whiteout in the same case.  (And don't dereference the
pointer when we know it is NULL.)

Fixes: #6474
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Fri, 4 Oct 2013 04:23:05 +0000 (21:23 -0700)]
Merge remote-tracking branch 'gh/next'

Conflicts:
src/Makefile.am

11 years agoPendingReleaseNotes: fix typo
Josh Durgin [Fri, 4 Oct 2013 03:07:13 +0000 (20:07 -0700)]
PendingReleaseNotes: fix typo

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #557 from ceph/wip-5896
Sage Weil [Fri, 4 Oct 2013 01:27:58 +0000 (18:27 -0700)]
Merge pull request #557 from ceph/wip-5896

mon: MonmapMonitor: make 'ceph mon add' idempotent

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoPendingReleaseNotes: make a note about K vs k
Sage Weil [Fri, 4 Oct 2013 00:05:41 +0000 (17:05 -0700)]
PendingReleaseNotes: make a note about K vs k

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #686 from ceph/wip-rbd-cli-tests
Sage Weil [Fri, 4 Oct 2013 00:03:13 +0000 (17:03 -0700)]
Merge pull request #686 from ceph/wip-rbd-cli-tests

qa: fix rbd cli tests checking size

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoqa: fix rbd cli tests checking size 686/head
Josh Durgin [Thu, 3 Oct 2013 22:16:09 +0000 (15:16 -0700)]
qa: fix rbd cli tests checking size

b43bc1a0b0692818d789f9f489b9aba5dd40522f changed the kilo prefix
from K to k in a few places.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #684 from git-harry/ceph_disk_lowercase_fsid
Sage Weil [Thu, 3 Oct 2013 21:50:25 +0000 (14:50 -0700)]
Merge pull request #684 from git-harry/ceph_disk_lowercase_fsid

Make fsid comparison case-insensitive

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agodoc: Fixed typo.
John Wilkins [Thu, 3 Oct 2013 20:30:18 +0000 (13:30 -0700)]
doc: Fixed typo.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agoMerge pull request #685 from ceph/wip-rados-ints
Dan Mick [Thu, 3 Oct 2013 19:19:50 +0000 (12:19 -0700)]
Merge pull request #685 from ceph/wip-rados-ints

librados: drop #include of int_types.h from installed headers

Reviewed-by: Dan Mick <dan.mick@inktank.com>
11 years agolibrados: drop #include of int_types.h from installed headers 685/head
Sage Weil [Thu, 3 Oct 2013 19:16:55 +0000 (12:16 -0700)]
librados: drop #include of int_types.h from installed headers

These are unnecessary, and breaks compilation for outside users.

Prefer inttypes.h over stdint.h.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #638 from ceph/wip-bloom
Loic Dachary [Thu, 3 Oct 2013 19:13:41 +0000 (12:13 -0700)]
Merge pull request #638 from ceph/wip-bloom

bloom filter cleanups, encodability, and unit tests

11 years agoMerge pull request #653 from ceph/wip-mon-auth
Sage Weil [Thu, 3 Oct 2013 18:32:50 +0000 (11:32 -0700)]
Merge pull request #653 from ceph/wip-mon-auth

mon: Monitor: dissociate msg handling from session and connection logic

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomon: Monitor: reuse 'src_is_mon' bool on dispatch 653/head
Joao Eduardo Luis [Wed, 2 Oct 2013 00:59:11 +0000 (01:59 +0100)]
mon: Monitor: reuse 'src_is_mon' bool on dispatch

Instead of making the same comparison twice with no gain at all.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: Monitor: only handle paxos msgs from a mon && if session has exec caps
Joao Eduardo Luis [Mon, 23 Sep 2013 10:34:05 +0000 (11:34 +0100)]
mon: Monitor: only handle paxos msgs from a mon && if session has exec caps

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: Monitor: dissociate msg handling from session & connection logic
Joao Eduardo Luis [Wed, 2 Oct 2013 00:56:55 +0000 (01:56 +0100)]
mon: Monitor: dissociate msg handling from session & connection logic

Makes for simpler logic for patches to come.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: Monitor: drop client msg if no session exists and msg is not MAuth
Joao Eduardo Luis [Wed, 2 Oct 2013 00:54:09 +0000 (01:54 +0100)]
mon: Monitor: drop client msg if no session exists and msg is not MAuth

If we are not a monitor and we don't have a session yet, we must first
authenticate with the cluster.  Therefore, the first message to the
monitor must be an MAuth.  If not, we assume it's a stray message and
just drop it.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: Monitor: assert on absense of connection during dispatch
Joao Eduardo Luis [Wed, 2 Oct 2013 00:50:29 +0000 (01:50 +0100)]
mon: Monitor: assert on absense of connection during dispatch

We expect to always have a connection associated with a message.
If that happens to not be so, assert.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: MonmapMonitor: make 'ceph mon add' idempotent 557/head
Joao Eduardo Luis [Thu, 3 Oct 2013 18:07:12 +0000 (19:07 +0100)]
mon: MonmapMonitor: make 'ceph mon add' idempotent

MonMap changes lead to bootstraps.  Callbacks waiting for a proposal to
finish can have several fates, depending on what happens: finished, rerun
or aborted.

In the case of a bootstrap right after a monmap change, callbacks are
rerun.  Considering we queued the message that lead to the monmap change
on this queue, if we instead of finishing it end up reruning it, we will
end up trying to perform the same modification twice -- the last one will
try to modify an already existing state and we will return just that:
whatever you're attempting to do has already been done.

This patch makes 'ceph mon add' completely idempotent.  If one tries to
add an already existing monitor (i.e., same name, same ip:port), one
simply gets a 'monitor foo added', with return 0, no matter how many
times one runs the command.

Fixes: #5896
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agocommon/bloom_filter: note that uint32_t interface requires well-mixed values 638/head
Sage Weil [Thu, 3 Oct 2013 16:20:34 +0000 (09:20 -0700)]
common/bloom_filter: note that uint32_t interface requires well-mixed values

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: speed up unit tests a bit
Sage Weil [Thu, 3 Oct 2013 16:14:34 +0000 (09:14 -0700)]
common/bloom_filter: speed up unit tests a bit

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: test binning fpp behavior
Sage Weil [Thu, 26 Sep 2013 00:43:40 +0000 (17:43 -0700)]
common/bloom_filter: test binning fpp behavior

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: disable sequential tests
Sage Weil [Wed, 25 Sep 2013 21:20:21 +0000 (14:20 -0700)]
common/bloom_filter: disable sequential tests

These are slow and are not useful.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: insert/contains methods for uint32_t
Sage Weil [Fri, 20 Sep 2013 03:02:50 +0000 (20:02 -0700)]
common/bloom_filter: insert/contains methods for uint32_t

This will let us pass in an hobject_t::hash directly (for example) without
rehashing a string.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMake fsid comparison case-insensitive 684/head
git-harry [Thu, 3 Oct 2013 09:32:50 +0000 (10:32 +0100)]
Make fsid comparison case-insensitive

get_fsid and find_cluster_by_uuid are modified so ceph-disk activate and
ceph-disk activate-all will work if the fsid uses uppercase characters.

Signed-off-by: Harry Harrington <git-harry@live.co.uk>
11 years agoclient: remove requests from closed MetaSession 690/head
Sage Weil [Mon, 30 Sep 2013 21:44:17 +0000 (14:44 -0700)]
client: remove requests from closed MetaSession

If we get a CLOSED message on a session, remove/kick any requests on
that session before tearing it down.  Otherwise, we get a crash like

2013-09-26 03:51:44.704446 7f4d35a46700 10 client.4111 kick_requests for mds.0
2013-09-26 03:51:45.014156 7f4d35a46700 -1 ./include/xlist.h: In function 'xlist<T>::~xlist() [with T = MetaRequest*]' thread 7f4d35a46700 time 2013-09-26 03:51:44.751908
./include/xlist.h: 69: FAILED assert(_size == 0)

 ceph version 0.61.5 (8ee10dc4bb73bdd918873f29c70eedc3c7ef1979)
 1: (MetaSession::~MetaSession()+0x425) [0x4e0105]
 2: (Client::_closed_mds_session(MetaSession*)+0x116) [0x48a696]
 3: (Client::handle_client_session(MClientSession*)+0x2bb) [0x48bf5b]
 4: (Client::ms_dispatch(Message*)+0x56b) [0x4bfa0b]
 5: (DispatchQueue::entry()+0x3f1) [0x621b31]
 6: (DispatchQueue::DispatchThread::entry()+0xd) [0x6191bd]
 7: (()+0x7851) [0x7f4d3c168851]
 8: (clone()+0x6d) [0x7f4d3b09d90d]

Note that this can happen if we fail to reconnect do an MDS during its
reconnect interval.  If that happens, we probably have inodes in our
cache with no caps and things are generally not going to work very well.
This is but one step in improving the situation.

Separate out the two methods since they share little/no behavior.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph: Update FUSE_USE_VERSION from 26 to 30.
majianpeng [Thu, 1 Aug 2013 03:19:02 +0000 (11:19 +0800)]
ceph: Update FUSE_USE_VERSION from 26 to 30.

When compiling, it met this error:
>In file included from /usr/local/include/fuse/fuse.h:19:0,
>                 from client/fuse_ll.cc:17:
>/usr/local/include/fuse/fuse_common.h:474:4: error: #error only API
>version 30 or greater is supported
Update FUSE_USE_VERSION from 26 to 30.

Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
11 years agoclient: trim deleted inode
Yan, Zheng [Fri, 9 Aug 2013 05:43:54 +0000 (13:43 +0800)]
client: trim deleted inode

Previous patch makes MDS send notification to clients when an inode
is deleted. When receiving a such notification, we invalidate any
dentry link to the deleted inode. If there is no other reference to
the inode, the inode gets trimmed.

For cephfs fuse client, we use fuse_lowlevel_notify_inval_entry() or
fuse_lowlevel_notify_delete() to notify the kernel to trim the deleted
inode. (this is not completely reliable because we play unlink/link
tricks when  handle MDS replies. it's difficult to keep the user space
cache and kernel dcache in sync)

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agoMerge pull request #682 from ceph/wip-copying
Loic Dachary [Wed, 2 Oct 2013 21:36:41 +0000 (14:36 -0700)]
Merge pull request #682 from ceph/wip-copying

sync up COPYING and debian/copyright

11 years agoCOPYING: fix URL 682/head
Sage Weil [Wed, 2 Oct 2013 21:30:19 +0000 (14:30 -0700)]
COPYING: fix URL

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agodebian/copyright: sync up with COPYING
Sage Weil [Wed, 2 Oct 2013 21:18:07 +0000 (14:18 -0700)]
debian/copyright: sync up with COPYING

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoCOPYING: add Packaging: section
Sage Weil [Wed, 2 Oct 2013 21:16:19 +0000 (14:16 -0700)]
COPYING: add Packaging: section

Again, debian-specific, but who cares.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoCOPYING: add debian-style headers
Sage Weil [Wed, 2 Oct 2013 21:15:13 +0000 (14:15 -0700)]
COPYING: add debian-style headers

This may not be necessary here, but it makes this identical to the
debian/copyright file, which is a win.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoCOPYING: fix formatting
Sage Weil [Wed, 2 Oct 2013 21:14:48 +0000 (14:14 -0700)]
COPYING: fix formatting

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoCOPYING: make note of common/bloom_filer.hpp (boost) license
Sage Weil [Fri, 20 Sep 2013 01:34:56 +0000 (18:34 -0700)]
COPYING: make note of common/bloom_filer.hpp (boost) license

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: fix whitespace
Sage Weil [Fri, 20 Sep 2013 01:31:45 +0000 (18:31 -0700)]
common/bloom_filter: fix whitespace

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: test behavior of sequences of bloom filters
Sage Weil [Fri, 20 Sep 2013 01:23:07 +0000 (18:23 -0700)]
common/bloom_filter: test behavior of sequences of bloom filters

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: unit tests
Sage Weil [Fri, 20 Sep 2013 00:57:14 +0000 (17:57 -0700)]
common/bloom_filter: unit tests

Fun facts:

- fpp = false positive probability
- fpp is a function of insert count only
- at .1% fpp, we pay about 2 bytes per insert
- at 1-2% fpp, we pay about 1 byte per insert
- at 15% fpp, we pay about .5 bytes per insert

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #678 from ceph/wip-5981
Alfredo Deza [Wed, 2 Oct 2013 18:13:43 +0000 (11:13 -0700)]
Merge pull request #678 from ceph/wip-5981

ceph-disk: make initial journal files 0 bytes

11 years agoMerge pull request #649 from ceph/wip-6422
Sage Weil [Wed, 2 Oct 2013 17:51:29 +0000 (10:51 -0700)]
Merge pull request #649 from ceph/wip-6422

#6422

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #620 from dachary/wip-erasure-doc
athanatos [Wed, 2 Oct 2013 17:40:09 +0000 (10:40 -0700)]
Merge pull request #620 from dachary/wip-erasure-doc

ErasureCode: doc updates

11 years agoMerge pull request #677 from ceph/wip-store-tool
Sage Weil [Wed, 2 Oct 2013 17:16:21 +0000 (10:16 -0700)]
Merge pull request #677 from ceph/wip-store-tool

wip-store-tool: Few patches to ceph_test_store_tool

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #680 from dmick/next
Sage Weil [Wed, 2 Oct 2013 17:14:15 +0000 (10:14 -0700)]
Merge pull request #680 from dmick/next

mon/PGMap.cc: don't output header for pg dump_stuck if nothing stuck

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agocommon, os, osd: Use common functions for safe file reading and writing 649/head
David Zafman [Fri, 27 Sep 2013 00:42:13 +0000 (17:42 -0700)]
common, os, osd: Use common functions for safe file reading and writing

Add new safe_read_file() and safe_write_file() to update files atomically
Used instead of original OSD::read_meta(), OSD::write_meta() they are based on
Used by read_superblock() and write_superblock()
Used by write_version_stamp() and version_stamp_is_valid()

Fixes: #6422
Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: In read_meta() leave an extra byte in buffer to nul terminate
David Zafman [Wed, 2 Oct 2013 17:00:10 +0000 (10:00 -0700)]
osd: In read_meta() leave an extra byte in buffer to nul terminate

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoErasureCode: update PGBackend description 620/head
Loic Dachary [Wed, 2 Oct 2013 13:06:27 +0000 (15:06 +0200)]
ErasureCode: update PGBackend description

Based on a dialog with Sam ( as published at http://dachary.org/?p=2320 ).

* Remove PGBackend-h.rst because PGBackend.h is now in master.

* Fix typos caught by ispell

* Update recovery links to point to PGBackend recover methods

* Workaround formating warning
  developer_notes.rst:3: WARNING: Duplicate explicit target name:
  "erasurecodepluginexample" which should be legitimate.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCode: doc updates
Loic Dachary [Sun, 22 Sep 2013 16:40:48 +0000 (18:40 +0200)]
ErasureCode: doc updates

* Update to the current state of the ghobject implementaiton and the fact
  that they encode the shard_t Although the pool also contains the shard
  id, it is less relevant to understand the implementation.

* Update with the erasure code plugin infrastructure and the example
  plugin now in master.

* Move jerasure to a separate page to be expanded and link it from the
  toc

* Kill the partial read and writes notes as it will probably not be
  implemented in the near future. Kill some of the notes because they
  are no longer relevant.

* Add a definition for "chunk rank"

* Reword, update schemas, fix typos.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #652 from dachary/wip-ghobjects
Loic Dachary [Wed, 2 Oct 2013 07:24:32 +0000 (00:24 -0700)]
Merge pull request #652 from dachary/wip-ghobjects

common: ghobject sort order & get_filestore_key

11 years agocommon: document ghobject sort order rationale 652/head
Loic Dachary [Fri, 27 Sep 2013 17:09:23 +0000 (19:09 +0200)]
common: document ghobject sort order rationale

Intuition differs regarding the sort order of the ghobject shard and
generation. Document the rationale for the chosen sort order.

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agocommon: ghobject get_filestore_key* use hobject counterpart
Loic Dachary [Fri, 27 Sep 2013 13:34:18 +0000 (15:34 +0200)]
common: ghobject get_filestore_key* use hobject counterpart

The get_filestore_key* methods are changed to just call the
corresponding hobject methods instead of providing an identical
implementation.

Reviewed-by: David Zafman <david.zafman@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon/PGMap.cc: don't output header for pg dump_stuck if nothing stuck 680/head
Dan Mick [Wed, 2 Oct 2013 05:23:24 +0000 (22:23 -0700)]
mon/PGMap.cc: don't output header for pg dump_stuck if nothing stuck

Formatted output is already correct (no header)

Fixes: #4577
Signed-off-by: Dan Mick <dan.mick@inktank.com>
11 years agoReplicatedPG: rename finish_copy -> finish_copyfrom
Greg Farnum [Tue, 1 Oct 2013 23:42:55 +0000 (16:42 -0700)]
ReplicatedPG: rename finish_copy -> finish_copyfrom

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoReplicatedPG: copy: use CopyCallback instead of CopyOp in OpContext
Greg Farnum [Tue, 1 Oct 2013 23:41:22 +0000 (16:41 -0700)]
ReplicatedPG: copy: use CopyCallback instead of CopyOp in OpContext

In order to make this happen, we make the switch to generate the complete
transaction in the generic copy code and save it into the Callback. Then
in finish_copy() we just take that transaction and prepend it to the existing
transaction.
With that change, and by making use of the existing CopyCallback data,
we no longer need to access the CopyOp from the OpContext, so we can remove it.
Hurray, the pipelines are now independent!

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agomds: return -EAGAIN if standby replay falls behind
Yan, Zheng [Wed, 2 Oct 2013 03:43:12 +0000 (11:43 +0800)]
mds: return -EAGAIN if standby replay falls behind

standby replay may fall behind and get -ENOENT when reading the
journal. return -EAGAIN in this case, it makes the MDS respawn itself.

fixes: #5458

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoos/FileStore: report errors from _crc_load_... and _crc_save
Sage Weil [Wed, 2 Oct 2013 04:07:49 +0000 (21:07 -0700)]
os/FileStore: report errors from _crc_load_... and _crc_save

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