-
Frank Zago authored
Under the following conditions, ll_getattr will flatten the inode number when it shouldn't: - the X86_X32 architecture is defined CONFIG_X86_X32, and not even used, - ll_getattr is called from a kernel thread (though vfs_getattr for instance.) This has the result that inode numbers are different whether the same file is stat'ed from a kernel thread, or from a syscall. For instance, 4198401 vs. 144115205272502273. ll_getattr calls ll_need_32bit_api to determine whether the task is 32 bits. When the combination is kthread+X86_X32, that function returns that the task is 32 bits, which is incorrect, as the kernel is 64 bits. The solution is to check whether the call is from a kernel thread (which is 64 bits) and act consequently. Added test_410 to test the condition. A failed run will have a message like this: lustre_kinode_54354: CONFIG_X86_X32 is set lustre_kinode_54354: inode is 144115205272502273 lustre_kinode_54354: inode is 4198401 lustre_kinode_54354: inode numbers are different: 144115205272502273 4198401 while a successfull one will be: lustre_kinode_10519: CONFIG_X86_X32 is set lustre_kinode_10519: inode is 144115205272502275 lustre_kinode_10519: inode is 144115205272502275 lustre_kinode_10519: inode numbers are identical: 144115205272502275 Signed-off-by:
Frank Zago <fzago@cray.com> Change-Id: Ib8f07de47eaa29046a61c488368d466f9096a994 Reviewed-on: https://review.whamcloud.com/26992 Reviewed-by:
Andreas Dilger <andreas.dilger@intel.com> Reviewed-by:
Dmitry Eremin <dmitry.eremin@intel.com> Tested-by: Jenkins Tested-by:
Maloo <hpdd-maloo@intel.com>
Frank Zago authoredUnder the following conditions, ll_getattr will flatten the inode number when it shouldn't: - the X86_X32 architecture is defined CONFIG_X86_X32, and not even used, - ll_getattr is called from a kernel thread (though vfs_getattr for instance.) This has the result that inode numbers are different whether the same file is stat'ed from a kernel thread, or from a syscall. For instance, 4198401 vs. 144115205272502273. ll_getattr calls ll_need_32bit_api to determine whether the task is 32 bits. When the combination is kthread+X86_X32, that function returns that the task is 32 bits, which is incorrect, as the kernel is 64 bits. The solution is to check whether the call is from a kernel thread (which is 64 bits) and act consequently. Added test_410 to test the condition. A failed run will have a message like this: lustre_kinode_54354: CONFIG_X86_X32 is set lustre_kinode_54354: inode is 144115205272502273 lustre_kinode_54354: inode is 4198401 lustre_kinode_54354: inode numbers are different: 144115205272502273 4198401 while a successfull one will be: lustre_kinode_10519: CONFIG_X86_X32 is set lustre_kinode_10519: inode is 144115205272502275 lustre_kinode_10519: inode is 144115205272502275 lustre_kinode_10519: inode numbers are identical: 144115205272502275 Signed-off-by:
Frank Zago <fzago@cray.com> Change-Id: Ib8f07de47eaa29046a61c488368d466f9096a994 Reviewed-on: https://review.whamcloud.com/26992 Reviewed-by:
Andreas Dilger <andreas.dilger@intel.com> Reviewed-by:
Dmitry Eremin <dmitry.eremin@intel.com> Tested-by: Jenkins Tested-by:
Maloo <hpdd-maloo@intel.com>