Skip to content

Commit 0d36162

Browse files
committed
backport fix #13 to version 0.9.3:
fix reproducible filesystem corruption with too-low RAM buffer size: the loop copying continuous segments larger than RAM buffer was bugged, it incremented only one iteration variable instead of all three
1 parent 760f0b3 commit 0d36162

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fsremap/src/io/io_posix.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,8 @@ int fr_io_posix::flush_copy_bytes(fr_dir dir, fr_vector<ft_uoff> & request_vec)
974974
|| (err = flush_bytes()) != 0)
975975
break;
976976

977+
from_offset += (ft_uoff) buf_length;
978+
to_offset += (ft_uoff) buf_length;
977979
length -= (ft_uoff) buf_length;
978980
}
979981
if (err != 0)

0 commit comments

Comments
 (0)