macos: bulkstat redux
authorDerrick Brashear <shadow@dementia.org>
Fri, 20 May 2011 18:13:01 +0000 (14:13 -0400)
committerDerrick Brashear <shadow@dementia.org>
Sat, 21 May 2011 13:50:20 +0000 (06:50 -0700)
commit04087af8494b90f664ac5f274d5db4c12063f238
treef5746c9409a1d0a047c2c567b8cc3678d0d0f848
parent0cf06f620213fa62abc16bf717779a1333ce12a0
macos: bulkstat redux

simplify the logic which can require sleeps in various vcache
resolution paths. instead of the two-pass system we had before,
just guess using the even/odd hack what type a vnode will be.
if a vnode turns out to be a link and thus we are wrong, we
do a fixup later. other callers who "race" with bulkstat
(which is a supported feature, otherwise you'd have to block
callbacks) will also call through a fixup to get the correct
backing vnode type. this is necessary as the KPI doesn't
let us change the type of a vnode after it's been created.

side effect: eliminate many of the ugly cases where we had been
sleeping waiting for a vnode to be finalized even before bulkstat.

Change-Id: Ib888fa5577d48354725ea72305765e4341bc2366
Reviewed-on: http://gerrit.openafs.org/4677
Tested-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/afs/DARWIN/osi_inode.c
src/afs/DARWIN/osi_prototypes.h
src/afs/DARWIN/osi_vcache.c
src/afs/DARWIN/osi_vfsops.c
src/afs/DARWIN/osi_vnodeops.c
src/afs/VNOPS/afs_vnop_lookup.c
src/afs/afs.h
src/afs/afs_callback.c
src/afs/afs_pioctl.c
src/afs/afs_vcache.c