Commit Graph

38285 Commits

Author SHA1 Message Date
Haomai Wang
d93bdade3e AsyncConnection: Using buffer read to avoid small read overhead
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-01-16 03:07:09 +08:00
Haomai Wang
8d2af2faee AsyncMessenger: Using EventCenter instead of poll for bind
Totally avoid extra thread in AsyncMessenger now. The bind socket will be
regarded as a normal socket and will dispatch a random Worker thread to
handle accept event.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-01-16 03:07:09 +08:00
Haomai Wang
f4fcff16b6 AsyncMessenger: Bind async thread to special cpu core
Now, 2-4 async op thread can fully meet a OSD's network demand with SSD
backend. So we can bind limited thread to special cores, it can improve
async event loop performance because most of structure and method will
processed within thread.

For example,

ms_async_op_threads = 2
ms_async_affinity_cores = 0,3

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-01-16 03:07:09 +08:00
Gregory Farnum
d4a64474e5 Merge pull request #3376 from dachary/wip-10547-formatter
common: restore format fallback semantic

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-01-15 07:11:17 -08:00
Loic Dachary
b957fa8ecf tests: adapt to new json-pretty format
The json-pretty format was modified for readability and now includes
additional newlines / spaces. Either switch to json to avoid dealing
with space changes or modify the expected output to include them.

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-01-15 13:29:32 +01:00
Loic Dachary
97609a3309 test: rename test_activate_osd
It was incorrectly shadowing test_run_osd.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-01-15 13:27:01 +01:00
Loic Dachary
8d8ce96b58 common: restore format fallback semantic
When Formatter::create replaced new_formatter, the handling of an
invalid format was also incorrectly changed. When an invalid format (for
instance "plain") was specified, new_formatter returned a NULL pointer
which was sometime handled by creating a json-pretty formatter and
sometimes differently.

A new Formatter::create prototype with a fallback argument is added and
is used if it is not the empty string and that the format is not
known. This prototype is used where new_formatter returning NULL was
replaced by a json-pretty formatter.

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-01-15 13:26:26 +01:00
Yan, Zheng
a6cb74702d Merge pull request #3370 from ceph/wip-10382
mds: handle heartbeat_reset during shutdown
2015-01-15 19:54:55 +08:00
Dan Mick
9542416890 Merge pull request #3366 from ceph/wip-formatter
formatter: improve pretty output, rename factory method

Reviewed-by: Dan Mick <dan.mick@redhat.com>
2015-01-14 15:25:25 -08:00
Sage Weil
3f03a7b2ee doc/release-notes: v0.91
Signed-off-by: Sage Weil <sage@redhat.com>
2015-01-14 15:11:19 -08:00
Sage Weil
4ca69313e5 doc/release-notes: typo
Signed-off-by: Sage Weil <sage@redhat.com>
2015-01-14 15:11:19 -08:00
Gregory Farnum
6fa29f6f19 Merge pull request #3372 from ceph/wip-10539
qa: fail_all_mds between fs reset and fs rm

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-01-14 14:50:46 -08:00
John Spray
e5591f8a98 qa: fail_all_mds between fs reset and fs rm
Because fs reset opens a brief window for the previously
failed MDSs to spring back into life.

Fixes: #10539

Signed-off-by: John Spray <john.spray@redhat.com>
2015-01-14 22:08:09 +00:00
Sage Weil
d6a9d25cf1 doc/release-notes: v0.80.8
Signed-off-by: Sage Weil <sage@redhat.com>
2015-01-14 13:48:32 -08:00
Sage Weil
5c8ee3388f Merge remote-tracking branch 'gh/next' 2015-01-14 08:57:33 -08:00
John Spray
9daeaec5c6 mds: handle heartbeat_reset during shutdown
Because any thread might grab mds_lock and call heartbeat_reset
immediately after a call to suicide() completes, this needs
to be handled as a special case where we tolerate MDS::hb having
already been destroyed.

Fixes: #10382
Signed-off-by: John Spray <john.spray@redhat.com>
2015-01-14 12:00:17 +00:00
Sage Weil
d15958631b PendingReleaseNotes: make a note about librados flag changes
Signed-off-by: Sage Weil <sage@redhat.com>
2015-01-13 12:23:37 -08:00
Sage Weil
5a1fd855df Merge pull request #3360 from mattrichards/bump_rados_version
librados: bump rados version number

Reviewed-by: Sage Weil <sage@redhat.com>
2015-01-13 12:18:04 -08:00
Jenkins
725d66098c 0.91 2015-01-13 12:10:22 -08:00
Josh Durgin
6f8b54ca29 Merge pull request #2697 from ceph/wip-8900
RBD image watcher and new exclusive lock handling

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-01-13 11:17:29 -08:00
Samuel Just
b8ce73f253 Merge pull request #3254 from trociny/feature-10036
osd: osd tree to show primary-affinity value

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-01-13 10:56:29 -08:00
Samuel Just
6c4a523c36 Merge pull request #3281 from ceph/wip-10441-b
osd: fix watch ordering bug 10441 option b

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-01-13 10:55:29 -08:00
Samuel Just
00c30dd0d4 Merge pull request #3290 from ceph/wip-da-SCA-20150102
Coverity and SCA fixes

Reviewed-by: Sage Weil <sage@redhat.com>
2015-01-13 10:54:45 -08:00
Samuel Just
733ce25ccb Merge pull request #3302 from ceph/wip-9956
os/FileStore: verify kernel is new enough before using extsize ioctl

Reviewed-by: Samuel Just <sjust@redhat.com>
2015-01-13 10:54:21 -08:00
Samuel Just
c82f8177f7 Merge pull request #3305 from majianpeng/fix5
fix bugs about sync_filesystem

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-01-13 10:53:34 -08:00
Sage Weil
9264d2508a common/Formatter: new_formatter -> Formatter::create
Also make the default formatter selection more explicit.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-01-13 08:32:45 -08:00
Sage Weil
617ad5ddc1 common/Formatter: improve json-pretty whitespace
The whitespace for the current pretty mode is awkward and weird.  Move
to a more standard approach.  It's more newlines, but *much* more
readable.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-01-13 08:20:08 -08:00
Sage Weil
83c3b1305e common/Formatter: add newline to flushed output if m_pretty
This applies to json-pretty and xml-pretty modes.

Signed-off-by: Sage Weil <sage@inktank.com>
2015-01-13 08:06:17 -08:00
Gregory Farnum
a6f5682d55 Merge pull request #3364 from ceph/wip-quota-test
qa: set -e explicitly in quota test

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-01-13 07:08:30 -08:00
John Spray
b578a53b03 qa: set -e explicitly in quota test
Previously was set in hashbang, which meant
that "./quota.sh" was OK, but "sh ./quota.sh" would
just run through ignoring errors.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-01-13 14:58:57 +00:00
Gregory Farnum
d8e1f675f6 Merge pull request #3336 from ceph/wip-fs-reset
mon: implement `fs reset`

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-01-13 06:47:04 -08:00
Loic Dachary
fc7fa3087d Merge pull request #3343 from dachary/wip-10505-centos-parted
tests: install parted in centos Dockerfile

Reviewed-by: Joao Eduardo Luis <joao@redhat.com>
2015-01-13 11:07:55 +01:00
Jason Dillaman
7945f8d688 librbd: flush pending AIO requests under all existing flush scenarios
AIO requests that are waiting on the image lock should be flushed
during all existing RBD flush scenarios.  A few flush cases were
missed in the original implementation.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-01-12 23:17:50 -05:00
Jason Dillaman
2dd0f038d6 librbd: AIO requests should retry lock requests
Added a timer to support retrying AIO lock requests until
they are successful.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-01-12 23:14:11 -05:00
Jason Dillaman
6176ec5fde librbd: differentiate between R/O vs R/W RBD features
The new RBD exclusive lock feature should be treated as a
feature that is only applied when the image is opened in
R/W mode.

Older clients will need to handle the updated
cls_rbd::get_features method in order to properly determine
the incompatible features for an image depending on the
current mode.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-01-12 20:02:25 -05:00
Jason Dillaman
544ed961c6 librbd: Add internal unit test cases
The new unit tests cover the modifications made to integrate
the internal librbd functionality with the new ImageWatcher.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-01-12 20:02:24 -05:00
Jason Dillaman
17f22d98df librbd: Add ImageWatcher unit test cases
Directly unit test the new ImageWatcher class to complement
the existing librbd integration tests of exclusive lock
handling.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-01-12 20:02:06 -05:00
Jason Dillaman
5160281b1a librbd: Add convenience library to support unit tests
Unit tests need access to the private symbols of librbd no
longer exported from librbd.so.  A new librbd_internal
convenience library was created to allow access.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-01-12 20:01:21 -05:00
Jason Dillaman
4297e3bf8e rbd: Allow CLI to optionally create shared images
Images that are flagged as shared cannot use the RBD
object map nor RBD mirroring features.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-01-12 20:01:21 -05:00
Jason Dillaman
ccadff1445 librbd: Integrate librbd with new exclusive lock feature
Operations that update the image now require the exclusive lock
if the feature is enabled.  AIO write and discard operations will
automatically request the exclusive lock from the current leader
to support live-migration.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-01-12 20:01:19 -05:00
Matt Richards
9ee80b3322 librados: bump rados version number
As a follow-on to 49d114f1ff,
increment the "extra" version field so clients can easily
determine if they have a version of librados that properly
translates C API operation flags.

Signed-off-by: Matthew Richards <mattjrichards@gmail.com>
2015-01-12 17:00:52 -08:00
Josh Durgin
d784bc47c4 Merge pull request #3316 from ceph/wip-10471
rgw: index swift keys appropriately

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-01-12 16:20:28 -08:00
Jason Dillaman
f5668d6b9d librbd: Create image exclusive lock watch/notify handler
The new watch/notify handler replaces the existing header
update watch/notify handler and adds support for managing
image exclusive lock leadership.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-01-12 19:01:07 -05:00
Sage Weil
2ecd8748d2 osd: enable filestore_extsize by default
Note that this will only get used if the kernel is new enough; if it is
older than 3.5 the option will get disabled and extsize will not be used
even if the option is set to true.

This partially reverts 01cd3cdc72.

Fixes: #9956
Signed-off-by: Sage Weil <sage@redhat.com>
2015-01-12 14:00:21 -08:00
Sage Weil
b76d0dc0f2 os/FileStore: verify kernel is new enough before using extsize ioctl
Old kernels have an XFS bug that exposes uninitialized data when the
extsize hint is set and only partially written.  This is fixed by Linux
commit aff3a9edb7080f69f07fe76a8bd089b3dfa4cb5d, documented in XFS bug
http://oss.sgi.com/bugzilla/show_bug.cgi?id=874, and tested by XFS
test xfs/229 to prevent regressions.

Notably the original bug affects kernel 3.2, which is widely deployed with
ubuntu precise 12.04.

Backport: giant, firefly
Signed-off-by: Sage Weil <sage@redhat.com>
2015-01-12 13:59:39 -08:00
Gregory Farnum
c219c43cc2 Merge pull request #3352 from kylinstorage/fix-10503
Fix bug 10503: http://tracker.ceph.com/issues/10503

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-01-12 11:33:02 -08:00
Samuel Just
4ecea7e54e Merge pull request #3203 from majianpeng/fix1
avoid memcopy from librados to caller buffer

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
2015-01-12 08:39:48 -08:00
Samuel Just
187c85a5c4 Merge pull request #3034 from dachary/wip-10017-erasure-code-repair
erasure code repair when there are two failures

Reviewed-by: Samuel Just <sjust@redhat.com>
2015-01-12 08:26:08 -08:00
Samuel Just
fb72b9e4b9 Merge pull request #3148 from mslovy/optimazation_wbthrottle
os: WBThrottle: optimize the map to unordered_map

Reviewed-by: Samuel Just <sjust@redhat.com>
2015-01-12 08:23:26 -08:00
John Spray
a4152dbfa1 mon/MDSMonitor: add confirm flag to fs reset
This was already in the command map but was not
being checked.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-01-12 15:00:15 +00:00