This seems to be already the case.
Oh, then it's fine.
Except the return code, everything looks fine to me now.
Forgot to mention that, even for error case, we should copy the fstrim_range structure to the ioctl parameter to indicate any progress we made.
range->len = trimmed; is always executed regardless of previous failures
and there doesn't seem to be any early return.
Will try adding back the errno and try the repro.
Thanks.
Thanks,
Qu
Just please update the commit message to explicitly mention that, we
have a free extent discarding phase, which can trim a lot of unallocated
space, and there is no limits on the trim size (unlike the block group
part).
Thanks,
Qu
Thanks,
Qu
>> }
>> mutex_unlock(&fs_devices->device_list_mutex);
>