summaryrefslogtreecommitdiffstats
path: root/xlators/performance/md-cache
diff options
context:
space:
mode:
authorPoornima G <pgurusid@redhat.com>2017-01-05 15:36:02 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2017-01-05 21:12:18 -0800
commit95d07a3d2d68805d93d36a447436e27c48777939 (patch)
treedfb77928ec012f596c058f91732aafab771d3b60 /xlators/performance/md-cache
parentc6b0adb483c1d0c4922e6d4cb77abfb69d314a8e (diff)
ec: Invalidations in disperse volume should not update the stat
Issue: In disperse volume, the file is present across bricks, hence the stat from one brick doesn't carry the valid size of the file. Therefore the upcall from one brick updating the md-cache results in wrong size being updated. Fix: If the notification is cache invalidation then, indicate md-cache that the attributes is invalid. BUG: 1410375 Change-Id: Id89d2283478e70b62b435a8891fffc86d2be8cb2 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/16329 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/performance/md-cache')
-rw-r--r--xlators/performance/md-cache/src/md-cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c
index 9edbdf4aebe..9806e642c9a 100644
--- a/xlators/performance/md-cache/src/md-cache.c
+++ b/xlators/performance/md-cache/src/md-cache.c
@@ -2644,8 +2644,8 @@ mdc_invalidate (xlator_t *this, void *data)
goto out;
}
- if ((up_ci->flags & (UP_NLINK | UP_RENAME_FLAGS | UP_FORGET)) ||
- (up_ci->dict && dict_get (up_ci->dict, MDC_INVALIDATE_IATT))) {
+ if (up_ci->flags &
+ (UP_NLINK | UP_RENAME_FLAGS | UP_FORGET | UP_INVAL_ATTR)) {
mdc_inode_iatt_invalidate (this, inode);
mdc_inode_xatt_invalidate (this, inode);
INCREMENT_ATOMIC (conf->mdc_counter.lock,