From d3a1b1e45d83d66eeb4fbd630dfe716b263b437c Mon Sep 17 00:00:00 2001 From: Harshavardhana Ranganath Date: Thu, 29 Oct 2009 00:50:03 +0000 Subject: change open flag to O_RDWR as ftruncate fails for a read only fd Signed-off-by: Anand V. Avati BUG: 112 (parallel deletion of files mounted by different clients on the same back-end hangs and/or does not completely delete) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=112 --- xlators/storage/posix/src/posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators') diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index aafa1d4c7..d52f90dc0 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -1021,7 +1021,7 @@ posix_unlink (call_frame_t *frame, xlator_t *this, priv = this->private; if (priv->background_unlink) { if (S_ISREG (loc->inode->st_mode)) { - fd = open (real_path, O_RDONLY); + fd = open (real_path, O_RDWR); if (fd == -1) { op_ret = -1; op_errno = errno; -- cgit