eric kustarz wrote: > > On Mar 6, 2008, at 7:58 AM, Brian D. Horn wrote: > >> Take a look at CR 6634371. It's worse than you probably thought. > > The only place i see ZFS mentioned in that bug report is regarding > z_mapcnt. Its being atomically inc/dec in zfs_addmap()/zfs_delmap() - > so those are ok. > > In zfs_frlock(), technically we should be using atomic_add_64(, 0), > though locking isn't even necessary around checking z_mapcnt. Its > advisory in this case. > > The ASSERT in zfs_delmap() is broken. That should be fixed. Not an > issue on non-debug kernels (which our customers use). > > The statement of: > " >> ZFS is not 32-bit safe. There are a number of places in the ZFS code >> where >> it is assumed that a 64-bit data object is being read atomically (or set >> atomically). It simply isn't true and can lead to weird and bugs. > " > > is completely off though. > > If you find other places in ZFS that have the problem mentioned in > 6634371, please let us know. I just started looking around, but I'm not going to track down each an every case, but...
arc.c:arc_evict the bare use of arc_mru_ghost->arcs_size and arc_mru_ghost->arcs_lsize[type] appears suspect. arc.c:arc_adjust the bare use of arc_anon->arcs_size and arc_mur->arcs_size appear suspect. arc.c:arc_reclaim_thread arc_mru_ghost->arcs_size and arc_mfu_ghost->arcs_size arc.carc_adapt arc_mru_ghost->arcs_size arc_mfu_ghost->arcs_size arc.c:arcspace_return arc_meta_used zfs_vnops.c:zfs_frlock zp->z_mapcnt appears suspect There are certainly others and some may not have bad effects, but these are 64-bit objects which are being atomically updated, but then later (apparently) not atomically read and are not statistics. I'm suggesting that a through examination be done on the code (zfs and other places in Solaris) to look for all such bare uses of 64-bit non local data. Even the statistics cases should be fixed, but they are critical, just confusing when they are wrong. > > eric _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss