Skip to content
Snippets Groups Projects
Commit 268f6a4e authored by alex's avatar alex
Browse files

b=16918

 - do cache invalidation once read is complete
parent 33d8a07a
No related branches found
No related tags found
No related merge requests found
......@@ -345,7 +345,6 @@ static int filter_preprw_read(int cmd, struct obd_export *exp, struct obdo *oa,
struct lustre_capa *capa)
{
struct obd_device *obd = exp->exp_obd;
struct filter_obd *fo = &obd->u.filter;
struct timeval start, end;
struct lvfs_run_ctxt saved;
struct niobuf_local *lnb;
......@@ -467,10 +466,6 @@ static int filter_preprw_read(int cmd, struct obd_export *exp, struct obdo *oa,
}
}
if (inode && (fo->fo_read_cache == 0 ||
i_size_read(inode) > fo->fo_readcache_max_filesize))
filter_invalidate_cache(obd, obj, nb, inode);
if (rc != 0) {
if (dentry != NULL)
f_dput(dentry);
......@@ -830,6 +825,7 @@ static int filter_commitrw_read(struct obd_export *exp, struct obdo *oa,
int npages, struct niobuf_local *res,
struct obd_trans_info *oti, int rc)
{
struct filter_obd *fo = &exp->exp_obd->u.filter;
struct inode *inode = NULL;
struct ldlm_res_id res_id;
struct ldlm_resource *resource = NULL;
......@@ -861,6 +857,10 @@ static int filter_commitrw_read(struct obd_export *exp, struct obdo *oa,
}
}
if (inode && (fo->fo_read_cache == 0 ||
i_size_read(inode) > fo->fo_readcache_max_filesize))
filter_invalidate_cache(exp->exp_obd, obj, rnb, inode);
if (res->dentry != NULL)
f_dput(res->dentry);
RETURN(rc);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment