DAFS: Maintain viced volume group hierarchy cache
authorAndrew Deason <adeason@sinenomine.net>
Thu, 4 Feb 2010 22:47:19 +0000 (16:47 -0600)
committerDerrick Brashear <shadow@dementia.org>
Wed, 17 Feb 2010 17:33:18 +0000 (09:33 -0800)
commit60e8dcb4e66c6edc90a0448221b7d1818bd5cafb
tree651da8024149198ece79228074aef87778d0efa4
parentab32b23806b840a67e9423865d594992b41a0602
DAFS: Maintain viced volume group hierarchy cache

When salvaging a volume (with DAFS or not), it is required to read the
volume headers of all volumes on the partition, so we know what volumes
are in the same volume group as the salvaged volume. Currently with
DAFS, this requirement can make demand-salvages very slow, since each
demand-salvage must read each volume header on the partition.

So, instead of having each demand-salvage read the volume headers
itself, have a demand-salvage request the required volume group
hierarchy information from the fileserver. The fileserver will scan the
partition's volume headers, and will keep the hierarchy cached in
memory. Any modifications to this hierarchy from volume
creation/deletion will update this volume group cache (VGC) via FSSYNC
commands.

This results in a dramatic salvaging speedup when many demand-salvages
are requested, and eliminates the cases where DAFS salvaging can be
significantly slower than non-DAFS salvaging.

FIXES 124488

Change-Id: Ie9ae655593ad8a90ca6ad8f63e6b6e799f283988
Reviewed-on: http://gerrit.openafs.org/880
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
18 files changed:
doc/arch/fssync.txt
src/tviced/Makefile.in
src/vol/fssync-client.c
src/vol/fssync-debug.c
src/vol/fssync-server.c
src/vol/fssync.h
src/vol/partition.c
src/vol/partition.h
src/vol/salvsync.h
src/vol/vg_cache.c [new file with mode: 0644]
src/vol/vg_cache.h [new file with mode: 0644]
src/vol/vg_cache_impl.h [new file with mode: 0644]
src/vol/vg_cache_impl_types.h [new file with mode: 0644]
src/vol/vg_cache_types.h [new file with mode: 0644]
src/vol/vg_scan.c [new file with mode: 0644]
src/vol/vol-salvage.c
src/vol/voldefs.h
src/vol/vutil.c