18 #include "int_sizes.h"
21 #include <sys/types.h>
50 #define CHIRP_STAT_MAXENCODING (4096)
51 #define chirp_stat_encode(s, info) \
54 n += sprintf((s)+n, "%" PRId64, (info)->cst_dev);\
55 n += sprintf((s)+n, " %" PRId64, (info)->cst_ino);\
56 n += sprintf((s)+n, " %" PRId64, (info)->cst_mode);\
57 n += sprintf((s)+n, " %" PRId64, (info)->cst_nlink);\
58 n += sprintf((s)+n, " %" PRId64, (info)->cst_uid);\
59 n += sprintf((s)+n, " %" PRId64, (info)->cst_gid);\
60 n += sprintf((s)+n, " %" PRId64, (info)->cst_rdev);\
61 n += sprintf((s)+n, " %" PRId64, (info)->cst_size);\
62 n += sprintf((s)+n, " %" PRId64, (info)->cst_blksize);\
63 n += sprintf((s)+n, " %" PRId64, (info)->cst_blocks);\
64 n += sprintf((s)+n, " %" PRId64, (info)->cst_atime);\
65 n += sprintf((s)+n, " %" PRId64, (info)->cst_mtime);\
66 n += sprintf((s)+n, " %" PRId64, (info)->cst_ctime);\
84 #define CHIRP_STATFS_MAXENCODING (4096)
85 #define chirp_statfs_encode(s, info) \
88 n += sprintf((s)+n, "%" PRId64, (info)->f_type);\
89 n += sprintf((s)+n, " %" PRId64, (info)->f_bsize);\
90 n += sprintf((s)+n, " %" PRId64, (info)->f_blocks);\
91 n += sprintf((s)+n, " %" PRId64, (info)->f_bfree);\
92 n += sprintf((s)+n, " %" PRId64, (info)->f_bavail);\
93 n += sprintf((s)+n, " %" PRId64, (info)->f_files);\
94 n += sprintf((s)+n, " %" PRId64, (info)->f_ffree);\
123 #define CHIRP_SEARCH struct chirp_searchstream
127 #define CHIRP_SEARCH_STOPATFIRST (1<<0)
128 #define CHIRP_SEARCH_METADATA (1<<1)
129 #define CHIRP_SEARCH_INCLUDEROOT (1<<2)
130 #define CHIRP_SEARCH_PERIOD (1<<3)
131 #define CHIRP_SEARCH_R_OK (1<<4)
132 #define CHIRP_SEARCH_W_OK (1<<5)
133 #define CHIRP_SEARCH_X_OK (1<<6)
137 #define CHIRP_SEARCH_ERR_OPEN 1
138 #define CHIRP_SEARCH_ERR_READ 2
139 #define CHIRP_SEARCH_ERR_CLOSE 3
140 #define CHIRP_SEARCH_ERR_STAT 4
144 #define CHIRP_SEARCH_DELIMITER '|'
145 #define CHIRP_SEARCH_DEPTH_MAX 200
221 #define PRICHIRP_JOBID_T PRId64
222 #define SCNCHIRP_JOBID_T SCNd64
INT64_T cst_dev
The device number on which the file is stored.
Definition: chirp_types.h:35
void * buffer
Pointer to data buffer for PREAD, PWRITE, SREAD, and SWRITE.
Definition: chirp_types.h:166
struct chirp_file * file
The file to access for all operations.
Definition: chirp_types.h:164
INT64_T f_bsize
The size in bytes of a block.
Definition: chirp_types.h:78
INT64_T f_blocks
The total number of blocks in the filesystem.
Definition: chirp_types.h:76
INT64_T ndirs
The number of directories owned by that user.
Definition: chirp_types.h:182
INT64_T cst_nlink
The number of hard links to this file.
Definition: chirp_types.h:38
INT64_T cst_size
The size of the file, in bytes.
Definition: chirp_types.h:42
INT64_T errnum
On failure, contains the errno for the call.
Definition: chirp_types.h:172
#define CHIRP_PATH_MAX
The maximum length of a full path in any Chirp operation.
Definition: chirp_protocol.h:20
struct chirp_stat info
The properties of the directory entry.
Definition: chirp_types.h:102
Perform a chirp_reli_fsync.
Definition: chirp_types.h:155
INT64_T length
Length of the data, in bytes, for PREAD, WRITE, SREAD, and SWRITE.
Definition: chirp_types.h:167
char name[CHIRP_PATH_MAX]
The identity of the user.
Definition: chirp_types.h:180
INT64_T nfiles
The number of files owned by that user.
Definition: chirp_types.h:181
INT64_T f_bfree
The number of blocks free.
Definition: chirp_types.h:79
Describes a bulk I/O operation.
Definition: chirp_types.h:162
INT64_T cst_blksize
The recommended transfer block size for accessing this file.
Definition: chirp_types.h:43
Describes a result from a search operation.
Definition: chirp_types.h:108
INT64_T cst_uid
The Unix UID of the file's owner.
Definition: chirp_types.h:39
INT64_T cst_atime
The last time the file was accessed, in time_t format.
Definition: chirp_types.h:45
INT64_T stride_skip
Distance between start of each stride for SREAD and SWRITE.
Definition: chirp_types.h:169
char * name
The name of the directory entry.
Definition: chirp_types.h:100
Perform a chirp_reli_pwrite.
Definition: chirp_types.h:151
void(* chirp_longdir_t)(const char *path, struct chirp_stat *info, void *arg)
A callback function typedef used to display a detailed directory.
Definition: chirp_types.h:205
void(* chirp_loc_t)(const char *location, void *arg)
A callback function typedef used to display a file's location(s).
Definition: chirp_types.h:215
Describes the properties of a file, much like the Unix stat structure.
Definition: chirp_types.h:34
void(* chirp_dir_t)(const char *path, void *arg)
A callback function typedef used to display a directory or access control list.
Definition: chirp_types.h:194
Descibes the space consumed by a single user on a Chirp server.
Definition: chirp_types.h:179
INT64_T stride_length
Length of each stride for SREAD and SWRITE.
Definition: chirp_types.h:168
char path[CHIRP_PATH_MAX]
Path of the matching file.
Definition: chirp_types.h:109
Keeps track of the state of a search stream.
Definition: chirp_types.h:117
INT64_T cst_ino
The inode number of the file.
Definition: chirp_types.h:36
INT64_T cst_gid
The Unix GID of the file's group varship.
Definition: chirp_types.h:40
chirp_bulkio_t
Describes the type of a bulk I/O operation.
Definition: chirp_types.h:149
INT64_T f_files
The maximum number of files (inodes) on the filesystem.
Definition: chirp_types.h:80
INT64_T f_ffree
The number of files (inodes) currently in use.
Definition: chirp_types.h:81
INT64_T cst_rdev
The device number, if this represents a device.
Definition: chirp_types.h:41
int64_t chirp_jobid_t
The type of Chirp job identifiers.
Definition: chirp_types.h:220
Perform a chirp_reli_fstat.
Definition: chirp_types.h:154
This file defines the binary values mandated by the Chirp Protocol specification, used by both the cl...
INT64_T cst_mode
The Unix mode bits of the file.
Definition: chirp_types.h:37
String Buffer Operations.
INT64_T cst_ctime
The last time the inode was changed, in time_t format.
Definition: chirp_types.h:47
Perform a chirp_reli_pread.
Definition: chirp_types.h:150
Describes the properties of a file system, much like the Unix statfs structure.
Definition: chirp_types.h:74
chirp_bulkio_t type
The type of I/O to perform.
Definition: chirp_types.h:163
INT64_T nbytes
The total bytes consumed by that user.
Definition: chirp_types.h:183
INT64_T f_bavail
The number of blocks available to an ordinary user.
Definition: chirp_types.h:77
INT64_T cst_mtime
The last time the file data was modified, time_t format.
Definition: chirp_types.h:46
int lstatus
The result of lstat on the entry.
Definition: chirp_types.h:101
INT64_T offset
Starting offset in file for PREAD, PWRITE, SREAD, and SWRITE.
Definition: chirp_types.h:170
INT64_T f_type
The integer type of the filesystem.
Definition: chirp_types.h:75
struct chirp_stat * info
Pointer to a data buffer for FSTAT.
Definition: chirp_types.h:165
struct chirp_stat info
The properties of the matching file.
Definition: chirp_types.h:110
Describes a directory entry returned by chirp_reli_readdir.
Definition: chirp_types.h:99
Perform a chirp_reli_swrite.
Definition: chirp_types.h:153
INT64_T result
On completion, contains result of operation.
Definition: chirp_types.h:171
Perform a chirp_reli_sread.
Definition: chirp_types.h:152
INT64_T cst_blocks
The number of blocks consumed by this file in the file system.
Definition: chirp_types.h:44