Commit 7ce22a2
btrfs-progs: mkfs: do not use extent buffer to write super block
There is a long history that we used extent_buffer helpers to modify a
superblock, but we're moving out of that behavior, and migrate to use
the on stack helpers to modify super blocks.
In the function make_btrfs() we use a dummy extent buffer just to
calculate the checksum for the super block.
We do not need such workaround, and can manually call btrfs_csum_data()
on @super, and pass @super directly to sbwrite(), completely avoiding the
need of a dummy extent buffer.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent 46330e3 commit 7ce22a2
1 file changed
+3
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
763 | 760 | | |
764 | 761 | | |
765 | 762 | | |
| |||
0 commit comments