summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr.h
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-09-28 20:58:26 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-09-28 19:36:09 -0700
commit41c32c84892365c5230a5e61addc44dbfcd2e5cf (patch)
tree24de4477aa809e4d60e53fb27b90b0f0d646d241 /xlators/cluster/afr/src/afr.h
parent03b5a87b2f4d641c798440923b255ca30a13bf47 (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 d80243313..210cd2e20 100644
--- a/xlators/cluster/afr/src/afr.h
+++ b/xlators/cluster/afr/src/afr.h
@@ -154,6 +154,7 @@ typedef struct _afr_local {
unsigned int read_child_index;
unsigned char read_child_returned;
+ unsigned int first_up_child;
pid_t saved_pid;