aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c57
1 files changed, 36 insertions, 21 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 4e59a91a11e0..4339b6613f19 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -2303,7 +2303,7 @@ static void btrfs_interface_exit(void)
2303 2303
2304static void btrfs_print_mod_info(void) 2304static void btrfs_print_mod_info(void)
2305{ 2305{
2306 printk(KERN_INFO "Btrfs loaded" 2306 printk(KERN_INFO "Btrfs loaded, crc32c=%s"
2307#ifdef CONFIG_BTRFS_DEBUG 2307#ifdef CONFIG_BTRFS_DEBUG
2308 ", debug=on" 2308 ", debug=on"
2309#endif 2309#endif
@@ -2313,33 +2313,48 @@ static void btrfs_print_mod_info(void)
2313#ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY 2313#ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY
2314 ", integrity-checker=on" 2314 ", integrity-checker=on"
2315#endif 2315#endif
2316 "\n"); 2316 "\n",
2317 btrfs_crc32c_impl());
2317} 2318}
2318 2319
2319static int btrfs_run_sanity_tests(void) 2320static int btrfs_run_sanity_tests(void)
2320{ 2321{
2321 int ret; 2322 int ret, i;
2322 2323 u32 sectorsize, nodesize;
2324 u32 test_sectorsize[] = {
2325 PAGE_SIZE,
2326 };
2323 ret = btrfs_init_test_fs(); 2327 ret = btrfs_init_test_fs();
2324 if (ret) 2328 if (ret)
2325 return ret; 2329 return ret;
2326 2330 for (i = 0; i < ARRAY_SIZE(test_sectorsize); i++) {
2327 ret = btrfs_test_free_space_cache(); 2331 sectorsize = test_sectorsize[i];
2328 if (ret) 2332 for (nodesize = sectorsize;
2329 goto out; 2333 nodesize <= BTRFS_MAX_METADATA_BLOCKSIZE;
2330 ret = btrfs_test_extent_buffer_operations(); 2334 nodesize <<= 1) {
2331 if (ret) 2335 pr_info("BTRFS: selftest: sectorsize: %u nodesize: %u\n",
2332 goto out; 2336 sectorsize, nodesize);
2333 ret = btrfs_test_extent_io(); 2337 ret = btrfs_test_free_space_cache(sectorsize, nodesize);
2334 if (ret) 2338 if (ret)
2335 goto out; 2339 goto out;
2336 ret = btrfs_test_inodes(); 2340 ret = btrfs_test_extent_buffer_operations(sectorsize,
2337 if (ret) 2341 nodesize);
2338 goto out; 2342 if (ret)
2339 ret = btrfs_test_qgroups(); 2343 goto out;
2340 if (ret) 2344 ret = btrfs_test_extent_io(sectorsize, nodesize);
2341 goto out; 2345 if (ret)
2342 ret = btrfs_test_free_space_tree(); 2346 goto out;
2347 ret = btrfs_test_inodes(sectorsize, nodesize);
2348 if (ret)
2349 goto out;
2350 ret = btrfs_test_qgroups(sectorsize, nodesize);
2351 if (ret)
2352 goto out;
2353 ret = btrfs_test_free_space_tree(sectorsize, nodesize);
2354 if (ret)
2355 goto out;
2356 }
2357 }
2343out: 2358out:
2344 btrfs_destroy_test_fs(); 2359 btrfs_destroy_test_fs();
2345 return ret; 2360 return ret;