diff options
author | Raghavendra G <raghavendra@gluster.com> | 2010-04-05 13:36:07 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-04-08 03:08:04 -0700 |
commit | 33101bd66614908efafc91ff2950ef3e34b76a3b (patch) | |
tree | 0e98270bc4f19d03c9dbce6b09f5a0de502a5b49 /xlators/performance/io-cache/src/io-cache.c | |
parent | 9c2bc1bc61af888192bde18170b113b4f6f8b4ca (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/io-cache.c')
-rw-r--r-- | xlators/performance/io-cache/src/io-cache.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c index 2e523b15b..9bf20be5b 100644 --- a/xlators/performance/io-cache/src/io-cache.c +++ b/xlators/performance/io-cache/src/io-cache.c @@ -220,6 +220,7 @@ ioc_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, { if (ioc_inode->cache.mtime == 0) { ioc_inode->cache.mtime = stbuf->ia_mtime; + ioc_inode->cache.mtime_nsec = stbuf->ia_mtime_nsec; } ioc_inode->ia_size = stbuf->ia_size; @@ -344,8 +345,10 @@ ioc_cache_validate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, ioc_inode_lock (ioc_inode); { destroy_size = __ioc_inode_flush (ioc_inode); - if (op_ret >= 0) + if (op_ret >= 0) { ioc_inode->cache.mtime = stbuf->ia_mtime; + ioc_inode->cache.mtime_nsec = stbuf->ia_mtime_nsec; + } } ioc_inode_unlock (ioc_inode); local_stbuf = NULL; @@ -606,6 +609,7 @@ ioc_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this, ioc_inode_lock (ioc_inode); { ioc_inode->cache.mtime = buf->ia_mtime; + ioc_inode->cache.mtime_nsec = buf->ia_mtime_nsec; ioc_inode->ia_size = buf->ia_size; if ((table->min_file_size > ioc_inode->ia_size) |