]> git.proxmox.com Git - mirror_zfs.git/blobdiff - module/zfs/bptree.c
Linux 6.8 compat: update for new bdev access functions
[mirror_zfs.git] / module / zfs / bptree.c
index 8f78e8de594e7aab33a9d81534572eadfe08c4e9..1f5d8e77bcc0321dcf0801cc90bef65351dc9bce 100644 (file)
@@ -6,7 +6,7 @@
  * You may not use this file except in compliance with the License.
  *
  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
+ * or https://opensource.org/licenses/CDDL-1.0.
  * See the License for the specific language governing permissions
  * and limitations under the License.
  *
@@ -20,7 +20,7 @@
  */
 
 /*
- * Copyright (c) 2011, 2015 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2018 by Delphix. All rights reserved.
  */
 
 #include <sys/arc.h>
@@ -33,7 +33,6 @@
 #include <sys/dsl_dir.h>
 #include <sys/dsl_pool.h>
 #include <sys/dnode.h>
-#include <sys/refcount.h>
 #include <sys/spa.h>
 
 /*
@@ -148,15 +147,16 @@ bptree_add(objset_t *os, uint64_t obj, blkptr_t *bp, uint64_t birth_txg,
        dmu_buf_rele(db, FTAG);
 }
 
-/* ARGSUSED */
 static int
 bptree_visit_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
     const zbookmark_phys_t *zb, const dnode_phys_t *dnp, void *arg)
 {
+       (void) zilog, (void) dnp;
        int err;
        struct bptree_args *ba = arg;
 
-       if (bp == NULL || BP_IS_HOLE(bp))
+       if (zb->zb_level == ZB_DNODE_LEVEL || BP_IS_HOLE(bp) ||
+           BP_IS_REDACTED(bp))
                return (0);
 
        err = ba->ba_func(ba->ba_arg, bp, ba->ba_tx);