Whamcloud - gitweb
LU-1876 hsm: bugfix about layout lock on the client
[fs/lustre-release.git] / lustre / llite / vvp_object.c
index 85a8dd6..48132bd 100644 (file)
@@ -121,13 +121,24 @@ static int vvp_attr_set(const struct lu_env *env, struct cl_object *obj,
         return 0;
 }
 
+int vvp_conf_set(const struct lu_env *env, struct cl_object *obj,
+               const struct cl_object_conf *conf)
+{
+       struct ll_inode_info *lli = ll_i2info(conf->coc_inode);
+
+       if (conf->u.coc_md != NULL && conf->u.coc_md->lsm != NULL)
+               lli->lli_layout_gen = conf->u.coc_md->lsm->lsm_layout_gen;
+
+       return 0;
+}
+
 static const struct cl_object_operations vvp_ops = {
         .coo_page_init = vvp_page_init,
         .coo_lock_init = vvp_lock_init,
         .coo_io_init   = vvp_io_init,
         .coo_attr_get  = vvp_attr_get,
         .coo_attr_set  = vvp_attr_set,
-        .coo_conf_set  = ccc_conf_set,
+        .coo_conf_set  = vvp_conf_set,
         .coo_glimpse   = ccc_object_glimpse
 };