diff options
author | Heming Zhao via Ocfs2-devel <[email protected]> | 2023-02-20 13:05:26 +0800 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2023-02-27 17:00:15 -0800 |
commit | 236b9254f8d1edc273ad88b420aa85fbd84f492d (patch) | |
tree | 1fdc1bff4d3b3cf4d4ab095af89ce626658400ef /tools/testing/selftests/bpf/progs/test_autoload.c | |
parent | 60eed1e3d45045623e46944ebc7c42c30a4350f0 (diff) |
ocfs2: fix non-auto defrag path not working issue
This fixes three issues on move extents ioctl without auto defrag:
a) In ocfs2_find_victim_alloc_group(), we have to convert bits to block
first in case of global bitmap.
b) In ocfs2_probe_alloc_group(), when finding enough bits in block
group bitmap, we have to back off move_len to start pos as well,
otherwise it may corrupt filesystem.
c) In ocfs2_ioctl_move_extents(), set me_threshold both for non-auto
and auto defrag paths. Otherwise it will set move_max_hop to 0 and
finally cause unexpectedly ENOSPC error.
Currently there are no tools triggering the above issues since
defragfs.ocfs2 enables auto defrag by default. Tested with manually
changing defragfs.ocfs2 to run non auto defrag path.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Heming Zhao <[email protected]>
Reviewed-by: Joseph Qi <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Junxiao Bi <[email protected]>
Cc: Changwei Ge <[email protected]>
Cc: Gang He <[email protected]>
Cc: Jun Piao <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions