From 356449c0b39d600a16b195df30d0fc37693575f8 Mon Sep 17 00:00:00 2001 From: Vikas Gorur Date: Thu, 17 Sep 2009 05:56:29 +0000 Subject: 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 --- xlators/cluster/afr/src/afr-self-heal-data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators') diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c index 06372d47d39..d1c01cf5e3a 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; -- cgit