summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2015-10-01 16:31:19 -0400
committerJeff Darcy <jdarcy@redhat.com>2015-10-28 13:38:42 -0700
commit3066a21caafab6305527991de11c8eb43ec0044c (patch)
tree5efc91272ac76ff1613cee1e8a41aeb32aa92d73 /xlators/features/marker
parent063d4ead61ee47433793de81a1c77e0ba69e6e07 (diff)
core: use syscall wrappers instead of direct syscalls - miscellaneous
various xlators and other components are invoking system calls directly instead of using the libglusterfs/syscall.[ch] wrappers. If not using the system call wrappers there should be a comment in the source explaining why the wrapper isn't used. Change-Id: I1f47820534c890a00b452fa61f7438eb2b3f667c BUG: 1267967 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/12276 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'xlators/features/marker')
-rw-r--r--xlators/features/marker/src/marker.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index 4e4a280ba31..e579417810f 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -17,6 +17,7 @@
#include "marker-common.h"
#include "byte-order.h"
#include "syncop.h"
+#include "syscall.h"
#include <fnmatch.h>
@@ -178,7 +179,7 @@ marker_error_handler (xlator_t *this, marker_local_t *local, int32_t op_errno)
"Indexing gone corrupt at %s (reason: %s)."
" Geo-replication slave content needs to be revalidated",
path, strerror (op_errno));
- unlink (priv->timestamp_file);
+ sys_unlink (priv->timestamp_file);
return 0;
}
@@ -235,7 +236,7 @@ stat_stampfile (xlator_t *this, marker_conf_t *priv,
GF_ASSERT (sizeof (priv->volume_uuid_bin) == 16);
memcpy (vol_mark->uuid, priv->volume_uuid_bin, 16);
- if (stat (priv->timestamp_file, &buf) != -1) {
+ if (sys_stat (priv->timestamp_file, &buf) != -1) {
vol_mark->retval = 0;
vol_mark->sec = htonl (buf.st_mtime);
vol_mark->usec = htonl (ST_MTIM_NSEC (&buf)/1000);
@@ -2101,7 +2102,7 @@ call_from_sp_client_to_reset_tmfile (call_frame_t *frame,
/* TODO check whether the O_TRUNC would update the
* timestamps on a zero length file on all machies.
*/
- close (fd);
+ sys_close (fd);
}
if (fd != -1 || errno == ENOENT) {