mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-28 19:06:42 -05:00
Fix an invalid assumption about allocated parity
In the copy detection it's possible to need to copy from a file wihout parity. This could result in the parity position not found.
This commit is contained in:
parent
2f5c6a39a9
commit
56bef0d90f
4 changed files with 47 additions and 29 deletions
|
|
@ -941,6 +941,7 @@ block_off_t fs_file2par_get_ts(struct snapraid_disk* disk, struct snapraid_chunk
|
|||
|
||||
/**
|
||||
* Get the parity position from the file position.
|
||||
* Return POS_INVALID if no parity is allocated.
|
||||
* \note This function is NOT thread-safe as it uses the the disk cache.
|
||||
*/
|
||||
static inline block_off_t fs_file2par_get(struct snapraid_disk* disk, struct snapraid_file* file, block_off_t file_pos)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue