1lsm_fs_file_clone(3) Libstoragemgmt C API Manual lsm_fs_file_clone(3)
2
3
4
6 lsm_fs_file_clone - Clones a file on a file system.
7
9 int lsm_fs_file_clone (lsm_connect *conn, lsm_fs *fs, const char
10 *src_file_name, const char *dest_file_name, lsm_fs_ss *snapshot, char
11 **job, lsm_flag flags);
12
14 conn Valid connection.
15
16 fs Pointer of lsm_fs which file resides.
17
18 src_file_name
19 String. Source file relative name & path.
20
21 dest_file_name
22 String. Destination file relative name & path.
23
24 snapshot Pointer of lsm_fs_ss. Snapshot of source file is based on.
25 If NULL, use current state of this file. Returned value
26 must be freed with a call to lsm_fs_ss_record_free.
27
28 job Output pointer of string. If storage system support asyn‐
29 chronous action on this, a job will be created and could be
30 tracked via lsm_job_status_get. NULL if storage system does
31 not support asynchronous action on this.
32
33 flags Reserved for future use, must be LSM_CLIENT_FLAG_RSVD.
34
36 1.0
37
39 Clones the specified file on a file system.
40
42 LSM_CAP_FILE_CLONE
43
45 Error code as enumerated by 'lsm_error_number'.
46 * LSM_ERR_OK
47 On success.
48 * LSM_ERR_JOB_STARTED
49 A job is started. Please check the 'job' output pointer.
50 * LSM_ERR_INVALID_ARGUMENT
51 When any argument is NULL or not a valid lsm_connect pointer
52 or invalid flags.
53 * LSM_ERR_NOT_FOUND_FS
54 When file system not found.
55 * LSM_ERR_NOT_ENOUGH_SPACE
56 Pool does not have enough space.
57 * LSM_ERR_NO_SUPPORT
58 Not supported.
59
60
61
62April 2022 lsm_fs_file_clone lsm_fs_file_clone(3)