return (key0 << 1);
}
-static struct inode * search_inode_for_lustre(struct super_block *sb,
- unsigned long ino,
- unsigned long generation,
- int mode)
+static struct inode *search_inode_for_lustre(struct super_block *sb,
+ unsigned long ino,
+ unsigned long generation,
+ int mode)
{
struct ptlrpc_request *req = NULL;
struct ll_sb_info *sbi = ll_s2sbi(sb);
- struct ll_fid fid;
- unsigned long valid = 0;
+ struct lustre_id id;
+ __u64 valid = 0;
int eadatalen = 0, rc;
struct inode *inode = NULL;
if (inode)
return inode;
if (S_ISREG(mode)) {
- eadatalen = obd_size_diskmd(sbi->ll_osc_exp, NULL);
+ eadatalen = obd_size_diskmd(sbi->ll_dt_exp, NULL);
valid |= OBD_MD_FLEASIZE;
}
- fid.id = (__u64)ino;
- fid.generation = generation;
- fid.f_type = mode;
+ id_type(&id) = mode;
+ id_ino(&id) = (__u64)ino;
+ id_gen(&id) = generation;
- rc = mdc_getattr(sbi->ll_mdc_exp, &fid, valid, eadatalen, &req);
+ rc = md_getattr(sbi->ll_md_exp, &id, valid, eadatalen, &req);
if (rc) {
CERROR("failure %d inode %lu\n", rc, ino);
return ERR_PTR(rc);
}
- rc = ll_prep_inode(sbi->ll_osc_exp, &inode, req, 0, sb);
+ rc = ll_prep_inode(sbi->ll_dt_exp, sbi->ll_md_exp,
+ &inode, req, 0, sb);
if (rc) {
ptlrpc_req_finished(req);
return ERR_PTR(rc);
result = list_entry(lp,struct dentry, d_alias);
if (!(result->d_flags & DCACHE_DISCONNECTED)) {
dget_locked(result);
- result->d_vfs_flags |= DCACHE_REFERENCED;
+ ll_set_dflags(result, DCACHE_REFERENCED);
spin_unlock(&dcache_lock);
iput(inode);
return result;