diff options
| author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2016-11-14 14:03:06 +0000 |
|---|---|---|
| committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2016-11-14 14:03:06 +0000 |
| commit | eb8f6f014c29ae7a6650458f49da8960ed82bfcf (patch) | |
| tree | d8cc134dc1a4d3119493593b836822d612768dc5 /usr/src/uts/common/fs/zfs/sys/dmu.h | |
| parent | 91b5490a419451a7a9fad5fff2b5f1f83ad87955 (diff) | |
| parent | 1d32ba663e202c24a5a1f2e5aef83fffb447cb7f (diff) | |
| download | illumos-joyent-eb8f6f014c29ae7a6650458f49da8960ed82bfcf.tar.gz | |
[illumos-gate merge]
commit 1d32ba663e202c24a5a1f2e5aef83fffb447cb7f
7290 ZFS test suite needs to control what utilities it can run
commit f4fb84c03b3f4c46dab36872e953dd3c27317c3a
7576 Print the correct size of loader.efi when failing to load it into memory.
commit 40510e8eba18690b9a9843b26393725eeb0f1dac
6676 Race between unique_insert() and unique_remove() causes ZFS fsid change
Diffstat (limited to 'usr/src/uts/common/fs/zfs/sys/dmu.h')
| -rw-r--r-- | usr/src/uts/common/fs/zfs/sys/dmu.h | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/usr/src/uts/common/fs/zfs/sys/dmu.h b/usr/src/uts/common/fs/zfs/sys/dmu.h index b45e8822e1..3e3c654448 100644 --- a/usr/src/uts/common/fs/zfs/sys/dmu.h +++ b/usr/src/uts/common/fs/zfs/sys/dmu.h @@ -537,8 +537,14 @@ typedef struct dmu_buf_user { */ taskq_ent_t dbu_tqent; - /* This instance's eviction function pointer. */ - dmu_buf_evict_func_t *dbu_evict_func; + /* + * This instance's eviction function pointers. + * + * dbu_evict_func_sync is called synchronously and then + * dbu_evict_func_async is executed asynchronously on a taskq. + */ + dmu_buf_evict_func_t *dbu_evict_func_sync; + dmu_buf_evict_func_t *dbu_evict_func_async; #ifdef ZFS_DEBUG /* * Pointer to user's dbuf pointer. NULL for clients that do @@ -562,15 +568,19 @@ typedef struct dmu_buf_user { /* Very ugly, but it beats issuing suppression directives in many Makefiles. */ extern void dmu_buf_init_user(dmu_buf_user_t *dbu, dmu_buf_evict_func_t *evict_func, - dmu_buf_t **clear_on_evict_dbufp); + dmu_buf_evict_func_t *evict_func_async, dmu_buf_t **clear_on_evict_dbufp); #else /* __lint */ inline void -dmu_buf_init_user(dmu_buf_user_t *dbu, dmu_buf_evict_func_t *evict_func, - dmu_buf_t **clear_on_evict_dbufp) +dmu_buf_init_user(dmu_buf_user_t *dbu, dmu_buf_evict_func_t *evict_func_sync, + dmu_buf_evict_func_t *evict_func_async, dmu_buf_t **clear_on_evict_dbufp) { - ASSERT(dbu->dbu_evict_func == NULL); - ASSERT(evict_func != NULL); - dbu->dbu_evict_func = evict_func; + ASSERT(dbu->dbu_evict_func_sync == NULL); + ASSERT(dbu->dbu_evict_func_async == NULL); + + /* must have at least one evict func */ + IMPLY(evict_func_sync == NULL, evict_func_async != NULL); + dbu->dbu_evict_func_sync = evict_func_sync; + dbu->dbu_evict_func_async = evict_func_async; #ifdef ZFS_DEBUG dbu->dbu_clear_on_evict_dbufp = clear_on_evict_dbufp; #endif |
