diff options
author | Vikas Gorur <vikas@gluster.com> | 2009-11-24 08:45:07 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-11-24 06:40:00 -0800 |
commit | 9e3fddb13769288ddc13db3125b8bedf26058cdf (patch) | |
tree | 2da64c5ca49ed14b22c253d67eed800533bf1e94 /xlators/cluster/afr/src/afr.h | |
parent | 21cffbc219efc36229002e71a02b9270cfee9186 (diff) |
cluster/afr: Refactored the data self-heal algorithm.
Refactored the operation of the data self-heal algorithm
as:
* open all fd's (if fd not supplied by caller)
* lock 0-0 (if lock not supplied by caller)
* fxattrop, fstat (instead of lookup)
... self heal ...
* unlock (if lock not supplied by caller)
* close (if fd not supplied by caller).
Signed-off-by: Vikas Gorur <vikas@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
-rw-r--r-- | xlators/cluster/afr/src/afr.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index 2f57426621d..412f38afc79 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -118,6 +118,12 @@ typedef struct { /* private data for the particular self-heal algorithm */ void *private; + gf_boolean_t healing_fd_opened; /* set by caller: true if caller + has already opened fd */ + + gf_boolean_t data_lock_held; /* set by caller: true if caller + has already acquired 0-0 lock */ + int (*completion_cbk) (call_frame_t *frame, xlator_t *this); int (*algo_completion_cbk) (call_frame_t *frame, xlator_t *this); int (*algo_abort_cbk) (call_frame_t *frame, xlator_t *this); |