Whamcloud - gitweb
LU-5954 IOC_MDC_GETFILEINFO returns the wrong ino 18/17618/4
authorakam kumar bharathi <azurelustre@gmail.com>
Tue, 15 Dec 2015 17:53:04 +0000 (23:23 +0530)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 14 Jun 2016 03:50:25 +0000 (03:50 +0000)
req_capsule_server_get() through  __req_capsule_get in ll_dir_ioctl()
returns a pointer to a PTLRPC request or reply buffer, which is assigned
to struct mdt_body.

If the command is IOC_MDS_GETFILEINFO then the inode "st.st_ino" should
be assigned from one extracted from mdt_body through cl_fid_build_ino().

Change-Id: I8429d726ff5f6c2c2d342e2c59f163608c794307
Signed-off-by: John Hammond <john.hammond@intel.com>
Signed-off-by: akam kumar bharathi <azurelustre@gmail.com>
Reviewed-on: http://review.whamcloud.com/17618
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/dir.c

index ec71a19..ea21381 100644 (file)
@@ -1445,7 +1445,9 @@ out_rmdir:
                        st.st_atime     = body->mbo_atime;
                        st.st_mtime     = body->mbo_mtime;
                        st.st_ctime     = body->mbo_ctime;
-                       st.st_ino       = inode->i_ino;
+                       st.st_ino       = cl_fid_build_ino(&body->mbo_fid1,
+                                               sbi->ll_flags &
+                                               LL_SBI_32BIT_API);
 
                        lmdp = (struct lov_user_mds_data __user *)arg;
                        if (copy_to_user(&lmdp->lmd_st, &st, sizeof(st)))