Skip to content

Commit ee8b2f7

Browse files
committed
aggregate errors in root zio
Signed-off-by: tiehexue <tiehexue@hotmail.com>
1 parent 0133233 commit ee8b2f7

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

module/zfs/dmu_direct.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,10 +472,12 @@ dmu_read_abd_async(dnode_t *dn, uint64_t offset, uint64_t size,
472472

473473
async_error:
474474
/*
475-
* The root zio is dispatched; dmu_read_abd_async_done() will call
476-
* the caller's callback with the error. Return 0 so the caller
477-
* knows the callback owns cleanup — do NOT free resources here.
475+
* Set the error on the root zio and dispatch it.
476+
* The done callback delivers the error and frees
477+
* the state, so return 0 to tell the caller the callback owns
478+
* cleanup.
478479
*/
480+
rio->io_error = err;
479481
zio_nowait(rio);
480482
return (0);
481483
}

0 commit comments

Comments
 (0)