Skip to content

Commit

Permalink
Async dmu support
Browse files Browse the repository at this point in the history
- Integrate with zvol and vnops

- Add asynchronous rangelock acquisition.
 o Make rangelock acquisition strictly FCFS while
   eliminating potential recursion when executing
   acquisition callbacks
 o Add debug support for dumping held rangelocks.
- Add async read write to ztest
- add taskq ctor and dtor callbacks
- Add arc_watch support to FreeBSD kmod.

Initially based on old code from SpectraLogic.

Co-authored-by: Will Andrews <wca@FreeBSD.org>
Co-authored-by: Matt Macy <mmacy@FreeBSD.org>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
  • Loading branch information
3 people committed Feb 3, 2021
1 parent 84268b0 commit fbf26c2
Show file tree
Hide file tree
Showing 77 changed files with 5,367 additions and 1,043 deletions.
6 changes: 3 additions & 3 deletions cmd/zdb/zdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ dump_packed_nvlist(objset_t *os, uint64_t object, void *data, size_t size)
size_t nvsize = *(uint64_t *)data;
char *packed = umem_alloc(nvsize, UMEM_NOFAIL);

VERIFY(0 == dmu_read(os, object, 0, nvsize, packed, DMU_READ_PREFETCH));
VERIFY0(dmu_read(os, object, 0, nvsize, packed, DMU_CTX_FLAG_PREFETCH));

VERIFY(nvlist_unpack(packed, nvsize, &nv, 0) == 0);

Expand Down Expand Up @@ -1514,7 +1514,7 @@ dump_spacemap(objset_t *os, space_map_t *sm)
offset += sizeof (word)) {

VERIFY0(dmu_read(os, space_map_object(sm), offset,
sizeof (word), &word, DMU_READ_PREFETCH));
sizeof (word), &word, DMU_CTX_FLAG_PREFETCH));

if (sm_entry_is_debug(word)) {
uint64_t de_txg = SM_DEBUG_TXG_DECODE(word);
Expand Down Expand Up @@ -1554,7 +1554,7 @@ dump_spacemap(objset_t *os, space_map_t *sm)
offset += sizeof (extra_word);
VERIFY0(dmu_read(os, space_map_object(sm), offset,
sizeof (extra_word), &extra_word,
DMU_READ_PREFETCH));
DMU_CTX_FLAG_PREFETCH));

ASSERT3U(offset, <=, space_map_length(sm));

Expand Down
Loading

0 comments on commit fbf26c2

Please sign in to comment.