linux/fs/btrfs
Nikolay Borisov 9678c54388 btrfs: Remove custom crc32c init code
The custom crc32 init code was introduced in
14a958e678 ("Btrfs: fix btrfs boot when compiled as built-in") to
enable using btrfs as a built-in. However, later as pointed out by
60efa5eb2e ("Btrfs: use late_initcall instead of module_init") this
wasn't enough and finally btrfs was switched to late_initcall which
comes after the generic crc32c implementation is initiliased. The
latter commit superseeded the former. Now that we don't have to
maintain our own code let's just remove it and switch to using the
generic implementation.

Despite touching a lot of files the patch is really simple. Here is the gist of
the changes:

1. Select LIBCRC32C rather than the low-level modules.
2. s/btrfs_crc32c/crc32c/g
3. replace hash.h with linux/crc32c.h
4. Move the btrfs namehash funcs to ctree.h and change the tree accordingly.

I've tested this with btrfs being both a module and a built-in and xfstest
doesn't complain.

Does seem to fix the longstanding problem of not automatically selectiong
the crc32c module when btrfs is used. Possibly there is a workaround in
dracut.

The modinfo confirms that now all the module dependencies are there:

before:
depends:        zstd_compress,zstd_decompress,raid6_pq,xor,zlib_deflate

after:
depends:        libcrc32c,zstd_compress,zstd_decompress,raid6_pq,xor,zlib_deflate

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ add more info to changelog from mails ]
Signed-off-by: David Sterba <dsterba@suse.com>
2018-03-26 15:09:39 +02:00
..
tests Btrfs: extent map selftest: add missing void parameter to btrfs_test_extent_map 2018-03-26 15:09:29 +02:00
acl.c btrfs: preserve i_mode if __btrfs_set_acl() fails 2017-08-21 17:47:42 +02:00
async-thread.c Btrfs: fix confusing worker helper info in stacktrace 2017-10-30 12:27:57 +01:00
async-thread.h btrfs: constify tracepoint arguments 2017-08-16 14:19:53 +02:00
backref.c btrfs: add missing initialization in btrfs_check_shared 2018-03-14 22:26:46 +01:00
backref.h btrfs: add a flag to iterate_inodes_from_logical to find all extent refs for uncompressed extents 2017-11-01 20:45:34 +01:00
btrfs_inode.h btrfs: Remove btrfs_inode::delayed_iput_count 2018-03-26 15:09:37 +02:00
check-integrity.c btrfs: Remove custom crc32c init code 2018-03-26 15:09:39 +02:00
check-integrity.h
compression.c for-4.16-tag 2018-01-29 14:04:23 -08:00
compression.h btrfs: compression: add helper for type to string conversion 2018-01-22 16:08:16 +01:00
ctree.c btrfs: Improve btrfs_search_slot description 2018-01-22 16:08:19 +01:00
ctree.h btrfs: Remove custom crc32c init code 2018-03-26 15:09:39 +02:00
dedupe.h
delayed-inode.c btrfs: Don't pass fs_info to btrfs_run_delayed_items/_nr 2018-03-26 15:09:31 +02:00
delayed-inode.h btrfs: Don't pass fs_info to btrfs_run_delayed_items/_nr 2018-03-26 15:09:31 +02:00
delayed-ref.c btrfs: Ignore errors from btrfs_qgroup_trace_extent_post 2018-02-02 16:25:14 +01:00
delayed-ref.h Btrfs: add __init macro to btrfs init functions 2018-01-22 16:08:11 +01:00
dev-replace.c btrfs: log, when replace, is canceled by the user 2018-03-26 15:09:34 +02:00
dev-replace.h btrfs: btrfs_dev_replace_cancel() can return int 2018-03-26 15:09:30 +02:00
dir-item.c btrfs: Remove custom crc32c init code 2018-03-26 15:09:39 +02:00
disk-io.c btrfs: Remove custom crc32c init code 2018-03-26 15:09:39 +02:00
disk-io.h btrfs: remove unused function btrfs_async_submit_limit() 2018-03-26 15:09:35 +02:00
export.c btrfs: Cleanup existing name_len checks 2018-01-22 16:08:12 +01:00
export.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
extent_io.c btrfs: extent_buffer_uptodate() make it static and inline 2018-03-26 15:09:33 +02:00
extent_io.h btrfs: extent_buffer_uptodate() make it static and inline 2018-03-26 15:09:33 +02:00
extent_map.c Btrfs: add tracepoint for em's EEXIST case 2018-03-26 15:09:38 +02:00
extent_map.h Btrfs: move extent map specific code to extent_map.c 2018-01-22 16:08:22 +01:00
extent-tree.c btrfs: Remove custom crc32c init code 2018-03-26 15:09:39 +02:00
file-item.c Merge branch 'for-4.13-part1' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux 2017-07-05 16:41:23 -07:00
file.c for-4.16-tag 2018-01-29 14:04:23 -08:00
free-space-cache.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-01-31 14:31:10 -08:00
free-space-cache.h btrfs: free-space-cache, clean up unnecessary root arguments 2017-02-17 12:03:56 +01:00
free-space-tree.c btrfs: use reada direction enum instead of constant value in load_free_space_tree 2018-03-26 15:09:37 +02:00
free-space-tree.h btrfs: expose internal free space tree routine only if sanity tests are enabled 2017-08-18 16:36:29 +02:00
inode-item.c btrfs: Remove custom crc32c init code 2018-03-26 15:09:39 +02:00
inode-map.c Btrfs: rework outstanding_extents 2017-11-01 20:45:35 +01:00
inode-map.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
inode.c btrfs: Remove custom crc32c init code 2018-03-26 15:09:39 +02:00
ioctl.c btrfs: rename __btrfs_dev_replace_cancel() 2018-03-26 15:09:30 +02:00
Kconfig btrfs: Remove custom crc32c init code 2018-03-26 15:09:39 +02:00
locking.c
locking.h
lzo.c btrfs: allow to set compression level for zlib 2017-11-01 20:45:29 +01:00
Makefile btrfs: Remove custom crc32c init code 2018-03-26 15:09:39 +02:00
math.h
ordered-data.c Btrfs: rework outstanding_extents 2017-11-01 20:45:35 +01:00
ordered-data.h btrfs: Don't hardcode the csum size in btrfs_ordered_sum_size 2018-03-26 15:09:29 +02:00
orphan.c
print-tree.c Btrfs: add one more sanity check for shared ref type 2017-08-21 17:47:43 +02:00
print-tree.h btrfs: get fs_info from eb in btrfs_print_tree, remove argument 2017-08-16 16:12:03 +02:00
props.c btrfs: Remove custom crc32c init code 2018-03-26 15:09:39 +02:00
props.h
qgroup.c btrfs: Move qgroup rescan on quota enable to btrfs_quota_enable 2018-03-26 15:09:38 +02:00
qgroup.h btrfs: qgroup: Fix qgroup reserved space underflow by only freeing reserved ranges 2017-06-29 20:17:02 +02:00
raid56.c btrfs: Fix NULL pointer exception in find_bio_stripe 2018-03-14 22:26:35 +01:00
raid56.h
rcu-string.h
reada.c btrfs: remove unused member err from reada_extent 2017-06-19 18:25:59 +02:00
ref-verify.c btrfs: ref-verify: Remove unused parameter from walk_up_tree() to kill warning 2018-01-22 16:08:13 +01:00
ref-verify.h Btrfs: add a extent ref verify tool 2017-10-30 12:28:00 +01:00
relocation.c btrfs: Handle btrfs_set_extent_delalloc failure in relocate_file_extent_cluster 2018-03-01 16:16:12 +01:00
root-tree.c btrfs: Cleanup existing name_len checks 2018-01-22 16:08:12 +01:00
scrub.c btrfs: not a disk error if the bio_add_page fails 2018-03-26 15:09:36 +02:00
send.c btrfs: Remove custom crc32c init code 2018-03-26 15:09:39 +02:00
send.h btrfs: fix send ioctl on 32bit with 64bit kernel 2017-10-30 12:27:59 +01:00
struct-funcs.c btrfs: struct-funcs, constify readers 2017-08-16 14:19:53 +02:00
super.c btrfs: Remove custom crc32c init code 2018-03-26 15:09:39 +02:00
sysfs.c Revert "btrfs: use proper endianness accessors for super_copy" 2018-03-16 14:49:44 +01:00
sysfs.h Merge branch 'for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux 2017-11-14 13:35:29 -08:00
transaction.c btrfs: Move error handling of btrfs_start_dirty_block_groups closer to call site 2018-03-26 15:09:36 +02:00
transaction.h btrfs: Document consistency of transaction->io_bgs list 2018-03-26 15:09:34 +02:00
tree-checker.c btrfs: Remove custom crc32c init code 2018-03-26 15:09:39 +02:00
tree-checker.h btrfs: tree-checker: Replace root parameter with fs_info 2018-03-26 15:09:38 +02:00
tree-defrag.c
tree-log.c btrfs: Remove custom crc32c init code 2018-03-26 15:09:39 +02:00
tree-log.h btrfs: Make btrfs_del_inode_ref take btrfs_inode 2017-02-14 15:50:54 +01:00
ulist.c btrfs: ulist: rename ulist_fini to ulist_release 2017-02-17 12:03:50 +01:00
ulist.h btrfs: ulist: rename ulist_fini to ulist_release 2017-02-17 12:03:50 +01:00
uuid-tree.c btrfs: return the actual error value from from btrfs_uuid_tree_iterate 2016-12-19 18:08:15 +01:00
volumes.c btrfs: Refactor __get_raid_index() to btrfs_bg_flags_to_raid_index() 2018-03-26 15:09:38 +02:00
volumes.h btrfs: Refactor __get_raid_index() to btrfs_bg_flags_to_raid_index() 2018-03-26 15:09:38 +02:00
xattr.c for-4.16-tag 2018-01-29 14:04:23 -08:00
xattr.h
zlib.c btrfs: allow to set compression level for zlib 2017-11-01 20:45:29 +01:00
zstd.c btrfs: move some zstd work data from stack to workspace 2018-01-22 16:08:14 +01:00