summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr.h
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-09-28 20:58:57 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-09-28 19:36:12 -0700
commit359c46118b756e1a5191ec6e902709258aad903b (patch)
tree80de05d5da31ea5319f3e1daab5fde062d72b171 /xlators/cluster/afr/src/afr.h
parentf09558e2bf5b39284c6a2b750d791d38854ffcfc (diff)
cluster/afr: dir-write: Fix inode number handling.
create, mkdir, symlink, mknod: Prefer to return itransform'd inode number from the first_up_child. If not, fall back on any other child that returned succcess. link, rename: Return the same inode number that was passed as part of loc_t. Also adds a new member to afr_local_t, local->first_up_child which is initialized at the start of the transaction. This fixes the race where a subvolume might go down during the transaction and thus have the first_up_child change. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 285 ("first up child" can change during a transaction) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=285
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
-rw-r--r--xlators/cluster/afr/src/afr.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h
index d9a3435c3f4..87e210b23a3 100644
--- a/xlators/cluster/afr/src/afr.h
+++ b/xlators/cluster/afr/src/afr.h
@@ -146,6 +146,7 @@ typedef struct _afr_local {
unsigned int read_child_index;
unsigned char read_child_returned;
+ unsigned int first_up_child;
pid_t saved_pid;