Allow zero-length overwrites

This commit is contained in:
Vitaliy Filippov
2019-12-21 19:04:36 +03:00
parent 4de5290619
commit 4677ace4cc
4 changed files with 50 additions and 12 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ bool journal_flusher_co::loop()
for (; it != v.end(); it++)
if (it->offset >= offset)
break;
if (it == v.end() || it->offset > offset)
if (it == v.end() || it->offset > offset && it->len > 0)
{
submit_offset = dirty_it->second.location + offset - dirty_it->second.offset;
submit_len = it == v.end() || it->offset >= end_offset ? end_offset-offset : it->offset-offset;