1 .TH llapi_get_lum_file_fd 3 "2019 July 15" "Lustre User API"
3 llapi_get_lum_file_fd, llapi_get_lum_dir_fd, llapi_get_lum_file,
4 llapi_get_lum_dir \- get valid file attrbutes and LOV stripe information to
9 .B #include <lustre/lustreapi.h>
11 .BI "int llapi_get_lum_file_fd(int " dir_fd ", const char *" fname ",
12 .BI " __u64 *" valid ", lstatx_t *" statx ",
13 .BI " struct lov_user_md *" lum ",
14 .BI " size_t " lumsize ");"
16 .BI "int llapi_get_lum_dir_fd(int " dir_fd ", __u64 *" valid ",
17 .BI " lstatx_t *" statx ", struct lov_user_md *" lum ",
18 .BI " size_t " lumsize ");"
20 .BI "int llapi_get_lum_file(const char *" path ", __u64 *" valid ",
21 .BI " lstatx_t *" statx ", struct lov_user_md *" lum ",
22 .BI " size_t " lumsize ");"
24 .BI "int llapi_get_lum_dir(const char *" path ", __u64 *" valid ",
25 .BI " lstatx_t *" statx ", struct lov_user_md *" lum ",
26 .BI " size_t " lumsize ");"
31 .BR llapi_get_lum_file_fd() ,
32 .BR llapi_get_lum_dir_fd() ,
33 .BR llapi_get_lum_file() ,
35 .BR llapi_get_lum_dir()
36 returns file attributes and LOV stripe information by an ioctl on the dir.
38 is a file descriptor that refers to a directory. For function
39 .BR llapi_get_lum_file_fd() ,
42 is provided, it is a relative pathname that is interpreted relative to the
43 directory referred to by
47 .BR llapi_get_lum_dir_fd() ,
48 .BR llapi_get_lum_file() ,
50 .BR llapi_get_lum_dir()
51 can be used for applications that are only processing a single file or directory
58 .BR llapi_get_lum_file_fd()
59 can be used for applications that process lots of files. It avoids opening,
60 locking, and closing each file on the client if that is not needed. Multiple
61 calls of this llapi can be done on the parent dir referenced by
63 with a single open for all files in that directory, and it also does not
64 pollute the client dcache with millions of dentries when traversing a large
67 The stripe information for the target file is returned to the user in the
71 if it is not a NULL pointer. The file attribute information for the target file
74 structure pointed to by
76 if it is not a NULL pointer.
79 contains the flags to indicate which fields in the returned file attributes
80 have been valid filled in.
82 The valid flags are as follows:
85 The returned file size is known strictly correct.
88 The returned file blocks is known strictly correct.
91 The returned file size is approximate, may never have been strictly correct.
94 The returned file blocks is approximate, may never have been strictly correct.
97 The returned object ID is valid.
100 The returned access time is valid.
103 The returned data modification time is valid.
106 The returned change time is valid.
109 The returned block size is valid.
112 The returned access bits (mode & ~S_IFMT) is valid.
115 The returned object type (mode & S_IFMT) is valid.
118 The returned user ID is vaild.
121 The returned group ID is valid.
124 The returned flags word is valid.
127 The returned link count is valid.
130 The returned device number is valid.
133 .BR llapi_get_lum_file_fd() ,
134 .BR llapi_get_lum_dir_fd() ,
135 .BR llapi_get_lum_file() ,
137 .BR llapi_get_lum_dir()
138 return 0 on success or a negative errno value on failure.
142 Insufficient memory to complete operation.
145 Memory region is not properly mapped.
148 One or more invalid arguments are given.
151 The operation is not supported.
154 File does not reside on a Lustre filesystem.
162 is not a valid open file descriptor.