diff options
author | Poornima G <pgurusid@redhat.com> | 2016-07-29 15:03:47 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2016-08-27 05:56:35 -0700 |
commit | f8b51bef8820142264bdca9cfe0d7106fb045c2a (patch) | |
tree | 33f2bd17be0802d9a6cbe2df2df888d18d3c0f0b | |
parent | b85c648a6b236ca03494cb61b97e2e703be0950c (diff) |
md-cache: Fix wrong cache time update for xattrs
In md-cache, the cache has two times:
1. Time when the stat was last fetched for that inode
2. Time when the xattrs were last fetched for that inode. This
time should not be updated when only one of the xattrs is updated.
If, its updated when one of the cached xattr is changed, it can so
happen that the other xattrs have past their cache timeout, but are
still served from cache.
Solution:
Do not update the xattr cache time, when one of the xattrs being cached
is changed. With this, we may end up in cache timeout though it was
updated recently, but it is not a harm. The other way is to have
timeout for every xattr that is being cached. Its more complicated, and
may be not worth it, as we have lot of lookup fops, that are overloaded to
get all the xattrs.
Change-Id: Id77e547f403fc792348f1ea56b468b9260a5a34f
BUG: 1211863
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/15045
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
-rw-r--r-- | xlators/performance/md-cache/src/md-cache.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c index b4448389cad..bb2310e8c82 100644 --- a/xlators/performance/md-cache/src/md-cache.c +++ b/xlators/performance/md-cache/src/md-cache.c @@ -716,8 +716,6 @@ mdc_inode_xatt_update (xlator_t *this, inode_t *inode, dict_t *dict) UNLOCK(&mdc->lock); goto out; } - - time (&mdc->xa_time); } UNLOCK (&mdc->lock); |