mirror of
https://github.com/ceph/ceph
synced 2025-02-24 19:47:44 +00:00
seastore/rbm: fix wrong statement
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
This commit is contained in:
parent
c8323d364b
commit
f72ad486ac
@ -481,7 +481,8 @@ RandomBlockManager::write(
|
|||||||
bufferptr &bptr)
|
bufferptr &bptr)
|
||||||
{
|
{
|
||||||
ceph_assert(device);
|
ceph_assert(device);
|
||||||
if (addr > super.end - super.start) {
|
if (addr > super.end || addr < super.start ||
|
||||||
|
bptr.length() > super.end - super.start) {
|
||||||
return crimson::ct_error::erange::make();
|
return crimson::ct_error::erange::make();
|
||||||
}
|
}
|
||||||
return device->write(
|
return device->write(
|
||||||
@ -492,16 +493,16 @@ RandomBlockManager::write(
|
|||||||
RandomBlockManager::read_ertr::future<>
|
RandomBlockManager::read_ertr::future<>
|
||||||
RandomBlockManager::read(
|
RandomBlockManager::read(
|
||||||
blk_paddr_t addr,
|
blk_paddr_t addr,
|
||||||
bufferptr &buffer)
|
bufferptr &bptr)
|
||||||
{
|
{
|
||||||
ceph_assert(device);
|
ceph_assert(device);
|
||||||
if (addr > super.end - super.start ||
|
if (addr > super.end || addr < super.start ||
|
||||||
buffer.length() > super.end - super.start) {
|
bptr.length() > super.end - super.start) {
|
||||||
return crimson::ct_error::erange::make();
|
return crimson::ct_error::erange::make();
|
||||||
}
|
}
|
||||||
return device->read(
|
return device->read(
|
||||||
addr,
|
addr,
|
||||||
buffer);
|
bptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
RandomBlockManager::close_ertr::future<>
|
RandomBlockManager::close_ertr::future<>
|
||||||
|
Loading…
Reference in New Issue
Block a user