xie xingguo
86944f0ea1
os/bluestore: add sanity check for underflow
...
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-06-23 20:09:01 +08:00
xie xingguo
319a14e201
os/bluestore: use hex version for offset/length
...
We update bluestore this way a couple of days ago.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-06-23 20:07:25 +08:00
xie xingguo
ed71c3ed00
os/bluestore: kill dead code
...
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-06-23 20:07:25 +08:00
xie xingguo
9e35ac192e
os/bluestore: shutdown allocator of bluefs more gracefully
...
The new BitAllocator requires we call shutdown() explicitly,
thus we shall fix it here before we apply to the new BitAllocator.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-06-23 20:07:25 +08:00
Jason Dillaman
48d18030fd
Merge pull request #9207 from rjfd/wip-15670
...
rbd-mirror: image resync
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-06-22 18:03:22 -04:00
Sage Weil
c83374ff71
Merge pull request #9626 from liewegas/wip-bluestore-2q
...
os/bluestore: implement 2Q buffer cache policy
2016-06-22 15:09:23 -04:00
Sage Weil
b6a2492b1c
ceph_test_objectstore: define matrixes over config options and write sizes
...
These replace a few of the ad hoc synthetic tests.
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 15:08:36 -04:00
Sage Weil
3064c819fd
os/bluestore: handle bnode removal race
...
One thread might try to drop a bnode while another does a lookup and
retakes a ref:
1- drop bnode ref (-> 0)
2- take bnode_set lock, do lookup
2- take bnode ref (-> 1)
2- drop lock
1- take bnode_set lock
1- remove from set
1- drop lock
Fix this race by rechecking the ref count while we are holding the lock.
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 15:08:36 -04:00
Samuel Just
73e67eb6f6
Revert "msg: default ms type = async"
...
Not ready quite yet, causing too many test failures.
This reverts commit 928887a09c
.
Reviewed-by: Sage Weil <sage@redhat.com>
2016-06-22 11:21:24 -07:00
Jason Dillaman
070bb07874
Merge pull request #9451 from s09816/master
...
librbd: enable/disable of features is not allowed when already enabled/disabled
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-06-22 14:02:42 -04:00
Jason Dillaman
2b7f28c234
Merge pull request #9715 from trociny/wip-16321
...
librbd: re-register watch on old format image rename
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-06-22 14:02:01 -04:00
Samuel Just
8833e8e008
Merge pull request #9874 from athanatos/wip-16185
...
OSDMonitor::prepare_pgtemp: only update up_thru if newer
Reviewed-by: Sage Weil <sage@redhat.com>
2016-06-22 10:26:49 -07:00
Samuel Just
55d5392aa3
Merge pull request #9875 from athanatos/wip-16127
...
OSDMonitor: drop pg temp from sources other than the current primary
Reviewed-by: Sage Weil <sage@redhat.com>
2016-06-22 10:26:35 -07:00
Mykola Golub
74c5da8b24
Merge pull request #9850 from dillaman/wip-16404
...
librbd: flag image as updated after proxying maintenance op
Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2016-06-22 20:12:59 +03:00
Samuel Just
d68b3a12ad
Merge pull request #8370 from jack-changtao/pg_del
...
osd/PG: cleanup: delete find_best_info again
Reviewed-by: Samuel Just <sjust@redhat.com>
2016-06-22 09:55:23 -07:00
Samuel Just
cab168e5fc
Merge pull request #9802 from yuyuyu101/wip-16378
...
msg/async: fix test stuck into STATE_WAIT
Reviewed-by: Samuel Just <sjust@redhat.com>
2016-06-22 09:51:01 -07:00
Kefu Chai
b20af78f06
Merge pull request #8195 from tchaikov/wip-cmake-visibility
...
cmake changes
Reviewed-by: Ali Maredia <amaredia@redhat.com>
2016-06-22 23:37:38 +08:00
Sage Weil
7c6bdb0e21
os/bluestore: drop unneeded conditional in LRUCache trim
...
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 11:28:43 -04:00
Sage Weil
2215e227a9
os/bluestore: protect BnodeSet with mutex
...
The onodes (and thus bnodes) may not get destroyed with the collection
lock held, which means we cannot rely on that lock to protected the
bnodeset structure. Give BnodeSet it's own mutex to protect itself.
While we are at it, make dummy a member so we can avoid constructing it
each time. This is now safe since we are under the new lock.
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 11:28:42 -04:00
Sage Weil
c28188ea3c
os/bluestore: remove bluestore_cache_tails
...
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 11:28:42 -04:00
Sage Weil
9ebbca0375
os/bluestore: fix 8-bit csum
...
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 11:28:42 -04:00
Sage Weil
d2023cf3b4
os/bluestore: default to 512MB cache, buffered reads
...
Test with small cache to exercise trimming.
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 11:28:42 -04:00
Sage Weil
f1d7a70614
os/bluestore: 2q by default
...
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 11:28:42 -04:00
Sage Weil
b03d55224a
os/bluestore: implement 2Q buffer cache policy
...
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 11:28:42 -04:00
Sage Weil
fb03a64358
os/bluestore: move merge operator
...
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 11:28:41 -04:00
Sage Weil
98748b3623
os/bluestore: buffer cache_private field, returned by discard
...
2Q (and likly MQ?) need to know when we re-add a block that was previously
evicted. We track these as STATE_EMPTY buffers, but we throw them out
with _discard before we add the (re)read data into the BufferSpace. Add
a Buffer field called cache_private that is returned by discard (actually,
a max over everything that is discarded) that a cache implementation can
use to discover it has re-read a recently evicted item.
The Cache implemention needs to set cache_private values such that the MAX
over them is what it actually wants...
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 11:28:41 -04:00
Sage Weil
fc6e11fedf
os/bluestore: include buffer * in operator<<
...
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 11:28:41 -04:00
Sage Weil
fda7a08106
os/bluestore: cache: simplify lru trim
...
Everything in the LRU is clean.
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 11:28:41 -04:00
Sage Weil
ecc168fca3
os/bluestore: make Cache implementation configurable
...
For now we only do "lru" (LRUCache).
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 11:28:41 -04:00
Sage Weil
ba0a7c4027
os/bluestore: cache: define 'empty' buffer
...
This is a buffer with no data. It's a placeholder that is there to be used
by cache replacement algorithms like 2Q and MQ that needs history for
trimmed buffers.
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 11:28:40 -04:00
Sage Weil
7d9629c07e
os/bluestore: cache: keep writing buffers out of LRU
...
Don't bother putting a writing buffer in the LRU until it is clean (and
trimmable). Otherwise, we end up with writing items near the end of the
LRU that we have to iterate over on every trim() invocation.
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 11:28:40 -04:00
Sage Weil
b55255d23e
os/bluestore: clean up Cache::trim
...
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 11:28:40 -04:00
Sage Weil
94648e2bd5
os/bluestore: cache: control insert point of new onodes
...
Not used yet.
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 11:28:40 -04:00
Sage Weil
f45e4a7d6d
os/bluestore: cache: control insertion point of new buffers
...
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 11:28:40 -04:00
Sage Weil
3c3dcc63d8
os/bluestore: make buffer lru private
...
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 11:28:40 -04:00
Sage Weil
5f0bb6de23
os/bluestore: make onode lru private
...
Add cache->onode_lru.push_back(*po->second). Make LRU private.
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 11:28:40 -04:00
Sage Weil
2f6546dd43
os/bluestore: fix locking for _dump_blob_map
...
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 11:28:40 -04:00
Kefu Chai
4d3de44385
cmake: use ${CEPH_SHARED} when adding libradosstriper
...
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-06-22 23:21:46 +08:00
Sage Weil
db70056844
Merge pull request #9827 from liewegas/wip-bluestore-invalidate
...
os/bluestore: discard unreferenced buffers as they are overwritten
Reviewed-by: Igor Fedotov <ifedotov@mirantis.com>
2016-06-22 10:56:02 -04:00
Sage Weil
90ea1a8d13
Merge pull request #9868 from liewegas/wip-bluestore-lba
...
include/small_encoding: fix lba encoding with many low zeros
Reviewed-by: Igor Fedotov <ifedotov@mirantis.com>
2016-06-22 10:55:19 -04:00
Jason Dillaman
dcf26b00db
Merge pull request #9863 from trociny/fixup-comp-warn
...
test: fix compilation warnings
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-06-22 10:43:41 -04:00
Kefu Chai
4e911c8c8b
Merge pull request #9821 from dx9/wip-ac-alpine
...
configure.ac: add --with-reentrant-strsignal and --with-thread-safe-r…
Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-06-22 22:42:46 +08:00
Sage Weil
73796fe0a9
os/bluestore: discard unreferenced buffers as they are overwritten
...
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 10:30:27 -04:00
Sage Weil
3c8c882c31
include/small_encoding: fix lba encoding with many low zeros
...
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 10:28:51 -04:00
Haomai Wang
86f76f96df
msg/async: recover lock to continue later
...
Signed-off-by: Haomai Wang <haomai@xsky.com>
2016-06-22 22:26:46 +08:00
Sage Weil
6dd0a8dcd9
Merge pull request #9865 from liewegas/wip-bluestore-encoding
...
os/bluestore: fix blob_t encoding test cases, and clean up initialization
Reviewed-by: Igor Fedotov <ifedotov@mirantis.com>
2016-06-22 10:19:18 -04:00
John Coyle
6b8ff0c61c
configure.ac: add --with-reentrant-strsignal and --with-thread-safe-res-query options for Alpine support
...
Signed-off-by: John Coyle <dx9err@gmail.com>
2016-06-22 10:15:57 -04:00
Mykola Golub
64b9246b7e
test: fix compilation warnings
...
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-06-22 16:41:06 +03:00
Sage Weil
a7749eda96
os/bluestore/bluestore_types: fix blob initializers, test instances
...
- initialize members in c++11 style
- drop pextent ctor
- fix up test instances
- make csum_order default to 0, so it matches the
CSUM_NONE decoding logic.
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 09:23:31 -04:00
Sage Weil
0e4008f72e
os/bluestore/bluestore_types: drop unused var
...
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-22 08:41:05 -04:00