- struct inode *parent_dir,
- const struct dt_rec *dot_fid,
- const struct dt_rec *dot_dot_fid,
+ struct inode *parent_dir,
+ const struct lu_fid *dot_fid,
+ const struct lu_fid *dot_dot_fid,
oh = container_of(th, struct osd_thandle, ot_super);
LASSERT(oh->ot_handle->h_transaction != NULL);
oh = container_of(th, struct osd_thandle, ot_super);
LASSERT(oh->ot_handle->h_transaction != NULL);
- /* FIXME: Insert index api needs to know the mode of
- * the remote object. Just use S_IFDIR for now */
- local = ldiskfs_create_inode(oh->ot_handle, pobj->oo_inode, S_IFDIR);
+ local = ldiskfs_create_inode(oh->ot_handle, pobj->oo_inode, type);
rc = osd_add_dot_dotdot_internal(info, local, pobj->oo_inode,
rc = osd_add_dot_dotdot_internal(info, local, pobj->oo_inode,
- (const struct dt_rec *)lu_object_fid(&pobj->oo_dt.do_lu),
- (const struct dt_rec *)fid, oh);
+ lu_object_fid(&pobj->oo_dt.do_lu),
+ fid, oh);
if (rc != 0) {
CERROR("%s: "DFID" add dot dotdot error: rc = %d\n",
osd_name(osd), PFID(fid), rc);
if (rc != 0) {
CERROR("%s: "DFID" add dot dotdot error: rc = %d\n",
osd_name(osd), PFID(fid), rc);
- struct osd_object *pobj, struct inode *cinode,
- const char *name, const struct dt_rec *fid,
- struct htree_lock *hlock, struct thandle *th)
+ struct osd_object *pobj, struct inode *cinode,
+ const char *name, const struct lu_fid *fid,
+ struct htree_lock *hlock, struct thandle *th)
- struct osd_object *dir,
- struct inode *parent_dir, const char *name,
- const struct dt_rec *dot_fid,
- const struct dt_rec *dot_dot_fid,
- struct thandle *th)
+ struct osd_object *dir,
+ struct inode *parent_dir, const char *name,
+ const struct lu_fid *dot_fid,
+ const struct lu_fid *dot_dot_fid,
+ struct thandle *th)
* value, return by respective functions.
*/
static int osd_ea_add_rec(const struct lu_env *env, struct osd_object *pobj,
* value, return by respective functions.
*/
static int osd_ea_add_rec(const struct lu_env *env, struct osd_object *pobj,
- struct inode *cinode, const char *name,
- const struct dt_rec *fid, struct thandle *th)
+ struct inode *cinode, const char *name,
+ const struct lu_fid *fid, struct thandle *th)
- }
- rc = osd_add_dot_dotdot(info, pobj, cinode, name,
- (struct dt_rec *)lu_object_fid(&pobj->oo_dt.do_lu),
+ }
+
+ rc = osd_add_dot_dotdot(info, pobj, cinode, name,
+ lu_object_fid(&pobj->oo_dt.do_lu),
tfid->f_ver = ~0;
rc = __osd_ea_add_rec(info, pobj, cinode, name,
tfid->f_ver = ~0;
rc = __osd_ea_add_rec(info, pobj, cinode, name,
} else {
rc = __osd_ea_add_rec(info, pobj, cinode, name, fid,
hlock, th);
} else {
rc = __osd_ea_add_rec(info, pobj, cinode, name, fid,
hlock, th);
const char *name = (const char *)key;
struct osd_thread_info *oti = osd_oti_get(env);
struct osd_inode_id *id = &oti->oti_id;
const char *name = (const char *)key;
struct osd_thread_info *oti = osd_oti_get(env);
struct osd_inode_id *id = &oti->oti_id;
- if (osd_object_auth(env, dt, capa, CAPA_OPC_INDEX_INSERT))
- RETURN(-EACCES);
+ if (osd_object_auth(env, dt, capa, CAPA_OPC_INDEX_INSERT))
+ RETURN(-EACCES);
child_inode = igrab(omm->omm_remote_parent->d_inode);
} else {
child_inode = osd_create_local_agent_inode(env, osd,
child_inode = igrab(omm->omm_remote_parent->d_inode);
} else {
child_inode = osd_create_local_agent_inode(env, osd,
- rc = osd_ea_add_rec(env, obj, child_inode, name, rec, th);
+ rc = osd_ea_add_rec(env, obj, child_inode, name, fid, th);
CDEBUG(D_INODE, "parent %lu insert %s:%lu rc = %d\n",
obj->oo_inode->i_ino, name, child_inode->i_ino, rc);
CDEBUG(D_INODE, "parent %lu insert %s:%lu rc = %d\n",
obj->oo_inode->i_ino, name, child_inode->i_ino, rc);
dentry = osd_child_dentry_by_inode(env, dir, ent->oied_name,
ent->oied_namelen);
ldp = (struct ldiskfs_dentry_param *)osd_oti_get(env)->oti_ldp;
dentry = osd_child_dentry_by_inode(env, dir, ent->oied_name,
ent->oied_namelen);
ldp = (struct ldiskfs_dentry_param *)osd_oti_get(env)->oti_ldp;
dentry->d_fsdata = (void *)ldp;
ll_vfs_dq_init(dir);
rc = osd_ldiskfs_add_entry(jh, dentry, inode, hlock);
dentry->d_fsdata = (void *)ldp;
ll_vfs_dq_init(dir);
rc = osd_ldiskfs_add_entry(jh, dentry, inode, hlock);