freebsd-nq/sys/cddl
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
..
boot/zfs loader: support com.delphix:removing 2019-08-08 18:08:13 +00:00
compat/opensolaris ZFS: add emulation of atomic_swap_64 and atomic_load_64 2019-10-07 07:54:34 +00:00
contrib/opensolaris zfs: use atomic_load_64 to read atomic variable in dmu_object_alloc_impl 2019-10-08 11:27:48 +00:00
dev dtrace: 64-bits registers support 2019-10-04 16:17:00 +00:00