afs: Traverse discard/free dslot list if errors
authorAndrew Deason <adeason@sinenomine.net>
Thu, 1 Nov 2012 18:41:06 +0000 (13:41 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 30 Oct 2013 18:33:04 +0000 (11:33 -0700)
commit2679af764de250448e3c7c8344c961f9b8149fd7
treeef7dc6099261c7b757050c02b1e2444d4faeab0b
parent9d40feb5977bcaf897b869b52a9ae39c1a86a096
afs: Traverse discard/free dslot list if errors

Currently, when we pull a dslot off of the discard or free list, we
just try to get the first entry from the list, and panic if we cannot
get it. Instead, traverse through the whole list, trying to find an
entry we can successfully get. This introduces the helper function
afs_GetDSlotFromList to do this traversal.

This does not yet address the case where we cannot get any entry on
the relevant list.

Reviewed-on: http://gerrit.openafs.org/8376
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 336939179721d79a6798614ff747dd06701e3edc)

Change-Id: I12d8cfbe7d1fe7bbe50b49bcee34a8a5dced1569
Reviewed-on: http://gerrit.openafs.org/10354
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/afs_dcache.c