Home
last modified time | relevance | path

Searched refs:mock_dnode_t (Results 1 – 4 of 4) sorted by relevance

/freebsd/sys/contrib/openzfs/tests/unit/
H A Dmock_dmu.c41 mock_dnode_t *mdb_owner;
69 mock_dnode_block_alloc(mock_dnode_t *mdn, uint64_t blkid) in mock_dnode_block_alloc()
85 mock_dnode_block_get(mock_dnode_t *mdn, uint64_t blkid) in mock_dnode_block_get()
109 mock_dnode_t *
114 mock_dnode_t *mdn = kmem_zalloc(sizeof (mock_dnode_t), KM_SLEEP); in mock_dnode_create()
124 mock_dnode_destroy(mock_dnode_t *mdn) in mock_dnode_destroy()
145 kmem_free(mdn, sizeof (mock_dnode_t)); in mock_dnode_destroy()
149 mock_dnode_block_count(mock_dnode_t *mdn) in mock_dnode_block_count()
155 mock_dnode_block_data(mock_dnode_t *mdn, uint64_t blkid) in mock_dnode_block_data()
163 mock_dnode_refcount(mock_dnode_t *mdn) in mock_dnode_refcount()
[all …]
H A Dmock_dmu.h28 typedef struct mock_dnode mock_dnode_t; typedef
32 mock_dnode_t *mock_dnode_create(size_t blksize, dmu_object_type_t type);
35 void mock_dnode_destroy(mock_dnode_t *mdn);
38 size_t mock_dnode_block_count(mock_dnode_t *mdn);
41 const void *mock_dnode_block_data(mock_dnode_t *mdn, uint64_t blkid);
44 uint64_t mock_dnode_refcount(mock_dnode_t *mdn);
H A Dtest_zap.c62 mock_dnode_t *mdn = mock_dnode_create(512, DMU_OTN_ZAP_DATA); in mock_zap_create_microzap()
91 const void *blk = mock_dnode_block_data((mock_dnode_t *)dn, 0); in mock_zap_is_microzap()
99 const void *blk = mock_dnode_block_data((mock_dnode_t *)dn, 0); in mock_zap_is_fatzap()
106 mock_dnode_t *mdn = (mock_dnode_t *)dn; in mock_zap_destroy()
878 uint64_t refcount = mock_dnode_refcount((mock_dnode_t *)dn); in test_cursor_release_unused()
884 unit_eq(refcount, mock_dnode_refcount((mock_dnode_t *)dn)); in test_cursor_release_unused()
899 uint64_t refcount = mock_dnode_refcount((mock_dnode_t *)dn); in test_cursor_release_advance()
906 unit_eq(refcount, mock_dnode_refcount((mock_dnode_t *)dn)); in test_cursor_release_advance()
921 uint64_t refcount = mock_dnode_refcount((mock_dnode_t *)dn); in test_cursor_release_empty()
932 unit_eq(refcount, mock_dnode_refcount((mock_dnode_t *)dn)); in test_cursor_release_empty()
[all …]
H A DREADME.md171 `mock_dnode_t` is the mock for `dnode_t`.
173 `mock_dnode_t` is `mock_dnode_t *mock_dnode_create(...)`.
177 vice-versa, ie a `mock_dnode_t *` is always usable wherever a `dnode_t *`