summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2010-04-05 13:36:36 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-04-08 03:08:08 -0700
commit3642cd246ea598d7a72dff74f49b78964678719c (patch)
tree7b875563b3ab917b2caa2e800244b522d84d3c37 /xlators
parent33101bd66614908efafc91ff2950ef3e34b76a3b (diff)
performance/quick-read: make use of nanosecond resolution of mtime to decide whether to keep cache or not.
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')
-rw-r--r--xlators/performance/quick-read/src/quick-read.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c
index 36cfc42b47d..41fa8b070d8 100644
--- a/xlators/performance/quick-read/src/quick-read.c
+++ b/xlators/performance/quick-read/src/quick-read.c
@@ -215,7 +215,9 @@ unlock:
LOCK (&qr_file->lock);
{
if (qr_file->xattr
- && (qr_file->stbuf.ia_mtime != buf->ia_mtime)) {
+ && ((qr_file->stbuf.ia_mtime != buf->ia_mtime)
+ || (qr_file->stbuf.ia_mtime_nsec
+ != buf->ia_mtime_nsec))) {
dict_unref (qr_file->xattr);
qr_file->xattr = NULL;
}
@@ -580,7 +582,8 @@ qr_validate_cache_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
LOCK (&qr_file->lock);
{
- if (qr_file->stbuf.ia_mtime != buf->ia_mtime) {
+ if ((qr_file->stbuf.ia_mtime != buf->ia_mtime)
+ && (qr_file->stbuf.ia_mtime_nsec != buf->ia_mtime_nsec)) {
dict_unref (qr_file->xattr);
qr_file->xattr = NULL;
}