1 .TH lustreapi 3 "2012 Dec 21" Lustre "Lustre Application Interface Library"
3 llapi_hsm_state_set llapi_hsm_state_set_fd \- set HSM flags for a file on Lustre filesystem
6 .B #include <lustre/lustreapi.h>
8 .BI "int llapi_hsm_state_set(const char *" path ", __u64 " setmask ",
9 .BI " __u64 " clearmask ", __u32 " archive_id ");"
11 .BI "int llapi_hsm_state_set_fd(int " fd ", __u64 " setmask ",
12 .BI " __u64 " clearmask ", __u32 " archive_id ");"
17 .B llapi_hsm_state_set(\|)
18 .B llapi_hsm_state_set_fd(\|)
19 sets, clears HSM flags and modifies archive ID for file pointed by
26 Mask of flags to be added.
29 Mask of flags to be removed.
32 Archive ID (greater than 0) used for this file. Use 0 if you do not want to
36 .BR llapi_hsm_state_get (3)
41 .B llapi_hsm_state_set(\|)
42 .B llapi_hsm_state_set_fd(\|)
55 failed to allocate memory.
63 does not point to a file or a directory.
67 does not point to a Lustre filesystem.
70 Provided masks resulted in an incompatible set of flags.
78 #include <lustre/lustreapi.h>
80 int main(int argc, char **argv)
85 fprintf(stderr, "usage: prog FILEPATH\\n");
89 rc = llapi_hsm_state_set(argv[1], HS_DIRTY|HS_NORELEASE, 0, 0);
91 fprintf(stderr, "Can't change hsm flags for %s: %s\\n",
92 argv[1], strerror(errno = -rc));
102 .BR llapi_hsm_state_get (3)
103 .BR llapi_hsm_state_get_fd (3)