*/
/*
* This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
*
* cl_object implementation for VVP layer.
*
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) {
* 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;
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);
}
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);
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;
}