Commit Graph

36168 Commits

Author SHA1 Message Date
Jenkins
c51c8f9d80 0.87 2014-10-29 11:03:55 -07:00
Josh Durgin
5d74c8101c Merge remote-tracking branch 'origin/wip-9806-giant' into giant
Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-10-28 13:09:06 -07:00
Samuel Just
490ae489ae Merge pull request #2630 from ceph/wip-9545
os/FileStore: do not loop in sync_entry on shutdown

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-10-27 13:20:16 -07:00
João Eduardo Luís
6f8524ef76 Merge pull request #2800 from ceph/wip-enoent-race
os/LevelDBStore, RocksDBStore: fix race handling for get store size

Reviewed-by: Joao Eduardo Luis <joao@redhat.com>
2014-10-26 18:58:50 +00:00
Sage Weil
eea9803a3f os/LevelDBStore, RocksDBStore: fix race handling for get store size
If we get ENOENT, skip this file, instead of adding in undefined stat
values.

Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-24 21:23:19 -07:00
Sage Weil
b05efddb77 Merge pull request #2799 from athanatos/wip-9480
Wip 9480

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-24 13:20:43 -07:00
Sage Weil
2c4be559c5 Merge pull request #2798 from athanatos/wip-9875
ReplicatedPG: writeout hit_set object with correct prior_version

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-24 12:55:05 -07:00
Federico Gimenez
c4b2abdd41 .gitmodules: ignoring changes in rocksdb submodule
Signed-off-by: Federico Gimenez <fgimenez@coit.es>
(cherry picked from commit 60eaeca4dd)
2014-10-24 11:14:03 -07:00
Josh Durgin
7272bb882c Merge pull request #2797 from ceph/wip-rbd-revert
rbd/objectcacher: revert recent changes for giant

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-10-24 11:12:29 -07:00
Sage Weil
082416fcca Revert "Enforce cache size on read requests"
This reverts commit 4fc9fffc49.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-24 11:06:16 -07:00
Sage Weil
544b9a82d9 Revert "rbd: ObjectCacher reads can hang when reading sparse files"
This reverts commit cdb7675a21.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-24 11:06:08 -07:00
Sage Weil
3b1eafcabb Revert "Fix read performance regression in ObjectCacher"
This reverts commit 65be257e92.

Too late for giant.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-24 11:05:53 -07:00
David Zafman
7d62170efa Merge pull request #2795 from ceph/wip-9873
objecter: fix tick_event shutdown race (9873)

Reviewed-by: David Zafman <dzafman@redhat.com>
2014-10-24 10:49:32 -07:00
Sage Weil
f76f83ce3f osdc/Objecter: fix tick_event handling in shutdown vs tick race
If we fail to cancel the tick_event, we rely on tick() itself to clear
tick_event.  I'm not quite sure how we got this wrong in the previous
commit, but this boils down to two cases:

1) shutdown() successfully cancels the event and clears tick_event.  tick()
   never runs.  tick_event == NULL when we finish.
2) shutdown() fails to cancel the event because it has already started.  In
   this case tick itself is blocking (or about to block) waiting on the
   rlock.  When it does run it will clear tick_event itself, then see
   initiazed == 0 and exit without rescheduling.

Fixes: #9873
Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-24 09:32:20 -07:00
Sage Weil
48484356bb common/Timer: recheck stopping before sleep if we dropped the lock
If we have safe_callbacks==false, the stopping flag may have changed while
we were doing our callback. Recheck it and exit to avoid a deadlock on
shutdown.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-24 09:20:41 -07:00
Sage Weil
9d1b585fdb Merge pull request #2787 from ceph/fix-fstat-mode
java: fill in stat structure correctly

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-23 17:57:02 -07:00
Noah Watkins
44a8d59b10 java: fill in stat structure correctly
Added stat filling helper function but only stat and lstat were updated.
This patch makes fstat use it. Crucially the fstat wasn't updating the
mode flags.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2014-10-23 13:58:23 -07:00
Josh Durgin
cb9262abd7 Objecter: resend linger ops on any interval change
Watch/notify ops need to be resent after a pg split occurs, as well as
a few other circumstances that the existing objecter checks did not
catch.

Refactor the check the OSD uses for this to add a version taking the
more basic types instead of the whole OSD map, and stash the needed
info when an op is sent.

Fixes: #9806
Backport: giant, firefly, dumpling
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2014-10-23 13:57:27 -07:00
Sage Weil
8a9b953b7c Merge pull request #2785 from athanatos/wip-9821
PG:: reset_interval_flush and in set_last_peering_reset

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-23 13:45:26 -07:00
Samuel Just
f2178d6ac4 Merge pull request #2766 from dachary/wip-9408-buffer-alignment-giant
erasure-code: buffer alignment (giant)

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-10-23 09:52:00 -07:00
Samuel Just
1a3ad307f1 ReplicatedPG: writeout hit_set object with correct prior_version
Fixes: #9875
Backport: giant, firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-10-23 09:11:31 -07:00
Greg Farnum
95a0ee1d99 qa: use sudo when rsyncing /usr so we can read everything
Signed-off-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit fa07c04231)
2014-10-22 17:14:32 -07:00
Samuel Just
4128814da7 FDCache: purge hoid on clear
We no longer require that a lock on the FD be held for the duration of an
operation, only while accessing the actual index.  We cannot, therefore, assume
that a racing read during lfn_unlink (backfill or scrub) does not still have a
reference to the fd.  We want to remove the fd from the cache to prevent
subsequent operations from finding it while allowing such a racing read to
complete with its existing fd.

Fixes: #9480
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-10-22 12:43:55 -07:00
Samuel Just
3abbd4c316 shared_cache: add purge and tests
purge detaches the lru shared_ptr currently associated from
the key from the lru even if there are still references.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-10-22 12:41:25 -07:00
Samuel Just
c116b4b55a shared_cache::add: do not delete value if existed
The method contract specifies that we do not want to delete
value if we are not inserting it, so do not initialize val
at the top of the function to take over value.  No current
users appear to trip over this problem (FDCache and
map_cache).

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-10-22 12:40:14 -07:00
Sage Weil
42bcabfe54 Merge pull request #2777 from ceph/wip-9859
mon: Monitor: MMonGetMap doesn't require caps

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-22 11:36:07 -07:00
Joao Eduardo Luis
227ecd8b03 mon: Monitor: MMonGetMap doesn't require caps
We are dropping the requirement for MON_CAP_R for MMonGetMap.

Reason is simple enough: clients may need to contact the monitors and
obtain the latest monmap before authenticating.  This happens, for
instance, when a client calls MonClient::get_monmap_privately().  The
osd uses this function during mkfs, prior to initializing a keyring or
even so much as existing.

Fixes: #9859

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2014-10-22 19:33:55 +01:00
Samuel Just
d9ff3a6b78 PG:: reset_interval_flush and in set_last_peering_reset
If we have a change in the prior set, but not in the up/acting set, we go back
through Reset in order to reset peering state.  Previously, we would reset
last_peering_reset in the Reset constructor.  This did not, however, reset the
flush_interval, which caused the eventual flush event to be ignored and the
peering messages to not be sent.

Instead, we will always reset_interval_flush if we are actually changing the
last_peering_reset value.

Fixes: #9821
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-10-21 11:02:49 -07:00
David Zafman
a49d7450da objecter: Unlock in shutdown before waiting for timer thread
Fixes: #9845

Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: David Zafman <dzafman@redhat.com>
2014-10-21 10:38:54 -07:00
Loic Dachary
bc8fd4924c erasure-code: use ErasureCode::SIMD_ALIGN in ceph_erasure_code_benchmark
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-21 10:33:53 -07:00
Loic Dachary
c894812c8e erasure-code: add ErasureCode::encode unit test
Re-create and describe the situation that is fixed by
91a7e18f60bbc9acab3045baaa1b6505474ec4a9 which reworks the buffer
preparation function provided by ErasureCode::encode.

http://tracker.ceph.com/issues/9408 Refs: #9408

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-21 10:33:51 -07:00
Loic Dachary
0749a2919f erasure-code: expose ErasureCode::SIMD_ALIGN as a const
For test purposes and it will also be useful for plugins that must
ensure the chunk size is a multiple of SIMD_ALIGN.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-21 10:33:50 -07:00
Janne Grunau
abc1cfbc22 ceph_erasure_code_benchmark: use 32-byte aligned input
The benchmark is supposed to measure the encoding/decoding speed and
not the overhead of buffer realignments.

Signed-off-by: Janne Grunau <j@jannau.net>
2014-10-21 10:33:48 -07:00
Janne Grunau
fdeeeb1b6b erasure code: use 32-byte aligned buffers
Requiring page aligned buffers and realigning the input if necessary
creates measurable oberhead. ceph_erasure_code_benchmark is between
10-20% faster depending on the workload.

Also prevents a misaligned buffer when bufferlist::c_str(bufferlist)
has to allocate a new buffer to provide continuous one. See bug #9408

Signed-off-by: Janne Grunau <j@jannau.net>
2014-10-21 10:33:47 -07:00
Janne Grunau
3ce06154b0 erasure code: use a function for the chunk mapping index 2014-10-21 10:33:45 -07:00
Loic Dachary
61543394b2 common: add an aligned buffer with less alignment than a page
SIMD optimized erasure code computation needs aligned memory. Buffers
aligned to a page boundary are not needed though. The buffers used
for the erasure code computation are typical smaller than a page.

The typical alignment requirements SIMD operations are 16 bytes for
SSE2 and NEON and 32 bytes for AVX/AVX2.

Add new prototypes with an align argument, similar to the one enforcing
page alignment. The implementation is exactly the same, except for the
align parameter. The page alignment method are then implemented as calls
to the more generic methods.

The align parameter is an unsigned (same type as CEPH_PAGE_SIZE). The
CEPH_PAGE_MASK value ( ~(CEPH_PAGE_SIZE - 1) ) was only used as
~CEPH_PAGE_MASK, i.e. equivalent of (CEPH_PAGE_SIZE - 1) once the double
~~ is reduced. These occurrence are replaced with (align - 1). The type
of CEPH_PAGE_MASK is an unsigned long which probably because it was
~(CEPH_PAGE_SIZE). When using (align - 1) as a mask for both
CEPH_PAGE_SIZE and SIMD alignment there is no need to use an unsigned
long because there is no risk of overflowing the unsigned value.

The CYGWIN specific code is also modified but not tested.

Unit tests are added for the new methods.

Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-21 10:33:43 -07:00
Loic Dachary
681dad8907 common: remove dead code in buffer.cc
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-21 10:33:38 -07:00
Adam Crume
65be257e92 Fix read performance regression in ObjectCacher
The regression was introduced in commit
4fc9fffc49.  The problem is that the cache
thinks it's full (when it's not), so it defers the read.  This change
frees up cache space if necessary and only defers the read if enough
space cannot be freed.

Fixes: 9513
Signed-off-by: Adam Crume <adamcrume@gmail.com>
(cherry picked from commit 82175ec94a)
2014-10-20 13:49:04 -07:00
Sage Weil
27d5ae61b1 Merge pull request #2758 from ceph/wip-9820
qa/workunits: cephtool: don't remove self's key on auth tests

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-20 10:46:48 -07:00
Joao Eduardo Luis
ac3c1cb5d0 qa/workunits: cephtool: don't remove self's key on auth tests
Suites run with CEPH_TEST_CLI_DUP_COMMAND=1, which will send a duplicate
command for every command issued with the 'ceph' tool.  Behavior is to
get a reply from the command and then send a duplicate, looking for the
same outcome (guaranteeing idempotency of the operations).  However, it
so happens that if you remove the entity's own key from the keyring and
you happen to be unlucky enough so that the client's connection gets
failed (we also run tests with connection failure injections), the
'ceph' tool won't be able to reconnect to the cluster to send the
duplicate command (as it's entity no longer exists in the cluster's
keyring).

We rewrite the test instead of resorting to ugly hacks to work around
this behavior, simply having a new 'role-definer' added by the existing
'role-definer' (which we weren't testing anyway, so bonus points for
that) and then have one removing the other (to test the procedure) and
finally using 'client.admin' to remove the last 'role-definer'.

Fixes: #9820

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2014-10-20 18:00:15 +01:00
Samuel Just
22877ba735 Merge pull request #2708 from ceph/wip-9718
osd/osd_types: consider CRUSH_ITEM_NONE in check_new_interval() min_size

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-10-17 10:38:43 -07:00
Samuel Just
234f5a2347 Merge pull request #2711 from guangyy/wip-9614-followup
Follow-up fix for 9614

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-10-17 10:38:30 -07:00
Sage Weil
fdf534dd89 Merge pull request #2740 from ceph/giant-unknown-locktype
mds: reply -EOPNOTSUPP for unknown lock type
2014-10-17 08:21:16 -07:00
Yan, Zheng
9e6ae73a13 mds: reply -EOPNOTSUPP for unknown lock type
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit 675392335c)
2014-10-17 22:02:49 +08:00
Sage Weil
5558afa03d qa/workunits/rbd/import_export.sh: be case insensitive
Stop tripping over this change (from dumpling).

Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-15 12:26:00 -07:00
Yehuda Sadeh
c44fbf7c44 Merge pull request #2702 from ceph/wip-9706
objecter: fix session locking, use after frees (#9706)

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2014-10-15 08:58:16 -07:00
Gregory Farnum
0aaae4542e Merge pull request #2719 from ceph/wip-inotable-init
mds: fix inotable initialization/reset

Reviewed-by: Yan, Zheng <zyan@redhat.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2014-10-14 13:38:50 -07:00
Henry C Chang
c4bac3eb3e mds: fix inotable initialization/reset
interval_set::insert takes arguments start and len, not end.

Signed-off-by: Henry C Chang <henry.cy.chang@gmail.com>
(cherry picked from commit c95bb59434)
2014-10-14 21:56:08 +08:00
Sage Weil
674781960b Merge pull request #2707 from ceph/wip-9731
PGLog::IndexedLog::trim(): rollback_info_trimmed_to_riter may be log.ren...

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-13 11:17:17 -07:00
Loic Dachary
f1fccb1d19 rpm: 95-ceph-osd-alt.rules is not needed for centos7 / rhel7
The || instead of && had it always installed. That was fixed in EPEL
already.

http://tracker.ceph.com/issues/9747 Fixes: #9747

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
(cherry picked from commit 5ff4a850a0)
2014-10-13 08:16:40 -07:00