memset(it, 0, sizeof(*it));
lu_object_get(lo);
it->oiq_obj = obj;
- CFS_INIT_LIST_HEAD(&it->oiq_list);
+ INIT_LIST_HEAD(&it->oiq_list);
/* LUSTRE_DQTREEOFF is the initial offset where the tree can be found */
it->oiq_blk[0] = LUSTRE_DQTREEOFF;
lu_object_put(env, &it->oiq_obj->oo_dt.do_lu);
- cfs_list_for_each_entry_safe(leaf, tmp, &it->oiq_list, oql_link) {
- cfs_list_del_init(&leaf->oql_link);
+ list_for_each_entry_safe(leaf, tmp, &it->oiq_list, oql_link) {
+ list_del_init(&leaf->oql_link);
OBD_FREE_PTR(leaf);
}
EXIT;
OBD_ALLOC_PTR(leaf);
if (leaf == NULL)
RETURN(-ENOMEM);
- CFS_INIT_LIST_HEAD(&leaf->oql_link);
+ INIT_LIST_HEAD(&leaf->oql_link);
leaf->oql_blk = it->oiq_blk[depth];
- cfs_list_add_tail(&leaf->oql_link, &it->oiq_list);
+ list_add_tail(&leaf->oql_link, &it->oiq_list);
RETURN(0);
}
struct inode *inode;
int rc;
struct iam_container *bag = &(osd_dt_obj(dt))->oo_dir->od_container;
+ struct lu_buf *lb = &osd_oti_get(env)->oti_buf;
ENTRY;
LASSERT(bag->ic_root_bh != NULL);
inode = osd_dt_obj(dt)->oo_inode;
LASSERT(inode);
- rc = dt_declare_record_write(env, dt, NULL, 0, th);
+ /* iam_lfix_create() writes two blocks at the beginning */
+ lb->lb_len = osd_sb(osd)->s_blocksize * 2;
+ rc = dt_declare_record_write(env, dt, lb, 0, th);
if (rc)
GOTO(out, rc);