summaryrefslogtreecommitdiffstats
path: root/xlators/performance
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2010-04-06 02:12:11 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-04-08 03:09:08 -0700
commite84fd2a6d04bba29d9c4ec65ea5b194d8f30d833 (patch)
treeca1217b52f71df24c7f9907899bc88ab09adc039 /xlators/performance
parentcc581c33e8fce44e2feac37118e8712dced6992b (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/performance')
-rw-r--r--xlators/performance/quick-read/src/quick-read.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c
index 99503639f..50b113a3a 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.st_mtime != buf->st_mtime)) {
+ && ((qr_file->stbuf.st_mtime != buf->st_mtime)
+ || (ST_MTIM_NSEC(&qr_file->stbuf)
+ != ST_MTIM_NSEC(buf)))) {
dict_unref (qr_file->xattr);
qr_file->xattr = NULL;
}
@@ -583,7 +585,9 @@ qr_validate_cache_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
LOCK (&qr_file->lock);
{
- if (qr_file->stbuf.st_mtime != buf->st_mtime) {
+ if ((qr_file->stbuf.st_mtime != buf->st_mtime)
+ || (ST_MTIM_NSEC(&qr_file->stbuf) !=
+ ST_MTIM_NSEC(buf))) {
dict_unref (qr_file->xattr);
qr_file->xattr = NULL;
}