Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
None
-
9223372036854775807
Description
Kernels 4.10 and later (since commit a528d35e8b) have an enhanced statx() interface that can specify a bitmask to fetch specific attributes from a file (e.g. st_uid, st_gid, st_mode, and st_btime == file creation time), rather than fetching all of the normal stat() attributes (such as st_size and st_blocks). It also has a AT_STATX_DONT_SYNC mode which allows the kernel to return "lazy" stats without flushing all of the client data and fetching an accurate result from the server.
This matches (not coincidentally) very well with the Lustre attribute mechanism, and could be advantageous for fetching attributes from ls --color (needs st_mode) without having to do a glimpse to fetch the size (which is just discarded anyway).
The Lustre patch https://review.whamcloud.com/27715 "LU-9558 llite: user enhanced getattr functionality in newer kernels" added very basic support for this interface, but it only went so far as to handle the kernel API changes, but doesn't actually handle the different attribute flags appropriately (it currently fetches and returns all normal attributes - STATX_BASIC_STATS). This interface should be wired up properly so that we can take advantage of the efficiencies available.
- only fetch MDS attributes if STATX_SIZE and STATX_BLOCKS are not requested, and avoid OSS glimpse RPCs completely
- hook this into statahead to avoid async glimpse locks (AGL) if OST information not needed
- enhance the MDS RPC interface to return the file creation time stored in both ldiskfs and ZFS already, and enable STATX_BTIME
- in conjunction with Lazy Size-on-MDT (LSOM,
LU-9538) return the LSOM size if AT_STATX_DONT_SYNC is used
Attachments
Issue Links
- is related to
-
LU-11987 sanity test 59 fails with “test_59 failed with 1”
- Open
-
LU-13628 sanityn test_106a test_106c: supported stx_attributes: got ''?'', expected ''30''
- Resolved
-
LU-13826 fix compatibility for LL_IOC_MDC_GETINFO
- Resolved
-
LU-10560 Fixes for 4.14 kernel
- Resolved
-
LU-10805 fixes for 4.15 kernel
- Resolved
-
LU-11916 LSOM: lazy_stat mount option not recognized
- Resolved
-
LU-13148 Interop: sanity test 56ra fails with ''/usr/bin/lfs find -size 0 -type f -lazy /mnt/lustre/d56ra.sanity' should not send glimpse RPCs to OST'
- Resolved
-
LU-13753 sanityn test_51b: 'file size is 1024, should be 3145728'
- Resolved
-
LU-12480 add STATX_PROJID to upstream kernel
- Open
-
LU-9558 Support linux kernel version 4.12
- Resolved
-
LU-11554 Make stat() work with LSOM
- Resolved
-
LU-11971 Send file creation time to clients
- Resolved
-
LU-12332 Add a liblustreapi call for IOC_MDC_GETFILEINFO
- Resolved
- is related to
-
LU-9538 Size on MDT with guarantee of eventual consistency
- Resolved
-
LU-1158 nanosecond timestamp support for Lustre
- Reopened