[Bugs] [Bug 1364912] The content of file in client is wrong when time was adjusted by NTP in this client.

bugzilla at redhat.com bugzilla at redhat.com
Mon Aug 8 08:31:04 UTC 2016


https://bugzilla.redhat.com/show_bug.cgi?id=1364912



--- Comment #1 from George <george.lian at nokia.com> ---
I try to fix the issue with the below patch, wish your comments and final fix. 
---------------------------------------------------------------------------


diff a b
--- a/xlators/performance/md-cache/src/md-cache.c
+++ b/xlators/performance/md-cache/src/md-cache.c
@@ -329,7 +329,7 @@

         LOCK (&mdc->lock);
         {
-                if (now >= (mdc->ia_time + conf->timeout))
+                if (now >= (mdc->ia_time + conf->timeout) || now <
mdc->ia_time)
                         ret = _gf_false;
         }
         UNLOCK (&mdc->lock);
@@ -351,7 +351,7 @@

         LOCK (&mdc->lock);
         {
-                if (now >= (mdc->xa_time + conf->timeout))
+                if (now >= (mdc->xa_time + conf->timeout) || now <
mdc->xa_time)
                         ret = _gf_false;
         }
         UNLOCK (&mdc->lock);
--- a/xlators/performance/quick-read/src/quick-read.c
+++ b/xlators/performance/quick-read/src/quick-read.c
@@ -384,7 +384,7 @@

        timersub (&now, &qr_inode->last_refresh, &diff);

-       if (diff.tv_sec >= conf->cache_timeout)
+       if (diff.tv_sec >= conf->cache_timeout || timercmp (&now,
&qr_inode->last_refresh, <) )
                return _gf_false;

        return _gf_true;

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Bugs mailing list