Commit Graph

55032 Commits

Author SHA1 Message Date
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
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
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
John Spray
f222afdbfe Merge pull request #9813 from jcsp/wip-kernel-doc
doc/cephfs: add advice about kernel versions
2016-06-22 09:08:49 +01:00
Mykola Golub
f3e0d244c9 Merge pull request #9823 from dillaman/wip-16362
rbd-mirror: keep events from different epochs independent

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2016-06-22 09:50:46 +03:00
Josh Durgin
f7fc9857fc Merge branch 'wip-dmick-install-deps-master'
install-deps.sh: use mk-build-deps instead of processing control

Reviewed-by: Erwan Velu <erwan@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2016-06-21 16:38:58 -07:00
Dan Mick
99bca09b8d install-deps.sh: use mk-build-deps instead of processing control
mk-build-deps is designed to handle installing build dependencies;
use that instead, so '|' indications are handled properly.

Signed-off-by: Dan Mick <dan.mick@redhat.com>
2016-06-21 16:36:56 -07:00
Casey Bodley
9f15f032b2 Merge pull request #9791 from ceph/wip-cmake-compile-flags
cmake: Wip cmake compile flags

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2016-06-21 15:22:44 -04:00
Casey Bodley
8581857d96 Merge pull request #9481 from yehudasa/wip-rgw-hold-lease-1
rgw: stop bucket lease only after draining object sync operations

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2016-06-21 15:21:33 -04:00
Ali Maredia
ab08edda9c cmake: CMAKE_BUILD_TYPE defaulted to RelWithDebInfo
Default build type is RelWithDebInfo unless
CMAKE_BUILD_TYPE is specified when running the
`cmake` command.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2016-06-21 15:21:12 -04:00
Mykola Golub
9eaf30d71e Merge pull request #9066 from yangdongsheng/rbd_bench
rbd: introduce a simple bench for read

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2016-06-21 21:59:28 +03:00
Ali Maredia
6f3e3cf634 cmake: eliminate FORTIFY_SOURCE warnings
"-werr" was added to CHECK_C_COMPILER_FLAG to
make sure FORTIFY_SOURCE is only turned on if
the flag generates no warnings.

Added "-U_FORTIFY_SOURCE" to CMAKE_C_FLAGS to
mimic PR #9761.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2016-06-21 13:44:47 -04:00
Sage Weil
09022cbef5 Merge pull request #9728 from liewegas/wip-bluestore-encoding
os/bluestore: space efficient int encoding

Reviewed-by: Igor Fedotov <ifedotov@mirantis.com>
2016-06-21 13:30:53 -04:00
Jason Dillaman
3a5b491ec6 rbd-mirror: keep events from different epochs independent
Fixes: http://tracker.ceph.com/issues/16362
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-06-21 13:06:34 -04:00
Sage Weil
049309cc0d os/bluestore/bluestore_types: delta encode for ref_map offsets
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-21 12:51:02 -04:00
Sage Weil
dc245aef1e os/bluestore: make blob csum info encoding conditional
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-21 12:51:02 -04:00
Sage Weil
be6d887ccc os/bluestore: use FLAG_CSUM to indicate if checksums are present
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-21 12:51:01 -04:00
Sage Weil
4d84cfe54a os/bluestore: fsck: print intervals in hex
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-21 12:51:01 -04:00
Sage Weil
3f7c068cf3 os/bluestore: use varint for pextent count
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-21 12:50:34 -04:00
Sage Weil
3fcb8ac063 os/bluestore: varint or lba encode pextent, lextent, ref_map, onode
Certainly not done here, but this is a start.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-21 12:50:33 -04:00
Sage Weil
ed0dd72c4e include/small_encoding: small encode/decode helpers
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-21 12:50:33 -04:00
Mykola Golub
d404e36a9e Merge pull request #9819 from dillaman/wip-16363
librbd: fix lockdep issue when duplicate event detected

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2016-06-21 19:50:28 +03:00
Mykola Golub
1169da520e Merge pull request #9816 from dillaman/wip-16198
librbd: potential race when replaying journal ops

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2016-06-21 19:49:37 +03:00
Mykola Golub
cb15748592 Merge pull request #9788 from dillaman/wip-16230
rbd-mirror: potential race condition accessing local image journal

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2016-06-21 19:48:47 +03:00
John Spray
340689e32f Merge pull request #9787 from batrick/mds-rename-enotempty
mds: improve comments for ENOTEMPTY checks

Reviewed-by: John Spray <john.spray@redhat.com>
2016-06-21 15:47:22 +01:00
Sage Weil
48a849f188 Merge pull request #9840 from xiexingguo/xxg-wip-fix-bmap-fm
os/bluestore: minor improvements for bitmap-freelist-manager

Reviewed-by: Sage Weil <sage@redhat.com>
2016-06-21 10:26:06 -04:00
Sage Weil
45a9efdd18 Merge pull request #9815 from xiexingguo/xxg-wip-fix-blue-cache
os/bluestore: cache relevant cleanups

Reviewed-by: Igor Fedotov <ifedotov@mirantis.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2016-06-21 09:55:01 -04:00
xie xingguo
401af35fbd os/bluestore: make bytes_per_key a global member
So we don't have to figure it out everywhere.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-06-21 21:44:15 +08:00