|
20 | 20 | */
|
21 | 21 | /*
|
22 | 22 | * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
23 |
| - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. |
| 23 | + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. |
24 | 24 | */
|
25 | 25 |
|
26 | 26 | #include <sys/dsl_scan.h>
|
@@ -76,6 +76,11 @@ ulong zfs_free_max_blocks = 100000;
|
76 | 76 | ((scn)->scn_phys.scn_func == POOL_SCAN_SCRUB || \
|
77 | 77 | (scn)->scn_phys.scn_func == POOL_SCAN_RESILVER)
|
78 | 78 |
|
| 79 | +/* |
| 80 | + * Enable/disable the processing of the free_bpobj object. |
| 81 | + */ |
| 82 | +int zfs_free_bpobj_enabled = 1; |
| 83 | + |
79 | 84 | /* the order has to match pool_scan_type */
|
80 | 85 | static scan_cb_t *scan_funcs[POOL_SCAN_FUNCS] = {
|
81 | 86 | NULL,
|
@@ -1502,7 +1507,8 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx)
|
1502 | 1507 | * have to worry about traversing it. It is also faster to free the
|
1503 | 1508 | * blocks than to scrub them.
|
1504 | 1509 | */
|
1505 |
| - if (spa_version(dp->dp_spa) >= SPA_VERSION_DEADLISTS) { |
| 1510 | + if (zfs_free_bpobj_enabled && |
| 1511 | + spa_version(dp->dp_spa) >= SPA_VERSION_DEADLISTS) { |
1506 | 1512 | scn->scn_is_bptree = B_FALSE;
|
1507 | 1513 | scn->scn_zio_root = zio_root(dp->dp_spa, NULL,
|
1508 | 1514 | NULL, ZIO_FLAG_MUSTSUCCEED);
|
@@ -1918,4 +1924,7 @@ MODULE_PARM_DESC(zfs_no_scrub_prefetch, "Set to disable scrub prefetching");
|
1918 | 1924 |
|
1919 | 1925 | module_param(zfs_free_max_blocks, ulong, 0644);
|
1920 | 1926 | MODULE_PARM_DESC(zfs_free_max_blocks, "Max number of blocks freed in one txg");
|
| 1927 | + |
| 1928 | +module_param(zfs_free_bpobj_enabled, int, 0644); |
| 1929 | +MODULE_PARM_DESC(zfs_free_bpobj_enabled, "Enable processing of the free_bpobj"); |
1921 | 1930 | #endif
|
0 commit comments