]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
9 years agoos/bluestore: compress on write
Sage Weil [Mon, 23 May 2016 19:04:46 +0000 (15:04 -0400)]
os/bluestore: compress on write

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: do not partially deallocate compressed blobs
Sage Weil [Mon, 23 May 2016 19:04:31 +0000 (15:04 -0400)]
os/bluestore: do not partially deallocate compressed blobs

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: _do_write_big: limit size of blobs based on compression mode
Sage Weil [Mon, 23 May 2016 19:04:11 +0000 (15:04 -0400)]
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>
9 years agoos/bluestore: track new compression config options
Sage Weil [Mon, 23 May 2016 19:03:18 +0000 (15:03 -0400)]
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>
9 years agoos/bluestore/bluestore_types: add length to the compression_header_t
Sage Weil [Mon, 23 May 2016 19:01:40 +0000 (15:01 -0400)]
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>
9 years agoos/bluestore: fix BufferSpace::read()
Sage Weil [Mon, 23 May 2016 18:59:18 +0000 (14:59 -0400)]
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>
9 years agolibrados: add COMPRESSIBLE and INCOMPRESSIBLE alloc hints
Sage Weil [Fri, 20 May 2016 18:26:33 +0000 (14:26 -0400)]
librados: add COMPRESSIBLE and INCOMPRESSIBLE alloc hints

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agocompressor: add a get_type() method to Compressor interface
Sage Weil [Fri, 20 May 2016 18:18:52 +0000 (14:18 -0400)]
compressor: add a get_type() method to Compressor interface

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: fix _do_read cached vs read result assembly
Sage Weil [Mon, 23 May 2016 19:00:37 +0000 (15:00 -0400)]
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>
9 years agoos/bluestore: fix _do_read read out of buffer cache
Sage Weil [Mon, 23 May 2016 18:59:36 +0000 (14:59 -0400)]
os/bluestore: fix _do_read read out of buffer cache

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: fix up _set_csum helper
Sage Weil [Fri, 20 May 2016 18:23:55 +0000 (14:23 -0400)]
os/bluestore: fix up _set_csum helper

- make it thread-safe
- call during mount

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/store_test: Fixes dump_mismatch_bl to avoid assert on lengths mismatch. Starts...
Igor Fedotov [Fri, 20 May 2016 14:59:37 +0000 (17:59 +0300)]
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>
9 years agoos/bluestore: use bdev_block_size instead of min_alloc_size for allocators
Sage Weil [Fri, 20 May 2016 19:25:39 +0000 (15:25 -0400)]
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>
9 years agoos/bluestore: min_alloc_size options for different media types
Ramesh Chander [Fri, 20 May 2016 17:05:15 +0000 (10:05 -0700)]
os/bluestore: min_alloc_size options for different media types

Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
9 years agoos/bluestore: Fixes duplicate blob move when cloning
Igor Fedotov [Fri, 20 May 2016 16:41:34 +0000 (19:41 +0300)]
os/bluestore: Fixes duplicate blob move when cloning

Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
9 years agoos/bluestore: avoid passing overlapping allocated/released sets to fm
Sage Weil [Fri, 20 May 2016 14:30:43 +0000 (10:30 -0400)]
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>
9 years agoos/bluestore/BitmapFreelistManager: drop newline on hex dumps
Sage Weil [Fri, 20 May 2016 14:29:04 +0000 (10:29 -0400)]
os/bluestore/BitmapFreelistManager: drop newline on hex dumps

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agobuffer: add no-newline hexdump option
Sage Weil [Fri, 20 May 2016 14:28:52 +0000 (10:28 -0400)]
buffer: add no-newline hexdump option

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/BitmapFreelistManager: use hex
Sage Weil [Fri, 20 May 2016 14:08:28 +0000 (10:08 -0400)]
os/bluestore/BitmapFreelistManager: use hex

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: drop warning
Sage Weil [Fri, 20 May 2016 13:59:05 +0000 (09:59 -0400)]
os/bluestore: drop warning

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoceph_test_objectstore: fix BufferCacheReadTest
Sage Weil [Fri, 20 May 2016 13:11:10 +0000 (09:11 -0400)]
ceph_test_objectstore: fix BufferCacheReadTest

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: _dump_onode crcs in hex
Sage Weil [Thu, 19 May 2016 20:29:19 +0000 (16:29 -0400)]
os/bluestore: _dump_onode crcs in hex

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: remove obsolete tail cache
Sage Weil [Thu, 19 May 2016 16:54:39 +0000 (12:54 -0400)]
os/bluestore: remove obsolete tail cache

The buffer cache will cover this in a much more general way.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: Fixes improper length calculation in BufferSpace::read + adds simplifie...
Igor Fedotov [Thu, 19 May 2016 14:08:41 +0000 (17:08 +0300)]
os/bluestore: Fixes improper length calculation in BufferSpace::read + adds simplified test case to highlight an issue for append to existing blob

Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
9 years agoos/bluestore: drop min_alloc_size locals
Sage Weil [Thu, 19 May 2016 16:12:17 +0000 (12:12 -0400)]
os/bluestore: drop min_alloc_size locals

We have this in the class, now.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: fix min_alloc_size global
Sage Weil [Fri, 20 May 2016 13:09:35 +0000 (09:09 -0400)]
os/bluestore: fix min_alloc_size global

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: release partial extents
Sage Weil [Thu, 19 May 2016 16:00:08 +0000 (12:00 -0400)]
os/bluestore: release partial extents

Use the blob put_ref helper so that we can deallocate blobs partially
(instead of always waiting until they are completely unused).

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: only write into a blob region that is allocated
Sage Weil [Thu, 19 May 2016 15:58:54 +0000 (11:58 -0400)]
os/bluestore: only write into a blob region that is allocated

We're only worried about direct writes and wal overwrites; the other write
paths are to freshly allocated blobs.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/bluestore_types: blob_t: add tracking for released extents
Sage Weil [Thu, 19 May 2016 15:57:43 +0000 (11:57 -0400)]
os/bluestore/bluestore_types: blob_t: add tracking for released extents

We reference count which parts of the blob are used (by lextents), but
currently we only release our space back to the system when all references
go away.  That is a problem if the blob is large (say, 4MB), and we, say,
truncate off most (but not all) of it.

Unfortunately, we can't simply deallocate anything that doesn't have a
reference, because the logical refs are on byte boundaries, and allocation
happens in larger units (min_alloc_size).  A one byte logical punch_hole
might be responsible for the release of a larger block of storage.

To resolve this, we keep track of which portions of the blob have been
released by poisoning the offset in the extents vector.  We expect that
this vector will be almost always short, so we do not bother with a
indexed structure, since iterating a blob offset to determine if it is
still allocated is likely faster.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/bluestore_types: add poison offset to pextent_t
Sage Weil [Thu, 19 May 2016 15:13:36 +0000 (11:13 -0400)]
os/bluestore/bluestore_types: add poison offset to pextent_t

This is a "magic" offset that we can use to indicate an invalid extent
(vs, say, an extent at offset 0 that might clobber real data if it were
used).

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: remove dead _txc_release
Sage Weil [Thu, 19 May 2016 12:52:23 +0000 (08:52 -0400)]
os/bluestore: remove dead _txc_release

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: only direct write into unused blob space
Sage Weil [Thu, 19 May 2016 12:47:44 +0000 (08:47 -0400)]
os/bluestore: only direct write into unused blob space

We can only do a direct write into an already-allocated blob once, if that
range hasn't yet been used.  Once it has been used, it is much to complex
to keep track of when all references to it have committed to disk before
reusing it, so we don't try to handle that case at all.

Since the range has never been used, we can assert that there are no
references to it.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: mark used range on partial blob writes
Sage Weil [Thu, 19 May 2016 12:45:00 +0000 (08:45 -0400)]
os/bluestore: mark used range on partial blob writes

- writing into unreferenced blob space
- wal blob writes

both need to update the blob used map.  The full blob writes generates
blobs that are always full, so no change is needed there.  New partial
blob creations need to indicate which parts aren't yet used.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/bluestore_types: add blob_t unused
Sage Weil [Thu, 19 May 2016 12:43:49 +0000 (08:43 -0400)]
os/bluestore/bluestore_types: add blob_t unused

Keep track of which ranges of this blob have *never* been used.  We do
this as a negative so that the common case of a fully-written blob is an
empty set.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agounittest_bluestore_types: benchmark different csum methods
Sage Weil [Thu, 19 May 2016 11:55:03 +0000 (07:55 -0400)]
unittest_bluestore_types: benchmark different csum methods

crc32c wins on my laptop.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agounittest_bluestore_types: run csum tests on all algorithms
Sage Weil [Thu, 19 May 2016 11:40:33 +0000 (07:40 -0400)]
unittest_bluestore_types: run csum tests on all algorithms

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/bluestore_types: blob_t: add xxhash64
Sage Weil [Thu, 19 May 2016 11:40:13 +0000 (07:40 -0400)]
os/bluestore/bluestore_types: blob_t: add xxhash64

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agocommon/Checksummer: add xxhash64
Sage Weil [Thu, 19 May 2016 11:19:36 +0000 (07:19 -0400)]
common/Checksummer: add xxhash64

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: drop old Checksummer
Sage Weil [Thu, 19 May 2016 10:55:43 +0000 (06:55 -0400)]
os/bluestore: drop old Checksummer

blob_t uses it directly via the static methods.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: use blob_t csum methods
Sage Weil [Thu, 19 May 2016 10:53:29 +0000 (06:53 -0400)]
os/bluestore: use blob_t csum methods

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/bluestore_types: simpler {calc,verify}_csum methods
Sage Weil [Thu, 19 May 2016 10:51:09 +0000 (06:51 -0400)]
os/bluestore/bluestore_types: simpler {calc,verify}_csum methods

This keeps the CSUM_* definitions local to blob_t, and avoids passing
arguments around.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: defer csum calcuations sometimes
Sage Weil [Thu, 19 May 2016 10:25:23 +0000 (06:25 -0400)]
os/bluestore: defer csum calcuations sometimes

When we are doing a partial chunk overwrite, we need to defer the csum_data
update.  Otherwise, another write in the same transaction might need to
read part of the chunk, not find the data in the buffer cache, read it
from disk, and fail the csum check.

This patch defers the calculation until after we've build the transaction
and are about to commit to the kv store.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agodoc/dev/bluestore: update based on Igor's feedback
Sage Weil [Thu, 19 May 2016 10:25:43 +0000 (06:25 -0400)]
doc/dev/bluestore: update based on Igor's feedback

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: Fixes some issues when using Buffer Cache from _do_read and improves...
Igor Fedotov [Tue, 17 May 2016 15:22:15 +0000 (18:22 +0300)]
os/bluestore: Fixes some issues when using Buffer Cache from _do_read and improves test coverage

Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
9 years agoos/bluestore: Fixes invalid assert in Buffer::truncate
Igor Fedotov [Tue, 17 May 2016 14:58:11 +0000 (17:58 +0300)]
os/bluestore: Fixes invalid assert in  Buffer::truncate

Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
9 years agotest/objectstore: Adds trivial test case to verify buffer cache use in bluestore
Igor Fedotov [Mon, 16 May 2016 17:55:55 +0000 (20:55 +0300)]
test/objectstore: Adds trivial test case to verify buffer cache use in bluestore

Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
9 years agoAdds cached buffer processing for _do_read
Igor Fedotov [Mon, 16 May 2016 16:53:37 +0000 (19:53 +0300)]
Adds cached buffer processing for _do_read

Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
9 years agoos/bluestore: add a very simple (incomplete) buffer cache
Sage Weil [Thu, 19 May 2016 10:23:39 +0000 (06:23 -0400)]
os/bluestore: add a very simple (incomplete) buffer cache

Attach it to each onode.

There is no trimming yet.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: make tail cache a bit smarter
Sage Weil [Mon, 16 May 2016 00:30:44 +0000 (20:30 -0400)]
os/bluestore: make tail cache a bit smarter

This is really a stop-gap.  Since we are doing reads in the pre-commit
write path, we need to have some sort of buffer cache so that a sequence
of writes in the same transaction can remain coherent (the second write
must "read" the first write in order to fill out the chunk).

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: dump tail_bl state in _dump_onode
Sage Weil [Mon, 16 May 2016 00:25:54 +0000 (20:25 -0400)]
os/bluestore: dump tail_bl state in _dump_onode

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: Adds lacking methods in bluestore_compression_header_t to fix encoder...
Igor Fedotov [Mon, 16 May 2016 11:27:24 +0000 (14:27 +0300)]
os/bluestore: Adds lacking methods in bluestore_compression_header_t to fix encoder test build

Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
9 years agoos/bluestore: add decompressor call to read path
Igor Fedotov [Fri, 13 May 2016 15:18:12 +0000 (18:18 +0300)]
os/bluestore: add decompressor call to read path

Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
9 years agoos/bluestore/bluestore_types: add bluestore_compression_header_t
Igor Fedotov [Sat, 14 May 2016 12:53:59 +0000 (08:53 -0400)]
os/bluestore/bluestore_types: add bluestore_compression_header_t

Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
9 years agocompressor: Refactor to allow bufferlist::iterator as an input
Igor Fedotov [Fri, 13 May 2016 15:16:47 +0000 (18:16 +0300)]
compressor: Refactor to allow bufferlist::iterator as an input

Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
9 years agoos/bluestore: new write path
Sage Weil [Sat, 14 May 2016 12:48:47 +0000 (08:48 -0400)]
os/bluestore: new write path

- simplified wal_op_t.  we still have overlays in there, although that
  might need to get removed soon too.
- init_csum cleanup
- totally new write path

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: verify blob ref_maps during fsck
Sage Weil [Sat, 14 May 2016 12:37:16 +0000 (08:37 -0400)]
os/bluestore: verify blob ref_maps during fsck

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: return EIO on csum verification error
Sage Weil [Sat, 14 May 2016 12:40:54 +0000 (08:40 -0400)]
os/bluestore: return EIO on csum verification error

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: simplify _verify_csum
Sage Weil [Sat, 14 May 2016 12:39:45 +0000 (08:39 -0400)]
os/bluestore: simplify _verify_csum

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: cleanup _read_extent_sparse
Sage Weil [Sat, 14 May 2016 12:39:34 +0000 (08:39 -0400)]
os/bluestore: cleanup _read_extent_sparse

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluetores: fix checksum verification
Igor Fedotov [Sat, 14 May 2016 12:45:47 +0000 (08:45 -0400)]
os/bluetores: fix checksum verification

Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
9 years agoos/bluestore: read patch code cleanup
Igor Fedotov [Thu, 12 May 2016 13:26:10 +0000 (16:26 +0300)]
os/bluestore: read patch code cleanup

Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
9 years agoos/bluestore: replace _do_read with ExtentManager version
Igor Fedotov [Thu, 12 May 2016 21:48:59 +0000 (17:48 -0400)]
os/bluestore: replace _do_read with ExtentManager version

Replaces _do_read with he corresponding code from ExtentManager to support csum verification & decompression.

Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
9 years agodoc/dev/bluestore: write path notes
Sage Weil [Sat, 14 May 2016 12:23:15 +0000 (08:23 -0400)]
doc/dev/bluestore: write path notes

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoceph_test_objectstore: new test SmallBlockWrites
Sage Weil [Fri, 13 May 2016 21:20:44 +0000 (17:20 -0400)]
ceph_test_objectstore: new test SmallBlockWrites

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoceph_test_objectstore: add BigWriteBigZero test
Sage Weil [Fri, 13 May 2016 21:41:17 +0000 (17:41 -0400)]
ceph_test_objectstore: add BigWriteBigZero test

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoceph_test_objectstore: expand SimpleObjectTest a bit
Sage Weil [Fri, 13 May 2016 16:51:28 +0000 (12:51 -0400)]
ceph_test_objectstore: expand SimpleObjectTest a bit

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: define min_alloc_size globally
Sage Weil [Thu, 12 May 2016 17:31:09 +0000 (13:31 -0400)]
os/bluestore: define min_alloc_size globally

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: define block_size, block_mask, block_order globally
Sage Weil [Thu, 12 May 2016 17:30:25 +0000 (13:30 -0400)]
os/bluestore: define block_size, block_mask, block_order globally

These don't change, no need to declare them all over the place.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: change block_size -> chunk_size for _pad_zero* methods
Sage Weil [Thu, 12 May 2016 17:28:09 +0000 (13:28 -0400)]
os/bluestore: change block_size -> chunk_size for _pad_zero* methods

The granularity is not the same as block_size.. depends on what the caller
wants.  Use a more generic name.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: use _txc_finalize_kv for wal allocation updates
Sage Weil [Wed, 11 May 2016 19:45:45 +0000 (15:45 -0400)]
os/bluestore: use _txc_finalize_kv for wal allocation updates

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: pass txc to _do_wal_op
Sage Weil [Wed, 11 May 2016 19:30:14 +0000 (15:30 -0400)]
os/bluestore: pass txc to _do_wal_op

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: rename _txc_update_fm -> _txc_finalize_kv
Sage Weil [Wed, 11 May 2016 19:11:13 +0000 (15:11 -0400)]
os/bluestore: rename _txc_update_fm -> _txc_finalize_kv

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/BlueStore: break _txc_finalize into _txc_write_nodes
Sage Weil [Wed, 11 May 2016 19:06:21 +0000 (15:06 -0400)]
os/bluestore/BlueStore: break _txc_finalize into _txc_write_nodes

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: dump csums in _dump_onode/bnode
Sage Weil [Sat, 14 May 2016 12:32:22 +0000 (08:32 -0400)]
os/bluestore: dump csums in _dump_onode/bnode

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: _dump_bnode
Sage Weil [Wed, 11 May 2016 20:21:48 +0000 (16:21 -0400)]
os/bluestore: _dump_bnode

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/bluestore_types: nicer operator<< for blob_t
Sage Weil [Sat, 14 May 2016 12:31:24 +0000 (08:31 -0400)]
os/bluestore/bluestore_types: nicer operator<< for blob_t

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/bluestore_types: add onode_t::compress_extent_map()
Sage Weil [Fri, 13 May 2016 21:07:10 +0000 (17:07 -0400)]
os/bluestore/bluestore_types: add onode_t::compress_extent_map()

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/bluestore_types: blob_t convenience methods
Sage Weil [Sat, 14 May 2016 12:29:42 +0000 (08:29 -0400)]
os/bluestore/bluestore_types: blob_t convenience methods

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/bluestore_types: FLAG_IMMUTABLE -> FLAG_MUTABLE
Sage Weil [Wed, 11 May 2016 20:23:50 +0000 (16:23 -0400)]
os/bluestore/bluestore_types: FLAG_IMMUTABLE -> FLAG_MUTABLE

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/bluestore_types: blob_t::is_unreferenced() method
Sage Weil [Wed, 11 May 2016 20:24:36 +0000 (16:24 -0400)]
os/bluestore/bluestore_types: blob_t::is_unreferenced() method

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/bluestore_types: add blob_t::has_any_lextents
Sage Weil [Tue, 10 May 2016 18:49:15 +0000 (14:49 -0400)]
os/bluestore/bluestore_types: add blob_t::has_any_lextents

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/bluestore_types: test {find,seek}_lextents
Sage Weil [Tue, 10 May 2016 18:48:40 +0000 (14:48 -0400)]
os/bluestore/bluestore_types: test {find,seek}_lextents

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/bluestore_types: blob_t csum additions
Sage Weil [Tue, 10 May 2016 17:26:30 +0000 (13:26 -0400)]
os/bluestore/bluestore_types: blob_t csum additions

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: blob_t::init_csum() helper
Sage Weil [Tue, 10 May 2016 00:34:53 +0000 (20:34 -0400)]
os/bluestore: blob_t::init_csum() helper

Set up the checksum parameters and size csum_data appropriately.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: track csum config options
Sage Weil [Wed, 11 May 2016 20:26:15 +0000 (16:26 -0400)]
os/bluestore: track csum config options

Use global csum_type member to drive new checksum calcuations.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: instantiate a Checksummer
Sage Weil [Tue, 10 May 2016 00:34:26 +0000 (20:34 -0400)]
os/bluestore: instantiate a Checksummer

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: prototype Checksummer
Sage Weil [Tue, 10 May 2016 00:34:13 +0000 (20:34 -0400)]
os/bluestore: prototype Checksummer

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agobuffer: add buffer::list::iterator::get_ptr_and_advance
Sage Weil [Fri, 6 May 2016 21:36:01 +0000 (17:36 -0400)]
buffer: add buffer::list::iterator::get_ptr_and_advance

Efficiently iterate over buffers in a list, via an iterator.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/bluestore_types: extent_ref_map_t::intersects
Sage Weil [Mon, 9 May 2016 21:26:25 +0000 (17:26 -0400)]
os/bluestore/bluestore_types: extent_ref_map_t::intersects

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/bluestore_types: change extent_ref_map_t
Sage Weil [Mon, 9 May 2016 21:21:30 +0000 (17:21 -0400)]
os/bluestore/bluestore_types: change extent_ref_map_t

- no more add, or weird add vs get assumptions

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/bluestore_types: drop num_refs from blob_t
Sage Weil [Wed, 11 May 2016 20:23:23 +0000 (16:23 -0400)]
os/bluestore/bluestore_types: drop num_refs from blob_t

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/bluestore_types: onode_t::punch_hole()
Sage Weil [Mon, 9 May 2016 19:27:00 +0000 (15:27 -0400)]
os/bluestore/bluestore_types: onode_t::punch_hole()

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: disable clone cow until it works again
Sage Weil [Mon, 9 May 2016 16:59:19 +0000 (12:59 -0400)]
os/bluestore: disable clone cow until it works again

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: fix bad iterator deref in _do_zero_tail_extent
Sage Weil [Mon, 9 May 2016 14:36:14 +0000 (10:36 -0400)]
os/bluestore: fix bad iterator deref in _do_zero_tail_extent

The extent_map may be empty, or not contain anything at this offset.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: rename enode -> bnode
Sage Weil [Fri, 6 May 2016 18:41:54 +0000 (14:41 -0400)]
os/bluestore: rename enode -> bnode

We're not refcounting extents anymore; we're storing shared blobs.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: use hex almost everywhere
Sage Weil [Fri, 6 May 2016 18:36:33 +0000 (14:36 -0400)]
os/bluestore: use hex almost everywhere

It's like going metric, but even better!

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: remove block_map from onode
Sage Weil [Fri, 6 May 2016 18:36:04 +0000 (14:36 -0400)]
os/bluestore: remove block_map from onode

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: convert io path to extent_map
Sage Weil [Fri, 6 May 2016 18:35:49 +0000 (14:35 -0400)]
os/bluestore: convert io path to extent_map

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: add get_blob_ptr helpers
Sage Weil [Fri, 6 May 2016 18:30:45 +0000 (14:30 -0400)]
os/bluestore: add get_blob_ptr helpers

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/KernelDevice: print extents in hex
Sage Weil [Thu, 5 May 2016 17:04:06 +0000 (13:04 -0400)]
os/bluestore/KernelDevice: print extents in hex

Signed-off-by: Sage Weil <sage@redhat.com>