freebsd-skq/sys/cddl/contrib/opensolaris
Andriy Gapon ac99b25298 zfs: use atomic_load_64 to read atomic variable in dmu_object_alloc_impl
As long as we support ZFS on 32-bit platforms we should do this for all
64-bit variables that are modified in a lockless fashion using atomic
operations.  Otherwise, there is a risk of a reading a torn value.

Here is a rationale for why I am doing this in dmu_object_alloc_impl:
- it's very recent code
- the code deals with object IDs and a number of objects in a file
  system can overflow 32 bits
- incorrect allocation of an object ID may result in hard to debug
  problems
- fixing all plain reads of 64-bit atomic variables is not a trivial
  undertaking to do in one shot, so I chose to do it incrementally

MFC after:	3 weeks
X-MFC after:	r353301, r353176
2019-10-08 11:27:48 +00:00
..
common fix up r353168, add atomic_swap_64 to i386 version of opensolaris_atomic.S 2019-10-07 12:53:27 +00:00
uts zfs: use atomic_load_64 to read atomic variable in dmu_object_alloc_impl 2019-10-08 11:27:48 +00:00
OPENSOLARIS.LICENSE