Commit Graph

54630 Commits

Author SHA1 Message Date
Jason Dillaman
61f86e7ec1 cls_rbd: mirror image status summary should read full directory
Previously only retrieved the status for the first 64 images in
the rbd_mirroring directory.

Fixes: http://tracker.ceph.com/issues/16178
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-06-07 09:37:16 -04:00
Igor Fedotov
e7446ef2fd os/BlueStore: Fixes improper blob length assignment when creating a new blob for large writes
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
2016-06-07 16:37:04 +03:00
Igor Fedotov
6f8cc6111a os/BlueStore: Adds checkes for lextent range overlaps to _fsck
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
2016-06-07 16:36:44 +03:00
Sage Weil
cc9a07cabe Merge pull request #9533 from jjhuo/no_pagecache
os/bluestore: make rocksdb not to use page cache

Reviewed-by: Sage Weil <sage@redhat.com>
2016-06-07 09:14:13 -04:00
Sage Weil
a577659d09 Merge pull request #8233 from majianpeng/bluestore-perfcount
os/bluestore: perf counters

Reviewed-by: Sage Weil <sage@redhat.com>
2016-06-07 09:10:25 -04:00
huanwen ren
47edef3739 tool/rbd: cleanup in utils.cc
Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
2016-06-07 20:14:53 +08:00
Jason Dillaman
636129653c librbd: flush journal commit positions before starting op
Ensure all IO has been properly flushed and committed to the
journal before starting an op that could affect the IO path.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-06-07 07:30:48 -04:00
Jason Dillaman
d3d4e06839 librbd: leaked AioCompletion if IO issued after image shut down
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-06-07 07:30:48 -04:00
Jason Dillaman
1032f19b3c librbd: resize and snap create can hang on journal replay failure
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-06-07 07:30:48 -04:00
Jason Dillaman
a7f5bc181c librbd: missing journal state for flushing/restarting replay
Fixes: http://tracker.ceph.com/issues/16077
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-06-07 07:30:48 -04:00
Jason Dillaman
eb8dda5296 librbd: track IO in the order issued
Fixes: http://tracker.ceph.com/issues/15034
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-06-07 07:30:48 -04:00
Jason Dillaman
133b1ffb21 librbd: AioCompletion should retrieve CephContext from ImageCtx
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-06-07 07:30:48 -04:00
Jason Dillaman
82587a31f1 librbd: Journal no longer requires AioCompletion for IO events
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-06-07 07:30:48 -04:00
Jason Dillaman
79c934742f librbd: bubble journal error up via existing AioObjectRequests
The journal cannot directly fail the AioCompletion because it
might have one-or-more outstanding requests associated with
it.

Fixes: http://tracker.ceph.com/issues/15791
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-06-07 07:30:48 -04:00
Jianpeng Ma
5e5bdadcbf os/bluestore/BlueStore: remove the duplicated code.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2016-06-07 15:17:49 +08:00
xie xingguo
45efd19722 client: fix sanity check of preadv/pwritev
The preadv/pwritev call is only supposed to return a postive
number indicating how many bytes we succeed in reading from
or writing into disk, which is obviously not what we want
under the following cases.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-06-07 14:26:45 +08:00
Kefu Chai
70bbf1aded configure.ac,debian,rpm: do not package .a files in rpm/deb packages
this change removes *.a from -dev or -devel packages.

* configure.ac:
  - use LT_INIT instead of AM_PROG_LIBTOOL. the later is deprecated.
  - disable static lib:
    .a static libraries not not useful, it's tricky to generate both
    static libraries and shared libraries in cmake.
    see http://www.spinics.net/lists/ceph-devel/msg30637.html
* ceph.spec.in: fedora packaging policy forbids this
  see
  https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries
* debian/*-dev.install: debian does not requires this
  see
  https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#s-sharedlibs-static

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-06-07 14:08:59 +08:00
Kefu Chai
4ba2bb750b debian: do not install *.la files
rationales:
* .la files are worthless
  see http://www.spinics.net/lists/ceph-devel/msg30637.html
* debian does not like it:
  see https://wiki.debian.org/ReleaseGoals/LAFileRemoval
* neither does fedora:
  https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries
* also they are created by libtools, and cmake does not use libtools.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-06-07 14:08:59 +08:00
Kefu Chai
d596146e6d makefile,debian,rpm: do not package librgw_file* anymore
they are unit tests for rgw.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-06-07 14:08:59 +08:00
xie xingguo
5c4a65a521 bluestore/BitAllocator: literal cleanups
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-06-07 12:28:14 +08:00
Shehbaz Jaffer
c1561a3ab1 os/bluestore: benchmark Host Aware SMR Drives for linear writes
* add script to write files linearly using dd command
* add script to write files linearly using SMR zone aware commands

Script needs libzbc support. Check is provided so that script does
not run if libzbc commands are not installed.

Fixes: http://tracker.ceph.com/issues/16174
Signed-off-by: Shehbaz Jaffer <shehbazjaffer007@gmail.com>
2016-06-07 00:05:29 -04:00
Kefu Chai
8d7b8e1f93 Merge pull request #9296 from tchaikov/wip-test-chain_xattr
test: Fix the order of ASSERT_EQ() in chain_xattr tests

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
2016-06-07 12:05:26 +08:00
Kefu Chai
39725ea785 Merge pull request #9361 from stiopaa1/osd_osd_override
osd/OSD.h: add override to virtual functions

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-06-07 12:03:19 +08:00
Vikhyat Umrao
a00720d9aa rbd: add error message "snapshot is already protected"
Fixes: http://tracker.ceph.com/issues/15807

Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
2016-06-07 09:06:25 +05:30
Kefu Chai
3caafc4476 buffer: add a test for iterator::copy(huge_chunk, dest)
Fixes: http://tracker.ceph.com/issues/16010
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-06-07 11:23:28 +08:00
Kefu Chai
053bfa650b buffer: fix advance(unsigned) to avoid int underflow
by chaning
- the signature of advance(unsigned) to advance(size_t)
- the signature of seek(int) to seek(ssize_t)

Fixes: http://tracker.ceph.com/issues/16010
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-06-07 11:23:28 +08:00
Jason Dillaman
276fed6b70 librbd: potential duplicate snap removal can result in crash
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-06-06 22:34:30 -04:00
Jianjian Huo
5bb63ebdb6 os/bluestore/BlueFS: convert all read/write IO to direct IO.
RocksDB is the sole user of BlueFS, after BlueFS uses direct IO,
RocksDB will have to use its own block cache to cache raw data
blocks.

Signed-off-by: Jianjian Huo <jianjian.huo@ssi.samsung.com>
2016-06-06 18:11:41 -07:00
Jianjian Huo
8e5891306c os/bluestore: convert read_buffered() to read_random() with buffered flag
New function will handle unaligned random read for both buffered or
direct read.

Signed-off-by: Jianjian Huo <jianjian.huo@ssi.samsung.com>
2016-06-06 18:11:30 -07:00
Jianpeng Ma
7ae1db2ba0 os/bluestore/BitAllocator: fix compiler warning.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2016-06-07 07:42:28 +08:00
Jianpeng Ma
fca97f8619 os/bluestore/BitMapAllocator: fix free space beyond size of BitAllocator
When Using bitmap allocator, the osd crashed. The stack info as
follows:

ceph-osd: os/bluestore/BitAllocator.cc:910: bool
BitAllocator::is_allocated(int64_t, int64_t): Assertion `start_block >=
0 && (start_block + num_blocks <= size())' failed.
*** Caught signal (Aborted) **
in thread 7f795bbc48c0 thread_name:ceph-osd ceph version
10.2.0-1333-g3f4cf16
(3f4cf16)
1: (()+0x98e25e) [0x55e112a9625e]
2: (()+0x109f0) [0x7f795a6719f0]
3: (gsignal()+0x38) [0x7f7958542a28]
4: (abort()+0x16a) [0x7f795854462a]
5: (()+0x2d227) [0x7f795853b227]
6: (()+0x2d2d2) [0x7f795853b2d2]
7: (()+0x7eaa59) [0x55e1128f2a59]
8: (BitAllocator::free_blocks(long, long)+0x22) [0x55e1128f2e82]
9: (BitMapAllocator::insert_free(unsigned long, unsigned long)+0x22c)
[0x55e1128ef12c]
10: (BitMapAllocator::init_add_free(unsigned long, unsigned long)+0x22c)
[0x55e1128ef41c]
11: (BlueFS::_init_alloc()+0x2b9) [0x55e1128c27b9]
12: (BlueFS::mkfs(uuid_d)+0x45a) [0x55e1128d475a]
13: (BlueStore::_open_db(bool)+0xd76) [0x55e1127bbcb6]
14: (BlueStore::mkfs()+0x8b1) [0x55e1127e4f11]
15: (OSD::mkfs(CephContext, ObjectStore, std::__cxx11::basic_string,
std::allocator > const&, uuid_d, int)+0x117) [0x55e112484de7]
16: (main()+0x101f) [0x55e112425f2f]
17: (__libc_start_main()+0xf0) [0x7f795852e580]
18: (_start()+0x29) [0x55e1124684e9]

This because in BitAllocator::init will decrease size of blkdev which
make size align w/ zone-size.
The later add free extent will beyond the size.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2016-06-07 07:37:13 +08:00
Jianpeng Ma
add4832ca8 os/bluestore/BlueStore: remove the unused perfcounter:l_bluestore_state_wal_done_lat
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2016-06-07 06:29:08 +08:00
Casey Bodley
b262e46599 Merge pull request #9527 from linuxbox2/rgw-ldap
rgw ldap: fix ldap bindpw parsing

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2016-06-06 17:55:04 -04:00
Matt Benjamin
72b2f3e8dc rgw ldap: fix ldap bindpw parsing
Also add additional LDAP debugging output at 0, 10, and 15 to make
troubleshooting easier.

Fixes DN search issue using QE configuration of MS AD.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2016-06-06 17:50:32 -04:00
Greg Farnum
5d9cc299e6 doc: include link to CephFS' experimental features
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2016-06-06 14:46:44 -07:00
Jianjian Huo
17129122ac RocksDBStore: add option to configure number of block cache shards
rocksdb_cache_size will be splitted into number of shards evenly.
More shards will reduce lock contentions.

Signed-off-by: Jianjian Huo <jianjian.huo@ssi.samsung.com>
2016-06-06 14:44:41 -07:00
Michal Jarzabek
689819bab4 common/ceph_json.h: add const to member function
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
2016-06-06 21:55:46 +01:00
Samuel Just
f14c8ae61f Merge pull request #9525 from liewegas/wip-wq
unittest_workqueue: fix wq test for 0 threads

Reviewed-by: Samuel Just <sjust@redhat.com>
2016-06-06 13:53:06 -07:00
Josh Durgin
27edd204aa Merge pull request #9517 from idryomov/wip-rbd-concurrent
krbd: don't segfault if images are unmapped concurrently

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2016-06-06 12:57:37 -07:00
Samuel Just
2d79aa9cfc Merge pull request #9432 from ceph/wip-16113
Clean up hobject_t::max() values in decode, avoid comparing directly to get_max()

Reviewed-by: Sage Weil <sage@redhat.com>
2016-06-06 12:23:46 -07:00
Sage Weil
9c7d248e0d unittest_workqueue: fix wq test for 0 threads
In 81517aea06 we added
support for a wq with 0 worker threads.  Fix unit test
accordingly.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-06 14:20:30 -04:00
Sage Weil
f836280c46 Merge pull request #9522 from ceph/wip-rocksdb
Makefile-rocksdb: updates
2016-06-06 14:18:22 -04:00
Samuel Just
cef5151a62 hobject: enforce max canonical value
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-06-06 09:34:09 -07:00
Samuel Just
7c5f2acaa5 src/: remove all direct comparisons to get_max()
get_max() now returns a special singleton type from which hobject_t's
can be assigned and constructed, but which cannot be directly compared.

This patch also cleans up all such uses to use is_max() instead.

This should prevent some issues like 16113 by preventing us from
checking for max-ness by comparing against a sentinel value.  The more
complete fix will be to make all fields of hobject_t private and enforce
a canonical max() representation that way.  That patch will be hard to
backport, however, so we'll settle for this for now.

Fixes: http://tracker.ceph.com/issues/16113
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-06-06 09:34:04 -07:00
Jianpeng Ma
189c8f190b os/bluestore/BlueStore: add perfcoutner:l_bluestore_write_penalty_read_ops
For write, because the align requirement it maybe need read data.
Using this perfcounter to record the read ops.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2016-06-07 00:31:02 +08:00
Sage Weil
f3d68eb61c Merge pull request #9518 from cbodley/wip-mds-override
mds: fix MDRequestImpl::print override

Reviewed-by: John Spray <jspray@redhat.com>
2016-06-06 12:11:34 -04:00
Jianpeng Ma
f8b7eb980d os/bluestore/BlueStore: add perfcounter: l_bluestore_wal_write_ops/bytes.
Using this record wal ops and wal bytes.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2016-06-06 23:45:53 +08:00
Jianpeng Ma
b3f353e2cf os/bluestore/BlueStore: Add perfcounter::l_bluestore_write_pad_bytes.
For write, sometimes it need padd zero. Use this perfcounter to
record the padding bytes.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2016-06-06 23:44:32 +08:00
Yan Jun
dc0ac7b304 rgw/basic_type: use the standard usage of string
string::find() returns a value of size_t type, we'd better
use the std::string::npos when it find nothing.

Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
2016-06-06 23:38:25 +08:00
Sage Weil
6f022acc85 Makefile-rocksdb: updates
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-06 11:16:52 -04:00