mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
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 <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Christian Schwarz <me@cschwarz.com> Closes #10979
This commit is contained in:
committed by
GitHub
parent
09eb36ce3d
commit
ab8c935ea6
@@ -173,7 +173,6 @@ extern void zfs_tstamp_update_setup_ext(struct znode *,
|
||||
uint_t, uint64_t [2], uint64_t [2], boolean_t have_tx);
|
||||
extern void zfs_znode_free(struct znode *);
|
||||
|
||||
extern zil_get_data_t zfs_get_data;
|
||||
extern zil_replay_func_t *zfs_replay_vector[TX_MAX_TYPE];
|
||||
extern int zfsfstype;
|
||||
|
||||
|
||||
@@ -163,7 +163,6 @@ extern caddr_t zfs_map_page(page_t *, enum seg_rw);
|
||||
extern void zfs_unmap_page(page_t *, caddr_t);
|
||||
#endif /* HAVE_UIO_RW */
|
||||
|
||||
extern zil_get_data_t zfs_get_data;
|
||||
extern zil_replay_func_t *zfs_replay_vector[TX_MAX_TYPE];
|
||||
extern int zfsfstype;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user