diff options
Diffstat (limited to 'xlators/features/changelog/lib/src/gf-history-changelog.c')
-rw-r--r-- | xlators/features/changelog/lib/src/gf-history-changelog.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/xlators/features/changelog/lib/src/gf-history-changelog.c b/xlators/features/changelog/lib/src/gf-history-changelog.c index 5ed50390a7c..45f2d8ba9f3 100644 --- a/xlators/features/changelog/lib/src/gf-history-changelog.c +++ b/xlators/features/changelog/lib/src/gf-history-changelog.c @@ -805,6 +805,9 @@ gf_history_changelog (char* changelog_dir, unsigned long start, ret = pthread_attr_init (&attr); if (ret != 0) { + gf_msg (this->name, GF_LOG_ERROR, errno, + CHANGELOG_LIB_MSG_PTHREAD_ERROR, + "Pthread init failed"); return -1; } @@ -828,6 +831,10 @@ gf_history_changelog (char* changelog_dir, unsigned long start, /* basic sanity check */ if (start > end || n_parallel <= 0) { + gf_msg (this->name, GF_LOG_ERROR, errno, + CHANGELOG_LIB_MSG_HIST_FAILED, "Sanity check failed. " + "START - %lu END - %lu THREAD_COUNT - %d", + start, end, n_parallel); ret = -1; goto out; } @@ -964,8 +971,14 @@ gf_history_changelog (char* changelog_dir, unsigned long start, goto out; - } /* end of range check */ - + } else {/* end of range check */ + gf_msg (this->name, GF_LOG_ERROR, errno, + CHANGELOG_LIB_MSG_HIST_FAILED, "Requested changelog " + "range is not available. START - %lu CHLOG_MIN - %lu " + "CHLOG_MAX - %lu", start, min_ts, max_ts); + ret = -2; + goto out; + } } /* end of readdir() */ if (!from || !to) |