Commit 6f7d81d
btrfs: use memcmp_extent_buffer() at replay_one_extent()
Instead of using memcmp(), which requires copying both file extent items
from each extent buffer into a local buffer, use memcmp_extent_buffer() so
that we only need to copy one of the file extent items and directly use
the extent buffer of the other file extent item for the comparison.
This reduces code size, saves one memory copy and reduces stack usage.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent e0d5e3b commit 6f7d81d
1 file changed
+6
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
688 | 688 | | |
689 | 689 | | |
690 | 690 | | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
| 691 | + | |
| 692 | + | |
699 | 693 | | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
| 694 | + | |
| 695 | + | |
704 | 696 | | |
705 | 697 | | |
706 | 698 | | |
707 | 699 | | |
708 | 700 | | |
709 | | - | |
| 701 | + | |
| 702 | + | |
710 | 703 | | |
711 | 704 | | |
712 | 705 | | |
| |||
0 commit comments