btrfs: defrag: use control structure in btrfs_defrag_file()
Use defrag control structure and replace function arguments. This brings
the following benefits:
- No more strange range->start update to indicate last scanned bytenr
We have btrfs_defrag_ctrl::last_scanned (exclusive) for it directly.
- No more return value to indicate defragged sectors
Now btrfs_defrag_file() will just return 0 if no error happened.
And btrfs_defrag_ctrl::sectors_defragged will show that value.
- Fewer parameters to carry around
Now most defrag_* functions only need to fetch their policy parameters
from btrfs_defrag_ctrl directly.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>