diff options
author | Xavier Hernandez <xhernandez@datalab.es> | 2014-11-08 21:07:09 +0100 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-01-09 09:46:08 -0800 |
commit | eaf7164ff824ad4d69cf225e49c54fc473b300b8 (patch) | |
tree | 6f2ae6bf9e406c8f27a2057ca94d4d5fb5ba0d61 /xlators/cluster/ec/src/ec-heal.c | |
parent | 71844788a1da0249201b27109e3ea00599569b93 (diff) |
ec: Remove O_APPEND from flags on create and open.
Allowing O_APPEND flag to pass through to the brick files
corrupts fragment contents because writes are not stored on
the desired place.
Write fop has been modified so that it uses current file
size as its write offset. This guarantees that all writes,
even those comming from different file descriptors and
clients, will write to the end of the file.
Change-Id: I9f721f12217a98231fe52e344166d1c94172c272
BUG: 1161621
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/9079
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-heal.c')
-rw-r--r-- | xlators/cluster/ec/src/ec-heal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/ec/src/ec-heal.c b/xlators/cluster/ec/src/ec-heal.c index 0643f250a4c..d37a657de02 100644 --- a/xlators/cluster/ec/src/ec-heal.c +++ b/xlators/cluster/ec/src/ec-heal.c @@ -1056,7 +1056,7 @@ void ec_heal_reopen_fd(ec_heal_t * heal) } else { - flags = ctx_fd->flags & ~O_TRUNC; + flags = ctx_fd->flags & ~(O_TRUNC | O_APPEND); if ((flags & O_ACCMODE) == O_WRONLY) { flags &= ~O_ACCMODE; |