aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys/zfs_vnops.h
diff options
context:
space:
mode:
authorChristian Schwarz <[email protected]>2020-11-02 21:07:07 +0100
committerGitHub <[email protected]>2020-11-02 12:07:07 -0800
commitab8c935ea65e1a4d92311c9b84adc77047ba0b2f (patch)
tree3d990fbeebf497d9379a83aea0f8cd7fbd5e2af9 /include/sys/zfs_vnops.h
parent09eb36ce3d98e0eeaeec9c333ac818b2bc3f85bf (diff)
zfs_vnops: make zfs_get_data OS-independent
Move zfs_get_data() in to platform-independent code. The only platform-specific aspect of it is the way we release an inode (Linux) / vnode_t (FreeBSD). I am not aware of a platform that could be supported by ZFS that couldn't implement zfs_rele_async itself. It's sibling zvol_get_data already is platform-independent. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Christian Schwarz <[email protected]> Closes #10979
Diffstat (limited to 'include/sys/zfs_vnops.h')
-rw-r--r--include/sys/zfs_vnops.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/sys/zfs_vnops.h b/include/sys/zfs_vnops.h
index b2767cb0e..5aaa64b34 100644
--- a/include/sys/zfs_vnops.h
+++ b/include/sys/zfs_vnops.h
@@ -39,4 +39,17 @@ extern int mappedread(znode_t *, int, uio_t *);
extern int mappedread_sf(znode_t *, int, uio_t *);
extern void update_pages(znode_t *, int64_t, int, objset_t *, uint64_t);
+/*
+ * Platform code that asynchronously drops zp's inode / vnode_t.
+ *
+ * Asynchronous dropping ensures that the caller will never drop the
+ * last reference on an inode / vnode_t in the current context.
+ * Doing so while holding open a tx could result in a deadlock if
+ * the platform calls into filesystem again in the implementation
+ * of inode / vnode_t dropping (e.g. call from iput_final()).
+ */
+extern void zfs_zrele_async(znode_t *zp);
+
+extern zil_get_data_t zfs_get_data;
+
#endif