mirror of
https://github.com/ceph/ceph
synced 2025-02-24 19:47:44 +00:00
crimson/os/seastore: check if length exist in mark_space_used and mark_space_free
to avoid misuse of buffer length and data length when there is a no actual data extent Signed-off-by: Xinyu Huang <xinyu.huang@intel.com>
This commit is contained in:
parent
026066a7e5
commit
dc4a23cef3
@ -1462,6 +1462,7 @@ void SegmentCleaner::mark_space_used(
|
||||
{
|
||||
LOG_PREFIX(SegmentCleaner::mark_space_used);
|
||||
assert(background_callback->get_state() >= state_t::SCAN_SPACE);
|
||||
assert(len);
|
||||
// TODO: drop
|
||||
if (addr.get_addr_type() != paddr_types_t::SEGMENT) {
|
||||
return;
|
||||
@ -1492,6 +1493,7 @@ void SegmentCleaner::mark_space_free(
|
||||
{
|
||||
LOG_PREFIX(SegmentCleaner::mark_space_free);
|
||||
assert(background_callback->get_state() >= state_t::SCAN_SPACE);
|
||||
assert(len);
|
||||
// TODO: drop
|
||||
if (addr.get_addr_type() != paddr_types_t::SEGMENT) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user