[OpenAFS-devel] vos parti takes for ages

Harald Barth haba@pdc.kth.se
Mon, 20 Feb 2006 10:19:42 +0100 (MET)


My vos parti takes for ages sometimes. My guess is that it waits
for some lock, probably VOL_LOCK.

partition.c:

void
VSetPartitionDiskUsage(register struct DiskPartition *dp)
{
    VOL_LOCK;
    VSetPartitionDiskUsage_r(dp);
    VOL_UNLOCK;
}

Do we really need VOL_LOCK to read the disk usage values? The only
thing I can think of is the linked list DiskPartitionList which is
updated at startup. Either we'd need a seperate r/w lock around
DiskPartitionList or split the VOL_LOCK into readlock and writelock
(mmm, deadlock).

Another cheapter way may be to abort all
VResetDiskUsage/VSetPartitionDiskUsage until we know that we don't
fiddle with DiskPartitionList any more and then skip the lock.

Thoughts?

Harald.