Skip to content

Commit

Permalink
Merge pull request #58 from mochi-hpc/carns/dev-read-size
Browse files Browse the repository at this point in the history
fix unreported read size in file backend
  • Loading branch information
carns authored Nov 23, 2022
2 parents 5dfabfa + 68ce9bb commit 941ccbb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/bake-file-backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,13 @@ static int bake_file_read_bulk(backend_context_t context,
ret = transfer_data(entry, frid->log_entry_offset, frid->log_entry_size,
region_offset, bulk, bulk_offset, size, source,
TRANSFER_DATA_READ);
/* file backend will not produce short reads; it is an error to attempt
* to read more than is present in a bulk region.
*/
if (ret == BAKE_SUCCESS)
*bytes_read = size;
else
*bytes_read = 0;

return (ret);
}
Expand Down

0 comments on commit 941ccbb

Please sign in to comment.