mirror of
https://github.com/ceph/ceph
synced 2024-12-26 21:43:10 +00:00
Merge pull request #50468 from aclamk/wip-aclamk-harmonize-bluefs-log
os/bluestore: BlueFS: harmonize log read and writes modes
This commit is contained in:
commit
f826514091
@ -2219,13 +2219,16 @@ int64_t BlueFS::_read(
|
||||
<< std::hex << x_off << "~" << l << std::dec
|
||||
<< " of " << *p << dendl;
|
||||
int r;
|
||||
// when reading BlueFS log (only happens on startup) use non-buffered io
|
||||
// it makes it in sync with logic in _flush_range()
|
||||
bool use_buffered_io = h->file->fnode.ino == 1 ? false : cct->_conf->bluefs_buffered_io;
|
||||
if (!cct->_conf->bluefs_check_for_zeros) {
|
||||
r = _bdev_read(p->bdev, p->offset + x_off, l, &buf->bl, ioc[p->bdev],
|
||||
cct->_conf->bluefs_buffered_io);
|
||||
use_buffered_io);
|
||||
} else {
|
||||
r = _read_and_check(
|
||||
p->bdev, p->offset + x_off, l, &buf->bl, ioc[p->bdev],
|
||||
cct->_conf->bluefs_buffered_io);
|
||||
use_buffered_io);
|
||||
}
|
||||
logger->inc(l_bluefs_read_disk_count, 1);
|
||||
logger->inc(l_bluefs_read_disk_bytes, l);
|
||||
|
Loading…
Reference in New Issue
Block a user