| 6927 | } |
| 6928 | |
| 6929 | static void |
| 6930 | ztest_dataset_dirobj_verify(ztest_ds_t *zd) |
| 6931 | { |
| 6932 | uint64_t usedobjs, dirobjs, scratch; |
| 6933 | |
| 6934 | /* |
| 6935 | * ZTEST_DIROBJ is the object directory for the entire dataset. |
| 6936 | * Therefore, the number of objects in use should equal the |
| 6937 | * number of ZTEST_DIROBJ entries, +1 for ZTEST_DIROBJ itself. |
| 6938 | * If not, we have an object leak. |
| 6939 | * |
| 6940 | * Note that we can only check this in ztest_dataset_open(), |
| 6941 | * when the open-context and syncing-context values agree. |
| 6942 | * That's because zap_count() returns the open-context value, |
| 6943 | * while dmu_objset_space() returns the rootbp fill count. |
| 6944 | */ |
| 6945 | VERIFY3U(0, ==, zap_count(zd->zd_os, ZTEST_DIROBJ, &dirobjs)); |
| 6946 | dmu_objset_space(zd->zd_os, &scratch, &scratch, &usedobjs, &scratch); |
| 6947 | ASSERT3U(dirobjs + 1, ==, usedobjs); |
| 6948 | } |
| 6949 | |
| 6950 | static int |
| 6951 | ztest_dataset_open(int d) |
no test coverage detected