Fix trim-related issues
Fixes: * Use uint64 instead of off_t when handling offset and size of the trimmed range in the fs_trim_data structure * BlockAllocator::Trim: Correct the size of a buffer * ram_disk, mmc: Do not trim past device capacity Improvements: * BlockAllocator::Trim: Because the received offset and size are ignored by BFS (the functionality is not implemented yet), return B_UNSUPPORTED if the range does not cover the whole partition * ram_disk, mmc: More accurate calculation of the number of trimmed bytes * devfs: Add a uint64 version of translate_partition_access() Change-Id: I24f4c08674f123ad33a5fef6e28996a4ada6ff0d Reviewed-on: https://review.haiku-os.org/c/haiku/+/4155 Tested-by: Commit checker robot <[email protected]> Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
354b6bcfbd
commit
bd02d81c24
@@ -175,8 +175,8 @@ typedef struct {
|
||||
uint32 range_count;
|
||||
uint64 trimmed_size; /* filled on return */
|
||||
struct range {
|
||||
off_t offset; /* offset (in bytes) */
|
||||
off_t size;
|
||||
uint64 offset; /* offset (in bytes) */
|
||||
uint64 size;
|
||||
} ranges[1];
|
||||
} fs_trim_data;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user