Commit 1cab137
btrfs: reuse cloned extent buffer during fiemap to avoid re-allocations
During fiemap we may have to visit multiple leaves of the subvolume's
inode tree, and each time we are freeing and allocating an extent buffer
to use as a clone of each visited leaf. Optimize this by reusing cloned
extent buffers, to avoid the freeing and re-allocation both of the extent
buffer structure itself and more importantly of the pages attached to the
extent buffer.
Reviewed-by: Josef Bacik <[email protected]>
Signed-off-by: Filipe Manana <[email protected]>
Signed-off-by: David Sterba <[email protected]>1 parent 978b63f commit 1cab137
1 file changed
+24
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2752 | 2752 | | |
2753 | 2753 | | |
2754 | 2754 | | |
2755 | | - | |
| 2755 | + | |
2756 | 2756 | | |
2757 | 2757 | | |
2758 | 2758 | | |
| |||
2761 | 2761 | | |
2762 | 2762 | | |
2763 | 2763 | | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
| 2770 | + | |
| 2771 | + | |
2764 | 2772 | | |
2765 | 2773 | | |
2766 | | - | |
| 2774 | + | |
2767 | 2775 | | |
2768 | 2776 | | |
2769 | 2777 | | |
2770 | 2778 | | |
2771 | 2779 | | |
2772 | 2780 | | |
2773 | | - | |
2774 | | - | |
| 2781 | + | |
| 2782 | + | |
| 2783 | + | |
| 2784 | + | |
2775 | 2785 | | |
2776 | 2786 | | |
2777 | | - | |
2778 | | - | |
2779 | | - | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
2780 | 2793 | | |
2781 | 2794 | | |
2782 | 2795 | | |
2783 | 2796 | | |
2784 | 2797 | | |
| 2798 | + | |
| 2799 | + | |
| 2800 | + | |
2785 | 2801 | | |
2786 | | - | |
| 2802 | + | |
2787 | 2803 | | |
2788 | 2804 | | |
2789 | 2805 | | |
| |||
0 commit comments