Commit Graph

58876 Commits

Author SHA1 Message Date
Brad Hubbard
adc51df69d osd: fix typo in PG::clear_primary_state
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2016-10-17 08:12:34 +10:00
Willem Jan Withagen
30c0e4cbf5 FreeBSD: update require packages
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2016-10-16 22:10:03 +02:00
Sage Weil
e7155b3d59 buffer: make iterator copy to ptr handle len==0
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:51 -04:00
Sage Weil
b00b9d021b buffer: fix * zero placement
Back in 46522cf0d2 we broke the newline
placement for the * lines.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:51 -04:00
Sage Weil
dc7c0a7d3a ceph-dencoder: don't dump usage on every error
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:51 -04:00
Sage Weil
3d5c19958f ceph-dencoder: add hexdump command
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:51 -04:00
Sage Weil
269a5bba1c os/bluestore: do deep encode of onode
Avoid an inevitable rebuild() since we have to pass this to rocksdb as a
single memory buffer anyway.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:51 -04:00
Sage Weil
f047d57668 buffer: add a 'deep' append mode
Do the copy up-front.  This is useful if we know our target buffer must
be a contiguous buffer (e.g., because it will be passed to a kv store).

Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:51 -04:00
Sage Weil
5ca65f51c8 os/bluestore: log onode component sizes
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:51 -04:00
Sage Weil
01e629e4c0 buffer: contiguous_appender::get_logical_offset
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:51 -04:00
Sage Weil
47c60699b8 os/bluestore/BlueFS: write into page-aligned buffers from rocksdb
The BlueRocksEnv uses the append(const char *, size_t) appender.  Ensure
that this data is copied into a page-aligned buffer, and that we "pad" the
write out with the remainder of the page.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:51 -04:00
Sage Weil
cf0ca97b64 buffer: add page_aligned_appender
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:51 -04:00
Sage Weil
8910a3b343 unittest_bluefs: use append(const char*, size_t)
The bufferlist one is for internal use only.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:50 -04:00
Sage Weil
058caea370 os/bluestore: convert internal types to denc
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:50 -04:00
Sage Weil
aa4ab12c64 osd: denc_traits for osd_reqid_t
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:50 -04:00
Sage Weil
09e14f92b9 msg/msg_types: denc_traits for entity_name_t
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:50 -04:00
Sage Weil
9b25018fb8 include/interval_set: define denc_traits for interval_set<T>
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:50 -04:00
Sage Weil
de05b38e6a include/fs_types: conditional denc_traits for inodeno_t
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:50 -04:00
Sage Weil
c9c5235ef7 include/object: conditional denc_traits for snapid_t
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:50 -04:00
Sage Weil
dec0f05288 include/denc: _nohead variants for containers
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:50 -04:00
Sage Weil
18d754f620 include/denc: new-style encoding framework
#include it from encoding.h so that we can make old STL container helpers
conditional on a new-style helper not being available.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:50 -04:00
Sage Weil
059065c499 buffer: implement bufferptr::iterator
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:50 -04:00
Sage Weil
c38869232c buffer: implement bufferlist::contiguous_appender
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:50 -04:00
Sage Weil
1baeb61054 buffer: fix whitespace
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:49 -04:00
Sage Weil
3bf531708c buffer: implement ptr::end_c_str()
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:49 -04:00
Sage Weil
43d0554d01 include/small_encoding: rewrite lowz in terms of generic varint
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:49 -04:00
Sage Weil
7ff7424461 include/small_encoding: rewrite small_{encode,decode}_signed_varint in terms of varint
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:49 -04:00
Sage Weil
14cad5655d buffer: add iterator copy_shallow() to ptr
If the length resides within the bufferlist's current ptr, return a ptr
to the same buffer.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:49 -04:00
Sage Weil
6d7f748653 buffer: rename iterator copy() to copy_deep()
Current callers expect a deep copy; be explicit about it.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:49 -04:00
Sage Weil
1917d85392 ceph-dencoder: use encode/decode functions instead of class methods
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:49 -04:00
Sage Weil
0b7f248d3d ceph-dencoder: AuthMonitor::Incremental is featured
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:49 -04:00
Sage Weil
9d6d8396dc ceph-dencoder: PGMap[::Incremental] requires features to encode
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:49 -04:00
Sage Weil
c974e8d510 declare encode/decode for various types that are missing it
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-16 10:32:49 -04:00
Kefu Chai
2eb89c8a9c Merge pull request #11443 from wjwithagen/wip-wjw-freebsd-cmake-options
do_freebsd.sh: Set options for debug building.

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-10-16 22:10:48 +08:00
Willem Jan Withagen
ec16ced98d ./do_freebsd.sh: remove pipe to get correct return value
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2016-10-16 14:28:07 +02:00
Haomai Wang
21d5f49b1f Merge pull request #11430 from wjwithagen/wip-wjw-freebsd-EventKqueue
FreeBSD/EventKqueue.{h,cc} Added code to restore events on (thread)fork

Reviewed-by: Haomai Wang <haomai@xsky.com>
2016-10-16 11:52:53 +08:00
Sage Weil
b0c86510fd Merge pull request #11284 from liewegas/wip-mon-osdmap-features
mon/OSDMonitor: encode full osdmaps with features all OSDs can understand

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-10-15 21:54:35 -05:00
Sage Weil
cbfdfe60df Merge pull request #11401 from liewegas/wip-mgr-keys
auth: tolerate missing MGR keys during upgrade

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-10-15 21:52:33 -05:00
Sage Weil
16fda71354 auth/cephx: do not re-request *only* the MGR key
If we request a bunch of service keys, we may not get
back a MGR key because of an in-progress upgrade.  If we
have everything we need except for just the MGR key, do
not bother re-requesting it.  Instead just continue and
we'll re-request it later when the secrets rotate.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-15 22:51:27 -04:00
Sage Weil
bf0dc6dbdb mon/MonClient: do not request MGR key from pre-kraken mons
If we do, the older mon will return EPERM.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-15 22:51:27 -04:00
Jeff Layton
23956dea83 client: don't take extra target inode reference in ll_link
For the life of me, I can't figure out where this reference is ever put.
We usually take a reference like this when there is an Inode **
parameter that we'll return to the caller. ll_link doesn't have one of
those, so as best I can tell this reference is just leaked.

Zheng however says that FUSE will eventually put this reference via
ll_forget. I still don't quite get how that works, but the other callers
clearly do not handle this correctly. Change the code to only make the
fuse code take this extra reference.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2016-10-15 19:31:46 -04:00
Willem Jan Withagen
9eeb491f00 src/msg/async/EventKqueue: refactor and add test_thread_change()
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2016-10-15 13:09:51 +02:00
Willem Jan Withagen
a534069cf4 src/msg/async/EventKqueue.cc: adjust logging levels.
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2016-10-15 13:04:36 +02:00
Willem Jan Withagen
4e3ed5ad04 src/msg/async/EventKqueue.{h,cc} Added code to restore events on (thread)fork
According the FreeBSD man page of kqueue(), the kq-descriptors become invalid
upon fork. It looks like the same happens when a kq-handle is created and then
a thread is created.

So we keep a list of assigned events with each kq-handle and when the handle
has beccome invalid, we recreated the kq-handle and the events that go with it.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2016-10-15 13:04:36 +02:00
Kefu Chai
754ad16eae Merge pull request #11276 from tchaikov/wip-17400
tools/ceph_monstore_tool: update pgmap_meta also when rebuilding store.db

Tested-by: Huawen Ren <ren.huanwen@zte.com.cn>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2016-10-15 11:50:54 +08:00
xie xingguo
03ec4be89a os/bluestore: narrow scope of local variables
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-10-15 10:57:06 +08:00
xie xingguo
7f74c84290 os/bluestore: formatting nits
Remove dupilicated semicolon, 80 chars etc.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-10-15 10:50:03 +08:00
Sage Weil
b5a191528c Merge pull request #11339 from liewegas/wip-mon-stuck
mon/PGMap: PGs can be stuck more than one thing

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-10-14 15:04:50 -05:00
Alfredo Deza
3201170f14 Merge pull request #11499 from ceph/wip-kraken-no-git-dir
cmake: find GIT_VER variables if there is no .git dir

Reviewed-by: Alfredo Deza <adeza@redhat.com>
2016-10-14 15:35:19 -04:00
Sage Weil
392fa14c06 auth/cephx: tolerate missing rotating keys
During an upgrade, we may have a client requesting an
MGR service key but not have one in the database yet,
either because we *just* upgraded and haven't generated
one yet, or because the leader mon hasn't been upgraded
yet.

Fix this by silently tolerating a missing key as long as
one or more other service keys were present and we have
something to give to the client.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-14 14:41:44 -04:00