]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Expose dmu_buf_hold_array_by_dnode to platform code
authorMatthew Macy <mmacy@freebsd.org>
Fri, 11 Oct 2019 17:06:18 +0000 (10:06 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 11 Oct 2019 17:06:18 +0000 (10:06 -0700)
FreeBSD uses this in its pager ops routines

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #9431

include/sys/dmu.h
module/zfs/dmu.c

index 236b90141d8d0876adf3aa7392b991a80e59fa50..33a7667df1c1f952257873ab9f6546f95d236f58 100644 (file)
@@ -564,7 +564,9 @@ int dmu_buf_hold(objset_t *os, uint64_t object, uint64_t offset,
     void *tag, dmu_buf_t **, int flags);
 int dmu_buf_hold_by_dnode(dnode_t *dn, uint64_t offset,
     void *tag, dmu_buf_t **dbp, int flags);
-
+int dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset,
+    uint64_t length, boolean_t read, void *tag, int *numbufsp,
+    dmu_buf_t ***dbpp, uint32_t flags);
 /*
  * Add a reference to a dmu buffer that has already been held via
  * dmu_buf_hold() in the current context.
index 895cac58e833d183090cc8e2db7f2d7255a449d7..78c67343316c57bae03b81f7aa1cf0605d46219c 100644 (file)
@@ -489,7 +489,7 @@ dmu_spill_hold_by_bonus(dmu_buf_t *bonus, uint32_t flags, void *tag,
  * and can induce severe lock contention when writing to several files
  * whose dnodes are in the same block.
  */
-static int
+int
 dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset, uint64_t length,
     boolean_t read, void *tag, int *numbufsp, dmu_buf_t ***dbpp, uint32_t flags)
 {