summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr
diff options
context:
space:
mode:
authorVikas Gorur <vikas@zresearch.com>2009-03-12 16:21:51 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-03-12 16:29:45 +0530
commit7af8d8edbd8554235348e0f54348edf222c0b46e (patch)
tree21333449bf86e3481e8bc4197d17f69472398ef9 /xlators/cluster/afr
parent31c817836c9c56eca1441b3b6f8b83db41c67f94 (diff)
Add extra 'volume' parameter to inodelk/entrylk calls
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/cluster/afr')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-common.c2
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-data.c2
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-entry.c2
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-metadata.c2
-rw-r--r--xlators/cluster/afr/src/afr-transaction.c27
-rw-r--r--xlators/cluster/afr/src/afr.c22
6 files changed, 37 insertions, 20 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c
index f418085e53e..aea31a748f5 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.c
+++ b/xlators/cluster/afr/src/afr-self-heal-common.c
@@ -504,6 +504,7 @@ sh_missing_entries_finish (call_frame_t *frame, xlator_t *this)
STACK_WIND (frame, sh_missing_entries_unlck_cbk,
priv->children[i],
priv->children[i]->fops->entrylk,
+ this->name,
&sh->parent_loc, local->loc.name,
ENTRYLK_UNLOCK, ENTRYLK_WRLCK);
@@ -1008,6 +1009,7 @@ afr_self_heal_missing_entries (call_frame_t *frame, xlator_t *this)
STACK_WIND (frame, sh_missing_entries_lk_cbk,
priv->children[i],
priv->children[i]->fops->entrylk,
+ this->name,
&sh->parent_loc, local->loc.name,
ENTRYLK_LOCK_NB, ENTRYLK_WRLCK);
if (!--call_count)
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c
index 674d2923f1c..775845fe6be 100644
--- a/xlators/cluster/afr/src/afr-self-heal-data.c
+++ b/xlators/cluster/afr/src/afr-self-heal-data.c
@@ -231,6 +231,7 @@ afr_sh_data_unlock (call_frame_t *frame, xlator_t *this)
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->inodelk,
+ this->name,
&local->loc, F_SETLK, &flock);
if (!--call_count)
break;
@@ -995,6 +996,7 @@ afr_sh_data_lock (call_frame_t *frame, xlator_t *this)
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->inodelk,
+ this->name,
&local->loc, F_SETLK, &flock);
if (!--call_count)
break;
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c
index d5b6dff3cb4..e7431249fc3 100644
--- a/xlators/cluster/afr/src/afr-self-heal-entry.c
+++ b/xlators/cluster/afr/src/afr-self-heal-entry.c
@@ -146,6 +146,7 @@ afr_sh_entry_unlock (call_frame_t *frame, xlator_t *this)
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->entrylk,
+ this->name,
&local->loc, NULL,
ENTRYLK_UNLOCK, ENTRYLK_WRLCK);
if (!--call_count)
@@ -2001,6 +2002,7 @@ afr_sh_entry_lock (call_frame_t *frame, xlator_t *this)
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->entrylk,
+ this->name,
&local->loc, NULL,
ENTRYLK_LOCK_NB, ENTRYLK_WRLCK);
if (!--call_count)
diff --git a/xlators/cluster/afr/src/afr-self-heal-metadata.c b/xlators/cluster/afr/src/afr-self-heal-metadata.c
index 6c66f8704b0..de8fa1a3914 100644
--- a/xlators/cluster/afr/src/afr-self-heal-metadata.c
+++ b/xlators/cluster/afr/src/afr-self-heal-metadata.c
@@ -158,6 +158,7 @@ afr_sh_metadata_finish (call_frame_t *frame, xlator_t *this)
STACK_WIND (frame, afr_sh_metadata_unlck_cbk,
priv->children[i],
priv->children[i]->fops->inodelk,
+ this->name,
&local->loc, F_SETLK, &flock);
if (!--call_count)
@@ -755,6 +756,7 @@ afr_sh_metadata_lock (call_frame_t *frame, xlator_t *this)
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->inodelk,
+ this->name,
&local->loc, F_SETLK, &flock);
if (!--call_count)
diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c
index 82c2ee3406f..0590b598405 100644
--- a/xlators/cluster/afr/src/afr-transaction.c
+++ b/xlators/cluster/afr/src/afr-transaction.c
@@ -309,12 +309,14 @@ afr_unlock (call_frame_t *frame, xlator_t *this)
STACK_WIND (frame, afr_unlock_common_cbk,
priv->children[i],
priv->children[i]->fops->finodelk,
- local->fd, F_SETLK, &flock);
+ this->name, local->fd,
+ F_SETLK, &flock);
} else {
STACK_WIND (frame, afr_unlock_common_cbk,
priv->children[i],
priv->children[i]->fops->inodelk,
- &local->loc, F_SETLK, &flock);
+ this->name, &local->loc,
+ F_SETLK, &flock);
}
break;
@@ -324,6 +326,7 @@ afr_unlock (call_frame_t *frame, xlator_t *this)
STACK_WIND (frame, afr_unlock_common_cbk,
priv->children[i],
priv->children[i]->fops->entrylk,
+ this->name,
&local->transaction.new_parent_loc,
local->transaction.new_basename,
ENTRYLK_UNLOCK, ENTRYLK_WRLCK);
@@ -337,14 +340,15 @@ afr_unlock (call_frame_t *frame, xlator_t *this)
STACK_WIND (frame, afr_unlock_common_cbk,
priv->children[i],
priv->children[i]->fops->fentrylk,
- local->fd,
+ this->name, local->fd,
local->transaction.basename,
ENTRYLK_UNLOCK, ENTRYLK_WRLCK);
} else {
STACK_WIND (frame, afr_unlock_common_cbk,
priv->children[i],
priv->children[i]->fops->entrylk,
- &local->transaction.parent_loc,
+ this->name,
+ &local->transaction.parent_loc,
local->transaction.basename,
ENTRYLK_UNLOCK, ENTRYLK_WRLCK);
@@ -838,14 +842,16 @@ int afr_lock_rec (call_frame_t *frame, xlator_t *this, int child_index)
(void *) (long) child_index,
priv->children[child_index],
priv->children[child_index]->fops->finodelk,
- local->fd, F_SETLKW, &flock);
+ this->name, local->fd,
+ F_SETLKW, &flock);
} else {
STACK_WIND_COOKIE (frame, afr_lock_cbk,
(void *) (long) child_index,
priv->children[child_index],
priv->children[child_index]->fops->inodelk,
- &local->loc, F_SETLKW, &flock);
+ this->name, &local->loc,
+ F_SETLKW, &flock);
}
break;
@@ -878,14 +884,14 @@ int afr_lock_rec (call_frame_t *frame, xlator_t *this, int child_index)
(void *) (long) child_index,
priv->children[child_index],
priv->children[child_index]->fops->entrylk,
- lower, lower_name,
+ this->name, lower, lower_name,
ENTRYLK_LOCK, ENTRYLK_WRLCK);
STACK_WIND_COOKIE (frame, afr_lock_cbk,
(void *) (long) child_index,
priv->children[child_index],
priv->children[child_index]->fops->entrylk,
- higher, higher_name,
+ this->name, higher, higher_name,
ENTRYLK_LOCK, ENTRYLK_WRLCK);
break;
@@ -897,7 +903,7 @@ int afr_lock_rec (call_frame_t *frame, xlator_t *this, int child_index)
(void *) (long) child_index,
priv->children[child_index],
priv->children[child_index]->fops->fentrylk,
- local->fd,
+ this->name, local->fd,
local->transaction.basename,
ENTRYLK_LOCK, ENTRYLK_WRLCK);
} else {
@@ -905,7 +911,8 @@ int afr_lock_rec (call_frame_t *frame, xlator_t *this, int child_index)
(void *) (long) child_index,
priv->children[child_index],
priv->children[child_index]->fops->entrylk,
- &local->transaction.parent_loc,
+ this->name,
+ &local->transaction.parent_loc,
local->transaction.basename,
ENTRYLK_LOCK, ENTRYLK_WRLCK);
}
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c
index acd7f8d0236..bd213b5326d 100644
--- a/xlators/cluster/afr/src/afr.c
+++ b/xlators/cluster/afr/src/afr.c
@@ -1173,8 +1173,8 @@ afr_inodelk_cbk (call_frame_t *frame, void *cookie,
int32_t
-afr_inodelk (call_frame_t *frame, xlator_t *this, loc_t *loc,
- int32_t cmd, struct flock *flock)
+afr_inodelk (call_frame_t *frame, xlator_t *this,
+ const char *volume, loc_t *loc, int32_t cmd, struct flock *flock)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -1208,7 +1208,7 @@ afr_inodelk (call_frame_t *frame, xlator_t *this, loc_t *loc,
STACK_WIND (frame, afr_inodelk_cbk,
priv->children[i],
priv->children[i]->fops->inodelk,
- loc, cmd, flock);
+ volume, loc, cmd, flock);
if (!--call_count)
break;
@@ -1254,8 +1254,8 @@ afr_finodelk_cbk (call_frame_t *frame, void *cookie,
int32_t
-afr_finodelk (call_frame_t *frame, xlator_t *this, fd_t *fd,
- int32_t cmd, struct flock *flock)
+afr_finodelk (call_frame_t *frame, xlator_t *this,
+ const char *volume, fd_t *fd, int32_t cmd, struct flock *flock)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -1289,7 +1289,7 @@ afr_finodelk (call_frame_t *frame, xlator_t *this, fd_t *fd,
STACK_WIND (frame, afr_finodelk_cbk,
priv->children[i],
priv->children[i]->fops->finodelk,
- fd, cmd, flock);
+ volume, fd, cmd, flock);
if (!--call_count)
break;
@@ -1335,7 +1335,8 @@ afr_entrylk_cbk (call_frame_t *frame, void *cookie,
int32_t
-afr_entrylk (call_frame_t *frame, xlator_t *this, loc_t *loc,
+afr_entrylk (call_frame_t *frame, xlator_t *this,
+ const char *volume, loc_t *loc,
const char *basename, entrylk_cmd cmd, entrylk_type type)
{
afr_private_t *priv = NULL;
@@ -1370,7 +1371,7 @@ afr_entrylk (call_frame_t *frame, xlator_t *this, loc_t *loc,
STACK_WIND (frame, afr_entrylk_cbk,
priv->children[i],
priv->children[i]->fops->entrylk,
- loc, basename, cmd, type);
+ volume, loc, basename, cmd, type);
if (!--call_count)
break;
@@ -1417,7 +1418,8 @@ afr_fentrylk_cbk (call_frame_t *frame, void *cookie,
int32_t
-afr_fentrylk (call_frame_t *frame, xlator_t *this, fd_t *fd,
+afr_fentrylk (call_frame_t *frame, xlator_t *this,
+ const char *volume, fd_t *fd,
const char *basename, entrylk_cmd cmd, entrylk_type type)
{
afr_private_t *priv = NULL;
@@ -1452,7 +1454,7 @@ afr_fentrylk (call_frame_t *frame, xlator_t *this, fd_t *fd,
STACK_WIND (frame, afr_fentrylk_cbk,
priv->children[i],
priv->children[i]->fops->fentrylk,
- fd, basename, cmd, type);
+ volume, fd, basename, cmd, type);
if (!--call_count)
break;