summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorKaushik BV <kaushikbv@gluster.com>2011-02-15 03:08:17 +0000
committerVijay Bellur <vijay@dev.gluster.com>2011-03-14 11:06:39 -0700
commit7d61416a443b1786158c6236f182b6c11b3619f7 (patch)
tree0a8ce8608764f8b74c515327cef7aca5fe92b6b0 /xlators/features
parentab7dc7aafa61ae66db4ce7aa5e33e3ee408fd878 (diff)
features/marker: open the timestamp file with O_TRUNC to update the ctime
Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2354 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2354
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/marker/src/marker.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index 47ce20f86..f6302247e 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -1002,14 +1002,11 @@ call_from_sp_client_to_reset_tmfile (call_frame_t *frame,
if (data->len == 0 || (data->len == 5 &&
memcmp (data->data, "RESET", 5) == 0)) {
- fd = open (priv->timestamp_file, O_WRONLY);
+ fd = open (priv->timestamp_file, O_WRONLY|O_TRUNC);
if (fd != -1) {
- /* this call is needed because of the unsurity
- * whether the O_TRUNC would update the timestamps
- * on a zero length file as well. Hence updating it
- * manually.
+ /* TODO check whether the O_TRUNC would update the
+ * timestamps on a zero length file on all machies.
*/
- futimens (fd, NULL);
close (fd);
}