Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-14787 libcfs: Proved an abstraction for AS_EXITING
[fs/lustre-release.git]
/
lustre
/
llite
/
vvp_object.c
diff --git
a/lustre/llite/vvp_object.c
b/lustre/llite/vvp_object.c
index
43e2a61
..
2413da9
100644
(file)
--- a/
lustre/llite/vvp_object.c
+++ b/
lustre/llite/vvp_object.c
@@
-27,7
+27,6
@@
*/
/*
* This file is part of Lustre, http://www.lustre.org/
*/
/*
* This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
*
* cl_object implementation for VVP layer.
*
*
* cl_object implementation for VVP layer.
*
@@
-67,8
+66,7
@@
static int vvp_object_print(const struct lu_env *env, void *cookie,
struct inode *inode = obj->vob_inode;
struct ll_inode_info *lli;
struct inode *inode = obj->vob_inode;
struct ll_inode_info *lli;
- (*p)(env, cookie, "(%d %d) inode: %p ",
- atomic_read(&obj->vob_transient_pages),
+ (*p)(env, cookie, "(%d) inode: %p ",
atomic_read(&obj->vob_mmap_cnt),
inode);
if (inode) {
atomic_read(&obj->vob_mmap_cnt),
inode);
if (inode) {
@@
-149,7
+147,7
@@
static int vvp_conf_set(const struct lu_env *env, struct cl_object *obj,
* This operation is expensive but mmap processes have to pay
* a price themselves. */
unmap_mapping_range(conf->coc_inode->i_mapping,
* This operation is expensive but mmap processes have to pay
* a price themselves. */
unmap_mapping_range(conf->coc_inode->i_mapping,
- 0, OBD_OBJECT_EOF,
1
);
+ 0, OBD_OBJECT_EOF,
0
);
pcc_layout_invalidate(conf->coc_inode);
}
return 0;
pcc_layout_invalidate(conf->coc_inode);
}
return 0;
@@
-168,13
+166,8
@@
static int vvp_prune(const struct lu_env *env, struct cl_object *obj)
RETURN(rc);
}
RETURN(rc);
}
- truncate_inode_pages(inode->i_mapping, 0);
- if (inode->i_mapping->nrpages) {
- CDEBUG(D_VFSTRACE, DFID ": still has %lu pages remaining\n",
- PFID(lu_object_fid(&obj->co_lu)),
- inode->i_mapping->nrpages);
- RETURN(-EIO);
- }
+ ll_truncate_inode_pages_final(inode);
+ mapping_clear_exiting(inode->i_mapping);
RETURN(0);
}
RETURN(0);
}
@@
-213,6
+206,8
@@
static void vvp_req_attr_set(const struct lu_env *env, struct cl_object *obj,
if (attr->cra_type == CRT_WRITE) {
valid_flags |= OBD_MD_FLMTIME | OBD_MD_FLCTIME;
obdo_set_o_projid(oa, ll_i2info(inode)->lli_projid);
if (attr->cra_type == CRT_WRITE) {
valid_flags |= OBD_MD_FLMTIME | OBD_MD_FLCTIME;
obdo_set_o_projid(oa, ll_i2info(inode)->lli_projid);
+ } else if (attr->cra_type == CRT_READ) {
+ valid_flags |= OBD_MD_FLATIME;
}
obdo_from_inode(oa, inode, valid_flags & attr->cra_flags);
obdo_set_parent_fid(oa, &ll_i2info(inode)->lli_fid);
}
obdo_from_inode(oa, inode, valid_flags & attr->cra_flags);
obdo_set_parent_fid(oa, &ll_i2info(inode)->lli_fid);
@@
-238,7
+233,6
@@
static int vvp_object_init0(const struct lu_env *env,
const struct cl_object_conf *conf)
{
vob->vob_inode = conf->coc_inode;
const struct cl_object_conf *conf)
{
vob->vob_inode = conf->coc_inode;
- atomic_set(&vob->vob_transient_pages, 0);
cl_object_page_init(&vob->vob_cl, sizeof(struct vvp_page));
return 0;
}
cl_object_page_init(&vob->vob_cl, sizeof(struct vvp_page));
return 0;
}