Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
None
-
None
-
3
-
9223372036854775807
Description
The functions:
lfs_mirror_write llapi_mirror_copy llapi_mirror_copy_many llapi_mirror_resync_many_params
All share the same mistake, rounding up the number of bytes to write before writing out:
/* round up to page align to make direct IO happy. */ to_write = ((bytes_read - 1) | (page_size - 1)) + 1;
I noticed this when playing with them - copying a small input file, they round up the size to 4K and put junk padding in.
I'll push a patch and try to include some tests.