mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Add comment on acb_zio_dummy
Thanks to George Wilson for clarifying this on Slack. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: George Wilson <gwilson@delphix.com> Signed-off-by: Christian Schwarz <christian.schwarz@nutanix.com> Closes #13698
This commit is contained in:
parent
ad0967638b
commit
91983265b6
@ -6032,6 +6032,23 @@ top:
|
||||
ARC_FLAG_PREDICTIVE_PREFETCH);
|
||||
}
|
||||
|
||||
/*
|
||||
* If there are multiple threads reading the same block
|
||||
* and that block is not yet in the ARC, then only one
|
||||
* thread will do the physical I/O and all other
|
||||
* threads will wait until that I/O completes.
|
||||
* Synchronous reads use the b_cv whereas nowait reads
|
||||
* register a callback. Both are signalled/called in
|
||||
* arc_read_done.
|
||||
*
|
||||
* Errors of the physical I/O may need to be propagated
|
||||
* to the pio. For synchronous reads, we simply restart
|
||||
* this function and it will reassess. Nowait reads
|
||||
* attach the acb_zio_dummy zio to pio and
|
||||
* arc_read_done propagates the physical I/O's io_error
|
||||
* to acb_zio_dummy, and thereby to pio.
|
||||
*/
|
||||
|
||||
if (*arc_flags & ARC_FLAG_WAIT) {
|
||||
cv_wait(&hdr->b_l1hdr.b_cv, hash_lock);
|
||||
mutex_exit(hash_lock);
|
||||
|
Loading…
Reference in New Issue
Block a user