OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-3966-g47124f3
Gerrit Code Review
gerrit@openafs.org
Tue, 8 Oct 2013 05:51:44 -0700 (PDT)
The following commit has been merged in the master branch:
commit 47124f337b43f8731bfbe3bd71e42d046a4d1075
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Aug 12 17:37:29 2013 -0500
viced: Avoid endless BCB loop
Without this commit, when we break callbacks for a fid, we loop over
all callbacks for the fid, break a few of them, and then start over.
We do this repeatedly until we run out of callbacks. If a client sees
a callback break, and then establishes a new callback promise while
the fileserver is still breaking callbacks, the fileserver can break
the same callback for the same host again and again. This can continue
forever, if the client establishes its new callback promises quickly
enough.
So to avoid this, when we start breaking callbacks, flag all of the
callback structures that we want to look at. Then when we repeatedly
loop through all of the callbacks for the fid, only look at the
flagged callback structures.
This adds a 'flags' field to struct CallBack, and defines a single
flag, CBFLAG_BREAKING.
This is an alternative fix to the issue also fixed in 843d705c. This
implementation avoids allocating extra memory under locks, and has the
slight benefit of not breaking callbacks that were elsewhere deleted
during the BCB. This comes at the cost of a single extra traversal
through our callback list, and the cost of claiming one of the bits in
the CallBack structure.
Change-Id: I6418bd404de61ec7a531261ecf581eeea719a2d4
Reviewed-on: http://gerrit.openafs.org/10172
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
src/viced/callback.c | 25 ++++++++++++++++++++++---
src/viced/callback.h | 6 +++++-
2 files changed, 27 insertions(+), 4 deletions(-)
--
OpenAFS Master Repository