I also haven't had time for an in-depth look into the problem, but I'm inclined 
to agree with Matt. Retrying with delay is usually a sign that there is a 
concurrency problem that is being avoided; for the first issue, I'd be curious 
which ioctls specifically do this. My guess is that they should either not be 
allowed to apply to a receive-in-progress fs or should relatively quickly 
release their long-hold (which sounds like an abuse of the long-holds) and 
unset the owner, in which case recv should be taught how to wait for these 
operations to finish (perhaps using a semaphore or condvar; using a concurrency 
primitive to wait for the proper time is significantly better than sleeping and 
checking).

For the second issue, I'd need more information about the race condition to 
speculate on the proper fix, but I again suspect retrying is not the best 
solution. Is that one related to https://www.illumos.org/issues/3875?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/595#issuecomment-380626950
------------------------------------------
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/discussions/Tc9dce4d8b64cdd96-M3fb13037a2eb6ef4725d64cb
Delivery options: https://openzfs.topicbox.com/groups

Reply via email to