]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: move csum related functions from ctree.c into fs.c
authorFilipe Manana <fdmanana@suse.com>
Mon, 16 Dec 2024 11:38:30 +0000 (11:38 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Jan 2025 13:53:17 +0000 (14:53 +0100)
commita6f0bcf9b190219fa2686247dfc99a44e597aa11
tree0db291a122eb79db7183471b842de80cdb67fd00
parentb815a78e17b9dd90398561ec7d91891d95f25301
btrfs: move csum related functions from ctree.c into fs.c

The ctree module is about the implementation of the btree data structure
and not a place holder for generic filesystem things like the csum
algorithm details. Move the functions related to the csum algorithm
details away from ctree.c and into fs.c, which is a far better place for
them. Also fix missing punctuation in comments and change one multiline
comment to a single line comment since everything fits in under 80
characters.

For some reason this also slightly reduces the module's size.

Before this change:

  $ size fs/btrfs/btrfs.ko
     text    data     bss     dec     hex filename
  1782126  161045   16920 1960091  1de89b fs/btrfs/btrfs.ko

After this change:

  $ size fs/btrfs/btrfs.ko
     text    data     bss     dec     hex filename
  1782094  161045   16920 1960059  1de87b fs/btrfs/btrfs.ko

Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.c
fs/btrfs/ctree.h
fs/btrfs/fs.c
fs/btrfs/fs.h