diff options
author | Venky Shankar <vshankar@redhat.com> | 2013-03-07 23:22:32 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-03-21 04:21:45 -0700 |
commit | d8926b5e91091f896b877136238eef87383f72ed (patch) | |
tree | e6a9b132f4e2412cef1f519cb2c6a59b455ef193 | |
parent | 66d5d91465deba55afa9e1ab3a2160fc9d1b9275 (diff) |
features/marker: log error when unlinking timestamp file
... so it's easy to figure out errno caused it. As of now
it's only due to ENOSPC. Logging is done in the error handling
routine, so any further changes that require unlinking of the
timestamp file due to some error condition(s) are logged.
Change-Id: Ia59338e2e32b2adbbd1d56aa260018270f1abae9
BUG: 853911
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/4649
Reviewed-by: Csaba Henk <csaba@redhat.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
-rw-r--r-- | xlators/features/marker/src/marker.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index 6c68167d8ff..82d9066d515 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -146,12 +146,21 @@ out: } int32_t -marker_error_handler (xlator_t *this) +marker_error_handler (xlator_t *this, marker_local_t *local, int32_t op_errno) { - marker_conf_t *priv = NULL; + marker_conf_t *priv = NULL; + const char *path = NULL; - priv = (marker_conf_t *) this->private; + priv = (marker_conf_t *) this->private; + path = local + ? (local->loc.path + ? local->loc.path : uuid_utoa(local->loc.gfid)) + : "<nul>"; + gf_log (this->name, GF_LOG_CRITICAL, + "Indexing gone corrupt at %s (reason: %s)." + " Geo-replication slave content needs to be revalidated", + path, strerror (op_errno)); unlink (priv->timestamp_file); return 0; @@ -345,7 +354,7 @@ marker_specific_setxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, local = (marker_local_t*) frame->local; if (op_ret == -1 && op_errno == ENOSPC) { - marker_error_handler (this); + marker_error_handler (this, local, op_errno); done = 1; goto out; } |