diff options
author | Vikas Gorur <vikas@gluster.com> | 2009-09-17 05:56:29 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-09-22 06:13:33 -0700 |
commit | 356449c0b39d600a16b195df30d0fc37693575f8 (patch) | |
tree | 6fc880997a4be95840a4725181a8f1ce4de52b32 | |
parent | a4d729c7dccd5cdf72f640e39564103412d867ec (diff) |
cluster/afr: Open source and sinks in read/write mode during self-heal.
Since a self-heal algorithm (e.g., rsync) might want to both read
and write from both the source and sink files, open them as O_RDWR.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-data.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c index 06372d47d..d1c01cf5e 100644 --- a/xlators/cluster/afr/src/afr-self-heal-data.c +++ b/xlators/cluster/afr/src/afr-self-heal-data.c @@ -736,7 +736,7 @@ afr_sh_data_open (call_frame_t *frame, xlator_t *this) (void *) (long) source, priv->children[source], priv->children[source]->fops->open, - &local->loc, O_RDONLY|O_LARGEFILE, fd); + &local->loc, O_RDWR|O_LARGEFILE, fd); call_count--; /* open sinks */ @@ -749,7 +749,7 @@ afr_sh_data_open (call_frame_t *frame, xlator_t *this) priv->children[i], priv->children[i]->fops->open, &local->loc, - O_WRONLY|O_LARGEFILE, fd); + O_RDWR|O_LARGEFILE, fd); if (!--call_count) break; |