X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fos%2Fbluestore%2FBlueFS.h;h=fa727715ca6a15111dbe9acf852ea378261bdb23;hb=1911f103e16ae0d04db10fb41db8217ef4c320d3;hp=8045f39c44963fa4e343195f32cdbf5c08e4a619;hpb=78f773100ed5d2ebc9d99e65a3d7e3a6f541a97e;p=ceph.git diff --git a/ceph/src/os/bluestore/BlueFS.h b/ceph/src/os/bluestore/BlueFS.h index 8045f39c4..fa727715c 100644 --- a/ceph/src/os/bluestore/BlueFS.h +++ b/ceph/src/os/bluestore/BlueFS.h @@ -341,7 +341,9 @@ private: FileRef _get_file(uint64_t ino); void _drop_link(FileRef f); - int _get_slow_device_id() { return bdev[BDEV_SLOW] ? BDEV_SLOW : BDEV_DB; } + unsigned _get_slow_device_id() { + return bdev[BDEV_SLOW] ? BDEV_SLOW : BDEV_DB; + } const char* get_device_name(unsigned id); int _expand_slow_device(uint64_t min_size, PExtentVector& extents); int _allocate(uint8_t bdev, uint64_t len, @@ -431,7 +433,8 @@ private: return 4096; } - void _add_block_extent(unsigned bdev, uint64_t offset, uint64_t len); + void _add_block_extent(unsigned bdev, uint64_t offset, uint64_t len, + bool skip=false); public: BlueFS(CephContext* cct); @@ -441,7 +444,7 @@ public: int mkfs(uuid_d osd_uuid, const bluefs_layout_t& layout); int mount(); int maybe_verify_layout(const bluefs_layout_t& layout) const; - void umount(); + void umount(bool avoid_compact = false); int prepare_new_device(int id, const bluefs_layout_t& layout); int log_dump(); @@ -512,7 +515,7 @@ public: void compact_log(); /// sync any uncommitted state to disk - void sync_metadata(); + void sync_metadata(bool avoid_compact); void set_slow_device_expander(BlueFSDeviceExpander* a) { slow_dev_expander = a; @@ -534,9 +537,10 @@ public: uint64_t get_block_device_size(unsigned bdev); /// gift more block space - void add_block_extent(unsigned bdev, uint64_t offset, uint64_t len) { + void add_block_extent(unsigned bdev, uint64_t offset, uint64_t len, + bool skip=false) { std::unique_lock l(lock); - _add_block_extent(bdev, offset, len); + _add_block_extent(bdev, offset, len, skip); int r = _flush_and_sync_log(l); ceph_assert(r == 0); }