From: Kefu Chai Date: Mon, 22 Oct 2018 14:33:08 +0000 (+0800) Subject: Merge pull request #23103 from ifed01/wip-ifed-bluefs-migrate X-Git-Tag: v14.1.0~1131 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4af71e7c002effa01a1c2d14cad41e270101a7b3;p=ceph.git Merge pull request #23103 from ifed01/wip-ifed-bluefs-migrate os/bluestore: allow ceph-bluestore-tool to coalesce, add and migrate BlueFS backing volumes Reviewed-by: Sage Weil --- 4af71e7c002effa01a1c2d14cad41e270101a7b3 diff --cc src/os/bluestore/BlueFS.h index f27c2f3af299,9043634c8c99..3f555c2a4980 --- a/src/os/bluestore/BlueFS.h +++ b/src/os/bluestore/BlueFS.h @@@ -273,9 -275,12 +275,12 @@@ private int _allocate(uint8_t bdev, uint64_t len, bluefs_fnode_t* node); + int _allocate_without_fallback(uint8_t id, uint64_t len, + PExtentVector* extents); + int _flush_range(FileWriter *h, uint64_t offset, uint64_t length); int _flush(FileWriter *h, bool force); - int _fsync(FileWriter *h, std::unique_lock& l); + int _fsync(FileWriter *h, std::unique_lock& l); #ifdef HAVE_LIBAIO void _claim_completed_aios(FileWriter *h, list *ls); @@@ -287,10 -292,24 +292,24 @@@ uint64_t jump_to = 0); uint64_t _estimate_log_size(); bool _should_compact_log(); - void _compact_log_dump_metadata(bluefs_transaction_t *t); + + enum { + REMOVE_DB = 1, + REMOVE_WAL = 2, + RENAME_SLOW2DB = 4, + RENAME_DB2SLOW = 8, + }; + void _compact_log_dump_metadata(bluefs_transaction_t *t, + int flags); void _compact_log_sync(); - void _compact_log_async(std::unique_lock& l); + void _compact_log_async(std::unique_lock& l); + void _rewrite_log_sync(bool allocate_with_fallback, + int super_dev, + int log_dev, + int new_log_dev, + int flags); + //void _aio_finish(void *priv); void _flush_bdev_safely(FileWriter *h);