diff options
| author | Nikolay Borisov <[email protected]> | 2019-03-25 14:31:21 +0200 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2019-04-29 19:02:35 +0200 |
| commit | c2d1b3aae33605a61cbab445d8ae1c708ccd2698 (patch) | |
| tree | f0db726163ee3afb436a1b846264b4140cfc1531 /fs/btrfs/dev-replace.c | |
| parent | 040ee6120cb6706aa840a62f3b7966ebce9bfcd3 (diff) | |
btrfs: Honour FITRIM range constraints during free space trim
Up until now trimming the freespace was done irrespective of what the
arguments of the FITRIM ioctl were. For example fstrim's -o/-l arguments
will be entirely ignored. Fix it by correctly handling those paramter.
This requires breaking if the found freespace extent is after the end of
the passed range as well as completing trim after trimming
fstrim_range::len bytes.
Fixes: 499f377f49f0 ("btrfs: iterate over unused chunk space in FITRIM")
CC: [email protected] # 4.4+
Signed-off-by: Nikolay Borisov <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions