[LU-3344] Add open_by_handle() syscall for Lustre clients Created: 15/May/13 Updated: 05/Jun/15 Resolved: 02/Feb/14 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.6.0 |
| Type: | New Feature | Priority: | Minor |
| Reporter: | Andreas Dilger | Assignee: | Jian Yu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | patch | ||
| Issue Links: |
|
||||||||
| Rank (Obsolete): | 8271 | ||||||||
| Description |
|
The open_by_handle_at() and name_to_handle() functions were added to Linux 2.6.38, and allow opening files by a file handle instead of path traversal. This may be useful for HPC applications to reduce loading on the metadata server from repeated path traversal. There is some chance this feature already works on Lustre, due to the re-use of the NFS exportfs_encode_fh() and exportfs_decode_fh() functions. This code needs a regression test in Lustre to verify it is working correctly, along with documentation in the user manual. |
| Comments |
| Comment by Gaurav Mahajan (Inactive) [ 08/Jul/13 ] |
|
Working on this. We are hit by a Null pointer dereference in ll_revalidate_nd (llite/dcache.c) in an NFS mounted Lustre file system. https://jira.hpdd.intel.com/browse/LU-3483 |
| Comment by Gaurav Mahajan (Inactive) [ 26/Jul/13 ] |
|
Status : Work In Progress Here is the initial patch for sanity tests to check 'name_to_handle_at' and 'open_by_handle_at' syscalls. Currently the patch is incomplete because 'name_to_handle_at' and 'open_by_handle_at' are updated in glibc 2.14. Current Glibc version is 2.12. So for now we are calling the syscalls with syscall numbers directly. |
| Comment by Swapnil Pimpale (Inactive) [ 06/Aug/13 ] |
|
Please note that the above patch (http://review.whamcloud.com/#/c/7129/) is abandoned. I have added a new patch here (http://review.whamcloud.com/#/c/7247/) |
| Comment by Swapnil Pimpale (Inactive) [ 07/Aug/13 ] |
|
While testing these syscalls on FC18 client, I hit this (https://jira.hpdd.intel.com/browse/LU-3717) panic in ll_enocde_fh() |
| Comment by Swapnil Pimpale (Inactive) [ 22/Aug/13 ] |
|
As noted in the ticket description the syscalls and the structure file_handle were added in Linux kernel 2.6.39 I have added a config time check which checks whether file_handle, name_to_handle_at() and open_by_handle_at() can be resolved. |
| Comment by Peter Jones [ 03/Sep/13 ] |
|
Bobbie Could you please review and take care of this patch? Thanks Peter |
| Comment by Peter Jones [ 25/Sep/13 ] |
|
Yu, Jian will take over ensuring that this patch lands |
| Comment by James A Simmons [ 03/Dec/13 ] |
|
I updated the patch. Even tho I was testing with a 3.11 kernel I couldn't get this to work but then I realized the kernel has to be configured with CONFIG_FHANDLE so I updated the autoconf test to handle this case. I also removed the FC18 condition for the sanity test since this is not the case for me. |
| Comment by James A Simmons [ 06/Dec/13 ] |
|
Patch http://review.whamcloud.com/#/c/7247 has been updated and tested. [root@spoon46 tests]# ./check_fhandle_syscalls temp-file /lustre/barry |
| Comment by James A Simmons [ 02/Feb/14 ] |
|
The last patch http://review.whamcloud.com/#/c/7247 has been merged. This ticket can be closed. |
| Comment by Peter Jones [ 02/Feb/14 ] |
|
Fixed in 2.6 |