Commit Graph

54137 Commits

Author SHA1 Message Date
Kefu Chai
f67ebef597 cmake: compile and install ceph-bluefs-tool
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-06-01 23:49:45 +08:00
Kefu Chai
6df0bc8691 cmake: s/ceph_test_xattr_bench/ceph_xattr_bench/
to match with automake and packager

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-06-01 23:49:45 +08:00
Kefu Chai
81cd483936 cmake: rename ceph-psim to ceph_psim
to match with automake and packager

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-06-01 23:49:45 +08:00
Kefu Chai
b6da5c5135 cmake: fix bash_completion install path
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-06-01 23:49:45 +08:00
Sage Weil
1c2c6cc1d8 os/bluestore: fsck: check for dup overlay keys
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:50 -04:00
Sage Weil
380392fcec os/bluestore: fsck: use common helper to verify blobs and refs
The checks are the same (or should be--we had missed a few).

Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:50 -04:00
Sage Weil
cb7f0f75d3 os/bluestore: add FLAG_NOCACHE flag; do not cache unbuffered writes
Add a Buffer flag to mark that a buffer should not be cached once it is
stable.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:50 -04:00
Sage Weil
029ced9680 os/bluestore: do not use buffered bdev in write path
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:50 -04:00
Sage Weil
b6d7c97daf os/bluestore: do not rely on bdev buffered reads in read path
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:50 -04:00
Sage Weil
247bcdbbfd os/bluestore: no buffered write in wal path
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:50 -04:00
Sage Weil
7679407378 os/bluestore: populate buffer cache on read
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:50 -04:00
Sage Weil
74dd955728 os/bluestore: keep intrusive_list of WRITING buffers
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:50 -04:00
Sage Weil
6e5249a4be os/bluestore: simple per-collection lru for buffers
Size these using a global config.  This is only a starting point--we'll
obviously have to rework this to share memory across collections.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:50 -04:00
Sage Weil
63279896a0 os/bluestore: use bufferptr for csum_data
encode/decode of vector<char> is not optimized.  Bufferptr is a more
natural type here anyway.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:50 -04:00
Igor Fedotov
6cec4f388d ceph_test_objecstore: Adds a test case for compression stuff verification (incomplete)
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
2016-06-01 11:40:49 -04:00
Igor Fedotov
c307c0ffdd os/bluestore: Fixes configuration observation.
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
2016-06-01 11:40:49 -04:00
Igor Fedotov
8f8fd3a722 os/bluestore: Cosmetic fixes in bluestore logging
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
2016-06-01 11:40:49 -04:00
Igor Fedotov
e2f6a66ded os/bluestore: Enables cow for cloning at bluestore for store test
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
2016-06-01 11:40:49 -04:00
Igor Fedotov
c7ed3aa7a2 os/bluestore: Fixes Bnode serialization/deserialization and removes legacy Bnode::ref_map
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
2016-06-01 11:40:49 -04:00
Igor Fedotov
b0981b3391 ceph_test_objectstore: extends SimpleObjectTest with the case where write happens for neighboring csum blocks to verify for potential alignment issue
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
2016-06-01 11:40:49 -04:00
Igor Fedotov
5361cb887f os/bluestore: Removes legacy block_size retrieval
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
2016-06-01 11:40:49 -04:00
Sage Weil
326bb0f865 os/bluestore: use WriteContext and do_alloc_write for _do_write_small
Kill some mostly-duplicated code

Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:49 -04:00
Sage Weil
eb977e6ba3 os/bluestore: consolidate WriteContext items into a write_item
Also include b_off in there.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:49 -04:00
Sage Weil
3d49c2eb57 os/bluestore: avoid unnecessary write_onode calls
_wctx_finish callers always write the onode; we only need to worry about
our changes to the bnode.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:49 -04:00
Sage Weil
b0cabb78db os/bluestore: drop unused _pad_* methods
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:49 -04:00
Sage Weil
24578bc8f8 os/bluestore: drop unused _pad_zeros args
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:49 -04:00
Sage Weil
a9a5e63d99 os/bluestore: fix offset skew check
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:48 -04:00
Sage Weil
ea1a787c65 os/bluestore: ~0x -> ~
e.g., 0x432da000~1000 instead of 0x432da000~0x1000

I think it's sufficiently clear that the value after ~ should have the same
base as the first bit, and it's easier to read.  And less text.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:48 -04:00
Igor Fedotov
183db05a35 compressor: Extends decompressor interface to be able to provide compressed data length.
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
2016-06-01 11:40:48 -04:00
Sage Weil
fe6aaca1db os/bluestore: compress on write
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:48 -04:00
Sage Weil
502473a95c os/bluestore: do not partially deallocate compressed blobs
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:48 -04:00
Sage Weil
931264ecab os/bluestore: _do_write_big: limit size of blobs based on compression mode
We may want to compress in smaller chunks based on hints/policy.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:48 -04:00
Sage Weil
53b73328dd os/bluestore: track new compression config options
Class-wide Compressor, compression mode, and options.  For now these are
global, although later we'll do them per-Collection so they can be pool-
specific.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:48 -04:00
Sage Weil
a7c9c84eac os/bluestore/bluestore_types: add length to the compression_header_t
Snappy fails to decompress if there are extra zeros in the input buffer.
So, store the length explicitly in the header to avoid feeding them into
the decompressor.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:48 -04:00
Sage Weil
c4f1facaa5 os/bluestore: fix BufferSpace::read()
- we weren't reading from 'clean' buffers
- restructured loop a bit chasing another bug (but it ended up being
  in the caller)

Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:48 -04:00
Sage Weil
6977d28863 librados: add COMPRESSIBLE and INCOMPRESSIBLE alloc hints
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:48 -04:00
Sage Weil
9aec0a7a5a compressor: add a get_type() method to Compressor interface
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:47 -04:00
Sage Weil
53b699edda os/bluestore: fix _do_read cached vs read result assembly
We weren't handling the case of

 read block 0~300
 cache bloc 100~100

where the result is read(head) + cached + read(tail). Restructure the
loop to handle this.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:47 -04:00
Sage Weil
d315a21be9 os/bluestore: fix _do_read read out of buffer cache
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:47 -04:00
Sage Weil
32c6ba129d os/bluestore: fix up _set_csum helper
- make it thread-safe
- call during mount

Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:47 -04:00
Igor Fedotov
f4c8d845e6 os/store_test: Fixes dump_mismatch_bl to avoid assert on lengths mismatch. Starts using it for BufferCacheTest
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
2016-06-01 11:40:47 -04:00
Sage Weil
fb45f389de os/bluestore: use bdev_block_size instead of min_alloc_size for allocators
min_alloc_size is more dynamic; we just need the block size unit here.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:40:47 -04:00
Ramesh Chander
8185f2d356 os/bluestore: min_alloc_size options for different media types
Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
2016-06-01 11:40:47 -04:00
Igor Fedotov
6148e1e74a os/bluestore: Fixes duplicate blob move when cloning
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
2016-06-01 11:38:54 -04:00
Sage Weil
8b417f346a os/bluestore: avoid passing overlapping allocated/released sets to fm
BitmapFreelistManager doesn't like overlapping allocated+released sets
when the debug option is enabled, because it does a read to verify the
op is valid and that may not have been applied to the kv store yet.

This makes bluestore ObjectStore/StoreTest.SimpleCloneTest/2 pass with
bluestore_clone_cow = false and bluestore_freelist_type = bitmap.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:38:54 -04:00
Sage Weil
7c04c21574 os/bluestore/BitmapFreelistManager: drop newline on hex dumps
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:38:54 -04:00
Sage Weil
46522cf0d2 buffer: add no-newline hexdump option
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:38:53 -04:00
Sage Weil
7f6174e9d6 os/bluestore/BitmapFreelistManager: use hex
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:38:53 -04:00
Sage Weil
c97578070e os/bluestore: drop warning
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:38:53 -04:00
Sage Weil
0b80659a0f ceph_test_objectstore: fix BufferCacheReadTest
Signed-off-by: Sage Weil <sage@redhat.com>
2016-06-01 11:38:53 -04:00