There may exist freeing pages in object's radix tree at
the time of osc_object_prune(), which causes failure at
the assertion of (osc->oo_npages == 0). This is a safe
race.
This problem is introduced in change at:
Lustre-commit:
e8b421531c166b91ab5c1f417570c544bcdd050c
Lustre-change: http://review.whamcloud.com/16456
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I7d4e59bccfb012b870a2e8fa7ab99774def57349
Reviewed-on: http://review.whamcloud.com/16727
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
/**
* Radix tree for caching pages
*/
/**
* Radix tree for caching pages
*/
- struct radix_tree_root oo_tree;
+ struct radix_tree_root oo_tree;
unsigned long oo_npages;
/* Protect osc_lock this osc_object has */
unsigned long oo_npages;
/* Protect osc_lock this osc_object has */
struct list_head oo_ol_list;
struct list_head oo_ol_list;
/** number of active IOs of this object */
atomic_t oo_nr_ios;
/** number of active IOs of this object */
atomic_t oo_nr_ios;
struct osc_object *osc = cl2osc(obj);
struct ldlm_res_id *resname = &osc_env_info(env)->oti_resname;
struct osc_object *osc = cl2osc(obj);
struct ldlm_res_id *resname = &osc_env_info(env)->oti_resname;
- LASSERTF(osc->oo_npages == 0,
- DFID "still have %lu pages, obj: %p, osc: %p\n",
- PFID(lu_object_fid(&obj->co_lu)), osc->oo_npages, obj, osc);
-
/* DLM locks don't hold a reference of osc_object so we have to
* clear it before the object is being destroyed. */
ostid_build_res_name(&osc->oo_oinfo->loi_oi, resname);
/* DLM locks don't hold a reference of osc_object so we have to
* clear it before the object is being destroyed. */
ostid_build_res_name(&osc->oo_oinfo->loi_oi, resname);