Whamcloud - gitweb
* lustre updates for recent portals HEAD changes
[fs/lustre-release.git] / lustre / llite / llite_nfs.c
index f3b7fc3..e94b605 100644 (file)
@@ -37,15 +37,15 @@ __u32 get_uuid2int(const char *name, int len)
         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;
 
@@ -54,20 +54,21 @@ static struct inode * search_inode_for_lustre(struct super_block *sb,
         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);
@@ -81,8 +82,8 @@ extern struct dentry_operations ll_d_ops;
 
 static struct dentry *ll_iget_for_nfs(struct super_block *sb, unsigned long ino,
                                       __u32 generation, umode_t mode)
-{                                      
-        struct inode *inode;      
+{
+        struct inode *inode;
         struct dentry *result;
         struct list_head *lp;
 
@@ -115,7 +116,7 @@ static struct dentry *ll_iget_for_nfs(struct super_block *sb, unsigned long ino,
                 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;