Repository navigation
Conversation
Signed-off-by: Adam Kupczyk <[email protected]>
| debug_inflight.erase(offset, length); | ||
| if (debug_inflight_write.intersects(offset, length)) | ||
| debug_inflight_write.erase(offset, length); | ||
| if (debug_inflight_read.intersects(offset, length)) |
There was a problem hiding this comment.
you might want to use "else if" here - no need to attempt removal from debug_inflight_read if debug_inflight_write had the range.
| if (cct->_conf->bdev_debug_inflight_ios) { | ||
| std::lock_guard l(debug_lock); | ||
| debug_inflight.erase(offset, length); | ||
| if (debug_inflight_write.intersects(offset, length)) |
There was a problem hiding this comment.
you might want to use lower_bound function to locate the range and then use resulting iterator to erase it - saving one lookup this way
There was a problem hiding this comment.
well, this will need some modifications in interval_set to implement partial erase for iterator... Perhaps an overkill for this secondary debugging feature...
|
@ifed01 I posted it here for reference only; but do you think I should go with such improvement? |
hmm, I didn't expect reference patch without a desire to commit it ;) |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
This change is to make overlap read/read still legal.
Overlaps read/write and write/write still cause asserts.