1 .TH lustreapi 3 "2012 Dec 21" Lustre "Lustre Application Interface Library"
3 llapi_hsm_state_set \- 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 ");"
14 .B llapi_hsm_state_set(\|)
15 sets, clears HSM flags and modifies archive ID for file pointed by
20 Mask of flags to be added.
23 Mask of flags to be removed.
26 Archive ID (greater than 0) used for this file. Use 0 if you do not want to
30 .BR llapi_hsm_state_get (3)
35 .B llapi_hsm_state_set(\|)
48 failed to allocate memory.
56 does not point to a file or a directory.
60 does not point to a Lustre filesystem.
63 Provided masks resulted in an incompatible set of flags.
71 #include <lustre/lustreapi.h>
73 int main(int argc, char **argv)
78 fprintf(stderr, "usage: prog FILEPATH\\n");
82 rc = llapi_hsm_state_set(argv[1], HS_DIRTY|HS_NORELEASE, 0, 0);
84 fprintf(stderr, "Can't change hsm flags for %s: %s\\n",
85 argv[1], strerror(errno = -rc));
95 .BR llapi_hsm_state_get (3)