diff options
author | Raghavendra G <raghavendra@gluster.com> | 2010-04-06 02:16:20 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-04-08 03:08:42 -0700 |
commit | 0014fe4cc0f62cdb1d0292d37caf19c31f6d2d9e (patch) | |
tree | a6063450f233f959de4db076e15e4eb603bd13a6 /xlators/performance/io-cache/src/page.c | |
parent | ab9fc36210071f95d5cb723e0fb9b738d31c8651 (diff) |
performance/io-cache: make use of nano second resolution of mtime during cache validation.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 801 (Direct io-mode support and related changes in caching translators.)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=801
Diffstat (limited to 'xlators/performance/io-cache/src/page.c')
-rw-r--r-- | xlators/performance/io-cache/src/page.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/performance/io-cache/src/page.c b/xlators/performance/io-cache/src/page.c index b3833fff0..c469a2620 100644 --- a/xlators/performance/io-cache/src/page.c +++ b/xlators/performance/io-cache/src/page.c @@ -284,7 +284,8 @@ ioc_cache_still_valid (ioc_inode_t *ioc_inode, struct stat *stbuf) cache_still_valid = 0; #else - if (!stbuf || (stbuf->st_mtime != ioc_inode->mtime)) + if (!stbuf || (stbuf->st_mtime != ioc_inode->mtime) + || (ST_MTIM_NSEC(stbuf) != ioc_inode->mtime_nsec)) cache_still_valid = 0; #endif @@ -359,8 +360,10 @@ ioc_fault_cbk (call_frame_t *frame, void *cookie, xlator_t *this, destroy_size = __ioc_inode_flush (ioc_inode); } - if ((op_ret >= 0) && !zero_filled) + if ((op_ret >= 0) && !zero_filled) { ioc_inode->mtime = stbuf->st_mtime; + ST_MTIM_NSEC_SET(stbuf, ioc_inode->mtime_nsec); + } gettimeofday (&ioc_inode->tv, NULL); |