Whamcloud - gitweb
LU-3318 llite: Always build 64bit ino internally
authorwang di <di.wang@intel.com>
Thu, 16 May 2013 07:00:06 +0000 (00:00 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 21 May 2013 05:38:17 +0000 (01:38 -0400)
Always build 64bit ino internally except the client is mounted
with "32bitapi" option, so client will always use 64bit ino
internally. It will build 32bit ino, only if application requires
32 bit ino.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I717e0551a7df4f8a7f02168702d8c9c58ecafd3d
Reviewed-on: http://review.whamcloud.com/6371
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Ned Bass <bass6@llnl.gov>
Reviewed-by: Fan Yong <fan.yong@intel.com>
lustre/llite/llite_lib.c

index a1a2408..01ddfd2 100644 (file)
@@ -529,7 +529,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
 
         LASSERT(fid_is_sane(&sbi->ll_root_fid));
        root = ll_iget(sb, cl_fid_build_ino(&sbi->ll_root_fid,
-                                           ll_need_32bit_api(sbi)),
+                                           sbi->ll_flags & LL_SBI_32BIT_API),
                       &lmd);
         md_free_lustre_md(sbi->ll_md_exp, &lmd);
         ptlrpc_req_finished(request);
@@ -1739,7 +1739,8 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md)
                spin_unlock(&lli->lli_lock);
        }
 #endif
-       inode->i_ino = cl_fid_build_ino(&body->fid1, ll_need_32bit_api(sbi));
+       inode->i_ino = cl_fid_build_ino(&body->fid1,
+                                       sbi->ll_flags & LL_SBI_32BIT_API);
         inode->i_generation = cl_fid_build_gen(&body->fid1);
 
         if (body->valid & OBD_MD_FLATIME) {
@@ -2168,7 +2169,7 @@ int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req,
                 LASSERT(fid_is_sane(&md.body->fid1));
 
                *inode = ll_iget(sb, cl_fid_build_ino(&md.body->fid1,
-                                                     ll_need_32bit_api(sbi)),
+                                            sbi->ll_flags & LL_SBI_32BIT_API),
                                 &md);
                 if (*inode == NULL || IS_ERR(*inode)) {
 #ifdef CONFIG_FS_POSIX_ACL