{
int r = -ENOSPC;
if (slow_dev_expander) {
- int id = _get_slow_device_id();
+ auto id = _get_slow_device_id();
auto min_alloc_size = alloc_size[id];
- ceph_assert(id <= (int)alloc.size() && alloc[id]);
+ ceph_assert(id <= alloc.size() && alloc[id]);
auto min_need = round_up_to(need, min_alloc_size);
need = std::max(need,
slow_dev_expander->get_recommended_expansion_delta(
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,