| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
#ifndef _POSIX_H |
| 11 |
#define _POSIX_H |
| 12 |
|
| 13 |
#include <stdio.h> |
| 14 |
#include <unistd.h> |
| 15 |
#include <sys/types.h> |
| 16 |
#include <sys/statvfs.h> |
| 17 |
#include <dirent.h> |
| 18 |
#include <time.h> |
| 19 |
|
| 20 |
#ifdef HAVE_SET_FSID |
| 21 |
#include <sys/fsuid.h> |
| 22 |
#endif |
| 23 |
|
| 24 |
#ifdef HAVE_SYS_XATTR_H |
| 25 |
#include <sys/xattr.h> |
| 26 |
#endif |
| 27 |
|
| 28 |
#ifdef HAVE_SYS_EXTATTR_H |
| 29 |
#include <sys/extattr.h> |
| 30 |
#endif |
| 31 |
|
| 32 |
#include <glusterfs/compat.h> |
| 33 |
#include "posix-mem-types.h" |
| 34 |
#include <glusterfs/call-stub.h> |
| 35 |
|
| 36 |
#ifdef HAVE_LIBAIO |
| 37 |
#include <libaio.h> |
| 38 |
#include "posix-aio.h" |
| 39 |
#endif |
| 40 |
|
| 41 |
#ifdef HAVE_LIBURING |
| 42 |
#include <liburing.h> |
| 43 |
#include "posix-io-uring.h" |
| 44 |
#endif |
| 45 |
|
| 46 |
#define VECTOR_SIZE 64 * 1024 |
| 47 |
#define MAX_NO_VECT 1024 |
| 48 |
|
| 49 |
#define XATTR_KEY_BUF_SIZE 4096 |
| 50 |
#define XATTR_VAL_BUF_SIZE 8192 |
| 51 |
|
| 52 |
#define ACL_BUFFER_MAX 4096 |
| 53 |
|
| 54 |
#define DHT_LINKTO "trusted.glusterfs.dht.linkto" |
| 55 |
|
| 56 |
#define POSIX_GFID_HANDLE_SIZE(base_path_len) \ |
| 57 |
(base_path_len + SLEN("/") + SLEN(GF_HIDDEN_PATH) + SLEN("/") + \ |
| 58 |
SLEN("00/") + SLEN("00/") + SLEN(UUID0_STR) + 1) ; |
| 59 |
|
| 60 |
#define POSIX_GFID_HANDLE_RELSIZE \ |
| 61 |
SLEN("../") + SLEN("../") + SLEN("00/") + SLEN("00/") + SLEN(UUID0_STR) + 1; |
| 62 |
|
| 63 |
#define GF_UNLINK_TRUE 0x0000000000000001 |
| 64 |
#define GF_UNLINK_FALSE 0x0000000000000000 |
| 65 |
|
| 66 |
#define DISK_SPACE_CHECK_AND_GOTO(frame, priv, xdata, op_ret, op_errno, out) \ |
| 67 |
do { \ |
| 68 |
if (frame->root->pid >= 0 && priv->disk_space_full && \ |
| 69 |
!dict_get_sizen(xdata, GLUSTERFS_INTERNAL_FOP_KEY)) { \ |
| 70 |
op_ret = -1; \ |
| 71 |
op_errno = ENOSPC; \ |
| 72 |
gf_msg_debug("posix", ENOSPC, \ |
| 73 |
"disk space utilization reached limits" \ |
| 74 |
" for path %s ", \ |
| 75 |
priv->base_path); \ |
| 76 |
goto out; \ |
| 77 |
} \ |
| 78 |
} while (0) |
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
#if HAVE_UTIMENSAT |
| 87 |
#define SET_TIMESPEC_NSEC_OR_TIMEVAL_USEC(tv, nanosecs) tv.tv_nsec = nanosecs |
| 88 |
#define PATH_SET_TIMESPEC_OR_TIMEVAL(path, tv) \ |
| 89 |
(sys_utimensat(AT_FDCWD, path, tv, AT_SYMLINK_NOFOLLOW)) |
| 90 |
#else |
| 91 |
#define SET_TIMESPEC_NSEC_OR_TIMEVAL_USEC(tv, nanosecs) \ |
| 92 |
tv.tv_usec = nanosecs / 1000 |
| 93 |
#define PATH_SET_TIMESPEC_OR_TIMEVAL(path, tv) (lutimes(path, tv)) |
| 94 |
#endif |
| 95 |
|
| 96 |
#define GFID_NULL_CHECK_AND_GOTO(frame, this, loc, xattr_req, op_ret, \ |
| 97 |
op_errno, _uuid_req, out) \ |
| 98 |
do { \ |
| 99 |
int _ret = 0; \ |
| 100 |
|
| 101 |
|
| 102 |
\ |
| 103 |
if (frame->root->pid == GF_SERVER_PID_TRASH) \ |
| 104 |
break; \ |
| 105 |
_ret = dict_get_gfuuid(xattr_req, "gfid-req", &_uuid_req); \ |
| 106 |
if (_ret) { \ |
| 107 |
gf_msg(this->name, GF_LOG_ERROR, EINVAL, P_MSG_NULL_GFID, \ |
| 108 |
"failed to get the gfid from dict for %s", loc->path); \ |
| 109 |
op_ret = -1; \ |
| 110 |
op_errno = EINVAL; \ |
| 111 |
goto out; \ |
| 112 |
} \ |
| 113 |
if (gf_uuid_is_null(_uuid_req)) { \ |
| 114 |
gf_msg(this->name, GF_LOG_ERROR, EINVAL, P_MSG_NULL_GFID, \ |
| 115 |
"gfid is null for %s", loc->path); \ |
| 116 |
op_ret = -1; \ |
| 117 |
op_errno = EINVAL; \ |
| 118 |
goto out; \ |
| 119 |
} \ |
| 120 |
} while (0) |
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
#define DIRECT_ALIGNED(x, priv) \ |
| 132 |
((((unsigned long)(x)) & ((priv)->base_bsize - 1)) == 0) |
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
struct posix_fd { |
| 139 |
int fd; |
| 140 |
int32_t flags; |
| 141 |
DIR *dir; |
| 142 |
off_t dir_eof; |
| 143 |
struct list_head list; |
| 144 |
xlator_t *xl; |
| 145 |
int odirect; |
| 146 |
}; |
| 147 |
|
| 148 |
struct posix_diskxl { |
| 149 |
pthread_cond_t cond; |
| 150 |
struct list_head list; |
| 151 |
xlator_t *xl; |
| 152 |
gf_boolean_t detach_notify; |
| 153 |
gf_boolean_t is_use; |
| 154 |
}; |
| 155 |
|
| 156 |
struct posix_private { |
| 157 |
char *base_path; |
| 158 |
int32_t base_path_length; |
| 159 |
|
| 160 |
int32_t path_max; |
| 161 |
|
| 162 |
long base_bsize; |
| 163 |
|
| 164 |
gf_lock_t lock; |
| 165 |
|
| 166 |
char *hostname; |
| 167 |
|
| 168 |
time_t last_landfill_check; |
| 169 |
|
| 170 |
gf_atomic_t read_value; |
| 171 |
gf_atomic_t write_value; |
| 172 |
|
| 173 |
|
| 174 |
struct gf_tw_timer_list *janitor; |
| 175 |
|
| 176 |
char *trash_path; |
| 177 |
|
| 178 |
int mount_lock; |
| 179 |
|
| 180 |
int fsync_queue_count; |
| 181 |
|
| 182 |
ino_t handledir_st_ino; |
| 183 |
dev_t handledir_st_dev; |
| 184 |
|
| 185 |
|
| 186 |
uuid_t glusterd_uuid; |
| 187 |
|
| 188 |
#ifdef HAVE_LIBAIO |
| 189 |
io_context_t ctxp; |
| 190 |
pthread_t aiothread; |
| 191 |
#endif |
| 192 |
|
| 193 |
pthread_t fsyncer; |
| 194 |
struct list_head fsyncs; |
| 195 |
pthread_mutex_t fsync_mutex; |
| 196 |
pthread_cond_t fsync_cond; |
| 197 |
pthread_mutex_t janitor_mutex; |
| 198 |
pthread_cond_t janitor_cond; |
| 199 |
pthread_cond_t fd_cond; |
| 200 |
pthread_cond_t disk_cond; |
| 201 |
time_t janitor_sleep_duration; |
| 202 |
|
| 203 |
enum { |
| 204 |
BATCH_NONE = 0, |
| 205 |
BATCH_SYNCFS, |
| 206 |
BATCH_SYNCFS_SINGLE_FSYNC, |
| 207 |
BATCH_REVERSE_FSYNC, |
| 208 |
BATCH_SYNCFS_REVERSE_FSYNC |
| 209 |
} batch_fsync_mode; |
| 210 |
|
| 211 |
uint32_t batch_fsync_delay_usec; |
| 212 |
char gfid2path_sep[8]; |
| 213 |
|
| 214 |
|
| 215 |
time_t health_check_interval; |
| 216 |
|
| 217 |
time_t health_check_timeout; |
| 218 |
pthread_t health_check; |
| 219 |
|
| 220 |
double disk_reserve; |
| 221 |
pthread_t disk_space_check; |
| 222 |
uint32_t disk_space_full; |
| 223 |
|
| 224 |
#ifdef GF_DARWIN_HOST_OS |
| 225 |
enum { |
| 226 |
XATTR_NONE = 0, |
| 227 |
XATTR_STRIP, |
| 228 |
XATTR_APPEND, |
| 229 |
XATTR_BOTH, |
| 230 |
} xattr_user_namespace; |
| 231 |
#endif |
| 232 |
|
| 233 |
|
| 234 |
|
| 235 |
int32_t shared_brick_count; |
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
mode_t force_create_mode; |
| 240 |
mode_t force_directory_mode; |
| 241 |
mode_t create_mask; |
| 242 |
mode_t create_directory_mask; |
| 243 |
uint32_t max_hardlinks; |
| 244 |
int32_t arrdfd[256]; |
| 245 |
int dirfd; |
| 246 |
uint32_t rel_fdcount; |
| 247 |
|
| 248 |
|
| 249 |
gf_boolean_t disable_landfill_purge; |
| 250 |
|
| 251 |
gf_boolean_t fips_mode_rchecksum; |
| 252 |
gf_boolean_t ctime; |
| 253 |
gf_boolean_t janitor_task_stop; |
| 254 |
|
| 255 |
gf_boolean_t disk_unit_percent; |
| 256 |
gf_boolean_t health_check_active; |
| 257 |
gf_boolean_t update_pgfid_nlinks; |
| 258 |
gf_boolean_t gfid2path; |
| 259 |
|
| 260 |
gf_boolean_t node_uuid_pathinfo; |
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
|
| 270 |
gf_boolean_t export_statfs; |
| 271 |
|
| 272 |
gf_boolean_t o_direct; |
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
gf_boolean_t background_unlink; |
| 281 |
gf_boolean_t aio_configured; |
| 282 |
gf_boolean_t aio_init_done; |
| 283 |
gf_boolean_t aio_capable; |
| 284 |
|
| 285 |
gf_boolean_t io_uring_configured; |
| 286 |
|
| 287 |
|
| 288 |
#ifdef HAVE_LIBURING |
| 289 |
gf_boolean_t io_uring_init_done; |
| 290 |
gf_boolean_t io_uring_capable; |
| 291 |
gf_boolean_t uring_thread_exit; |
| 292 |
struct io_uring ring; |
| 293 |
pthread_t uring_thread; |
| 294 |
pthread_mutex_t sq_mutex; |
| 295 |
pthread_mutex_t cq_mutex; |
| 296 |
#endif |
| 297 |
void *pxl; |
| 298 |
}; |
| 299 |
|
| 300 |
typedef struct { |
| 301 |
call_frame_t *frame; |
| 302 |
xlator_t *this; |
| 303 |
const char *real_path; |
| 304 |
dict_t *xattr; |
| 305 |
struct iatt *stbuf; |
| 306 |
loc_t *loc; |
| 307 |
inode_t *inode; |
| 308 |
fd_t *fd; |
| 309 |
int fdnum; |
| 310 |
int flags; |
| 311 |
char *list; |
| 312 |
size_t list_size; |
| 313 |
int32_t op_errno; |
| 314 |
|
| 315 |
char _pad[4]; |
| 316 |
} posix_xattr_filler_t; |
| 317 |
|
| 318 |
typedef struct { |
| 319 |
uint64_t unlink_flag; |
| 320 |
pthread_mutex_t xattrop_lock; |
| 321 |
pthread_mutex_t write_atomic_lock; |
| 322 |
pthread_mutex_t pgfid_lock; |
| 323 |
} posix_inode_ctx_t; |
| 324 |
|
| 325 |
#define POSIX_BASE_PATH(this) \ |
| 326 |
(((struct posix_private *)this->private)->base_path) |
| 327 |
|
| 328 |
#define POSIX_BASE_PATH_LEN(this) \ |
| 329 |
(((struct posix_private *)this->private)->base_path_length) |
| 330 |
|
| 331 |
#define POSIX_PATH_MAX(this) (((struct posix_private *)this->private)->path_max) |
| 332 |
|
| 333 |
#define POSIX_GET_FILE_UNLINK_PATH(base_path, gfid, unlink_path) \ |
| 334 |
do { \ |
| 335 |
int path_len = 0; \ |
| 336 |
char gfid_str[64] = {0}; \ |
| 337 |
uuid_utoa_r(gfid, gfid_str); \ |
| 338 |
path_len = strlen(base_path) + 1 + SLEN(GF_UNLINK_PATH) + 1 + \ |
| 339 |
UUID_CANONICAL_FORM_LEN + 1; \ |
| 340 |
unlink_path = alloca(path_len); \ |
| 341 |
if (!unlink_path) { \ |
| 342 |
gf_msg("posix", GF_LOG_ERROR, ENOMEM, P_MSG_UNLINK_FAILED, \ |
| 343 |
"Failed to get unlink_path"); \ |
| 344 |
break; \ |
| 345 |
} \ |
| 346 |
sprintf(unlink_path, "%s/%s/%s", base_path, GF_UNLINK_PATH, gfid_str); \ |
| 347 |
} while (0) |
| 348 |
|
| 349 |
|
| 350 |
int |
| 351 |
posix_inode_ctx_set_unlink_flag(inode_t *inode, xlator_t *this, uint64_t ctx); |
| 352 |
|
| 353 |
int |
| 354 |
posix_inode_ctx_get_all(inode_t *inode, xlator_t *this, |
| 355 |
posix_inode_ctx_t **ctx); |
| 356 |
|
| 357 |
int |
| 358 |
__posix_inode_ctx_set_unlink_flag(inode_t *inode, xlator_t *this, uint64_t ctx); |
| 359 |
|
| 360 |
int |
| 361 |
__posix_inode_ctx_get_all(inode_t *inode, xlator_t *this, |
| 362 |
posix_inode_ctx_t **ctx); |
| 363 |
|
| 364 |
int |
| 365 |
posix_gfid_set(xlator_t *this, const char *path, loc_t *loc, dict_t *xattr_req, |
| 366 |
pid_t pid, int *op_errno); |
| 367 |
int |
| 368 |
posix_fdstat(xlator_t *this, inode_t *inode, int fd, struct iatt *stbuf_p, |
| 369 |
gf_boolean_t fetch_time); |
| 370 |
int |
| 371 |
posix_istat(xlator_t *this, inode_t *inode, uuid_t gfid, const char *basename, |
| 372 |
struct iatt *iatt, gf_boolean_t fetch_time); |
| 373 |
int |
| 374 |
posix_pstat(xlator_t *this, inode_t *inode, uuid_t gfid, const char *real_path, |
| 375 |
struct iatt *iatt, gf_boolean_t inode_locked, |
| 376 |
gf_boolean_t fetch_time); |
| 377 |
|
| 378 |
dict_t * |
| 379 |
posix_xattr_fill(xlator_t *this, const char *path, loc_t *loc, fd_t *fd, |
| 380 |
int fdnum, dict_t *xattr, struct iatt *buf); |
| 381 |
int |
| 382 |
posix_handle_pair(xlator_t *this, loc_t *loc, const char *real_path, char *key, |
| 383 |
data_t *value, int flags, struct iatt *stbuf); |
| 384 |
int |
| 385 |
posix_fhandle_pair(call_frame_t *frame, xlator_t *this, int fd, char *key, |
| 386 |
data_t *value, int flags, struct iatt *stbuf, fd_t *_fd); |
| 387 |
void |
| 388 |
posix_janitor_timer_start(xlator_t *this); |
| 389 |
int |
| 390 |
posix_gfid_heal(xlator_t *this, const char *path, loc_t *loc, |
| 391 |
dict_t *xattr_req); |
| 392 |
int |
| 393 |
posix_entry_create_xattr_set(xlator_t *this, loc_t *loc, const char *path, |
| 394 |
dict_t *dict); |
| 395 |
|
| 396 |
int |
| 397 |
posix_fd_ctx_get(fd_t *fd, xlator_t *this, struct posix_fd **pfd, |
| 398 |
int *op_errno); |
| 399 |
|
| 400 |
gf_boolean_t |
| 401 |
posix_special_xattr(char **pattern, char *key); |
| 402 |
|
| 403 |
void |
| 404 |
__posix_fd_set_odirect(fd_t *fd, struct posix_fd *pfd, int opflags, int direct); |
| 405 |
|
| 406 |
int |
| 407 |
posix_spawn_health_check_thread(xlator_t *this); |
| 408 |
|
| 409 |
int |
| 410 |
posix_spawn_disk_space_check_thread(xlator_t *this); |
| 411 |
|
| 412 |
void * |
| 413 |
posix_fsyncer(void *); |
| 414 |
int |
| 415 |
posix_get_ancestry(xlator_t *this, inode_t *leaf_inode, gf_dirent_t *head, |
| 416 |
char **path, int type, int32_t *op_errno, dict_t *xdata); |
| 417 |
int |
| 418 |
posix_handle_mdata_xattr(call_frame_t *frame, const char *name, int *op_errno); |
| 419 |
int |
| 420 |
posix_handle_georep_xattrs(call_frame_t *, const char *, int *, gf_boolean_t); |
| 421 |
int32_t |
| 422 |
posix_resolve_dirgfid_to_path(const uuid_t dirgfid, const char *brick_path, |
| 423 |
const char *bname, char **path); |
| 424 |
void |
| 425 |
posix_gfid_unset(xlator_t *this, dict_t *xdata); |
| 426 |
|
| 427 |
int |
| 428 |
posix_pacl_get(const char *path, int fdnum, const char *key, char **acl_s); |
| 429 |
|
| 430 |
int32_t |
| 431 |
posix_get_objectsignature(char *, dict_t *); |
| 432 |
|
| 433 |
int32_t |
| 434 |
posix_fdget_objectsignature(int, dict_t *); |
| 435 |
|
| 436 |
gf_boolean_t |
| 437 |
posix_is_bulk_removexattr(char *name, dict_t *dict); |
| 438 |
|
| 439 |
int32_t |
| 440 |
posix_set_iatt_in_dict(dict_t *, struct iatt *, struct iatt *); |
| 441 |
|
| 442 |
mode_t posix_override_umask(mode_t, mode_t); |
| 443 |
|
| 444 |
int32_t |
| 445 |
posix_priv(xlator_t *this); |
| 446 |
|
| 447 |
int32_t |
| 448 |
posix_inode(xlator_t *this); |
| 449 |
|
| 450 |
void |
| 451 |
posix_fini(xlator_t *this); |
| 452 |
|
| 453 |
int |
| 454 |
posix_init(xlator_t *this); |
| 455 |
|
| 456 |
int |
| 457 |
posix_reconfigure(xlator_t *this, dict_t *options); |
| 458 |
|
| 459 |
int32_t |
| 460 |
posix_notify(xlator_t *this, int32_t event, void *data, ...); |
| 461 |
|
| 462 |
|
| 463 |
int32_t |
| 464 |
posix_lookup(call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata); |
| 465 |
|
| 466 |
int |
| 467 |
posix_create(call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags, |
| 468 |
mode_t mode, mode_t umask, fd_t *fd, dict_t *xdata); |
| 469 |
|
| 470 |
int |
| 471 |
posix_symlink(call_frame_t *frame, xlator_t *this, const char *linkname, |
| 472 |
loc_t *loc, mode_t umask, dict_t *xdata); |
| 473 |
|
| 474 |
int |
| 475 |
posix_rename(call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc, |
| 476 |
dict_t *xdata); |
| 477 |
|
| 478 |
int |
| 479 |
posix_link(call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc, |
| 480 |
dict_t *xdata); |
| 481 |
|
| 482 |
int |
| 483 |
posix_mknod(call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode, |
| 484 |
dev_t dev, mode_t umask, dict_t *xdata); |
| 485 |
|
| 486 |
int |
| 487 |
posix_mkdir(call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode, |
| 488 |
mode_t umask, dict_t *xdata); |
| 489 |
|
| 490 |
int32_t |
| 491 |
posix_unlink(call_frame_t *frame, xlator_t *this, loc_t *loc, int xflag, |
| 492 |
dict_t *xdata); |
| 493 |
|
| 494 |
int |
| 495 |
posix_rmdir(call_frame_t *frame, xlator_t *this, loc_t *loc, int flags, |
| 496 |
dict_t *xdata); |
| 497 |
|
| 498 |
|
| 499 |
int |
| 500 |
posix_forget(xlator_t *this, inode_t *inode); |
| 501 |
|
| 502 |
int32_t |
| 503 |
posix_stat(call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata); |
| 504 |
|
| 505 |
int |
| 506 |
posix_setattr(call_frame_t *frame, xlator_t *this, loc_t *loc, |
| 507 |
struct iatt *stbuf, int32_t valid, dict_t *xdata); |
| 508 |
|
| 509 |
int |
| 510 |
posix_fsetattr(call_frame_t *frame, xlator_t *this, fd_t *fd, |
| 511 |
struct iatt *stbuf, int32_t valid, dict_t *xdata); |
| 512 |
|
| 513 |
int32_t |
| 514 |
posix_discard(call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset, |
| 515 |
size_t len, dict_t *xdata); |
| 516 |
|
| 517 |
int32_t |
| 518 |
posix_zerofill(call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset, |
| 519 |
off_t len, dict_t *xdata); |
| 520 |
|
| 521 |
int32_t |
| 522 |
posix_glfallocate(call_frame_t *frame, xlator_t *this, fd_t *fd, |
| 523 |
int32_t keep_size, off_t offset, size_t len, dict_t *xdata); |
| 524 |
|
| 525 |
int32_t |
| 526 |
posix_ipc(call_frame_t *frame, xlator_t *this, int32_t op, dict_t *xdata); |
| 527 |
|
| 528 |
int32_t |
| 529 |
posix_seek(call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset, |
| 530 |
gf_seek_what_t what, dict_t *xdata); |
| 531 |
|
| 532 |
int32_t |
| 533 |
posix_opendir(call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd, |
| 534 |
dict_t *xdata); |
| 535 |
|
| 536 |
int32_t |
| 537 |
posix_releasedir(xlator_t *this, fd_t *fd); |
| 538 |
|
| 539 |
int32_t |
| 540 |
posix_readlink(call_frame_t *frame, xlator_t *this, loc_t *loc, size_t size, |
| 541 |
dict_t *xdata); |
| 542 |
|
| 543 |
int32_t |
| 544 |
posix_truncate(call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset, |
| 545 |
dict_t *xdata); |
| 546 |
|
| 547 |
int32_t |
| 548 |
posix_open(call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags, |
| 549 |
fd_t *fd, dict_t *xdata); |
| 550 |
|
| 551 |
int |
| 552 |
posix_readv(call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, |
| 553 |
off_t offset, uint32_t flags, dict_t *xdata); |
| 554 |
|
| 555 |
int32_t |
| 556 |
posix_writev(call_frame_t *frame, xlator_t *this, fd_t *fd, |
| 557 |
struct iovec *vector, int32_t count, off_t offset, uint32_t flags, |
| 558 |
struct iobref *iobref, dict_t *xdata); |
| 559 |
|
| 560 |
int32_t |
| 561 |
posix_statfs(call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata); |
| 562 |
|
| 563 |
int32_t |
| 564 |
posix_flush(call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata); |
| 565 |
|
| 566 |
int32_t |
| 567 |
posix_release(xlator_t *this, fd_t *fd); |
| 568 |
|
| 569 |
int32_t |
| 570 |
posix_fsync(call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t datasync, |
| 571 |
dict_t *xdata); |
| 572 |
|
| 573 |
int32_t |
| 574 |
posix_setxattr(call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *dict, |
| 575 |
int flags, dict_t *xdata); |
| 576 |
|
| 577 |
int |
| 578 |
posix_get_ancestry_non_directory(xlator_t *this, inode_t *leaf_inode, |
| 579 |
gf_dirent_t *head, char **path, int type, |
| 580 |
int32_t *op_errno, dict_t *xdata); |
| 581 |
|
| 582 |
int |
| 583 |
posix_get_ancestry(xlator_t *this, inode_t *leaf_inode, gf_dirent_t *head, |
| 584 |
char **path, int type, int32_t *op_errno, dict_t *xdata); |
| 585 |
|
| 586 |
int32_t |
| 587 |
posix_getxattr(call_frame_t *frame, xlator_t *this, loc_t *loc, |
| 588 |
const char *name, dict_t *xdata); |
| 589 |
|
| 590 |
int32_t |
| 591 |
posix_fgetxattr(call_frame_t *frame, xlator_t *this, fd_t *fd, const char *name, |
| 592 |
dict_t *xdata); |
| 593 |
|
| 594 |
int32_t |
| 595 |
posix_fsetxattr(call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *dict, |
| 596 |
int flags, dict_t *xdata); |
| 597 |
|
| 598 |
int32_t |
| 599 |
posix_removexattr(call_frame_t *frame, xlator_t *this, loc_t *loc, |
| 600 |
const char *name, dict_t *xdata); |
| 601 |
|
| 602 |
int32_t |
| 603 |
posix_fremovexattr(call_frame_t *frame, xlator_t *this, fd_t *fd, |
| 604 |
const char *name, dict_t *xdata); |
| 605 |
|
| 606 |
int32_t |
| 607 |
posix_fsyncdir(call_frame_t *frame, xlator_t *this, fd_t *fd, int datasync, |
| 608 |
dict_t *xdata); |
| 609 |
|
| 610 |
int |
| 611 |
posix_xattrop(call_frame_t *frame, xlator_t *this, loc_t *loc, |
| 612 |
gf_xattrop_flags_t optype, dict_t *xattr, dict_t *xdata); |
| 613 |
|
| 614 |
int |
| 615 |
posix_fxattrop(call_frame_t *frame, xlator_t *this, fd_t *fd, |
| 616 |
gf_xattrop_flags_t optype, dict_t *xattr, dict_t *xdata); |
| 617 |
|
| 618 |
int |
| 619 |
posix_access(call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t mask, |
| 620 |
dict_t *xdata); |
| 621 |
|
| 622 |
int32_t |
| 623 |
posix_ftruncate(call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset, |
| 624 |
dict_t *xdata); |
| 625 |
|
| 626 |
int32_t |
| 627 |
posix_fstat(call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata); |
| 628 |
|
| 629 |
int32_t |
| 630 |
posix_lease(call_frame_t *frame, xlator_t *this, loc_t *loc, |
| 631 |
struct gf_lease *lease, dict_t *xdata); |
| 632 |
|
| 633 |
int32_t |
| 634 |
posix_lk(call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd, |
| 635 |
struct gf_flock *lock, dict_t *xdata); |
| 636 |
|
| 637 |
int32_t |
| 638 |
posix_inodelk(call_frame_t *frame, xlator_t *this, const char *volume, |
| 639 |
loc_t *loc, int32_t cmd, struct gf_flock *lock, dict_t *xdata); |
| 640 |
|
| 641 |
int32_t |
| 642 |
posix_finodelk(call_frame_t *frame, xlator_t *this, const char *volume, |
| 643 |
fd_t *fd, int32_t cmd, struct gf_flock *lock, dict_t *xdata); |
| 644 |
|
| 645 |
int32_t |
| 646 |
posix_entrylk(call_frame_t *frame, xlator_t *this, const char *volume, |
| 647 |
loc_t *loc, const char *basename, entrylk_cmd cmd, |
| 648 |
entrylk_type type, dict_t *xdata); |
| 649 |
|
| 650 |
int32_t |
| 651 |
posix_fentrylk(call_frame_t *frame, xlator_t *this, const char *volume, |
| 652 |
fd_t *fd, const char *basename, entrylk_cmd cmd, |
| 653 |
entrylk_type type, dict_t *xdata); |
| 654 |
|
| 655 |
int32_t |
| 656 |
posix_readdir(call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, |
| 657 |
off_t off, dict_t *xdata); |
| 658 |
|
| 659 |
int32_t |
| 660 |
posix_readdirp(call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, |
| 661 |
off_t off, dict_t *dict); |
| 662 |
|
| 663 |
int32_t |
| 664 |
posix_rchecksum(call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset, |
| 665 |
int32_t len, dict_t *xdata); |
| 666 |
|
| 667 |
int32_t |
| 668 |
posix_put(call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode, |
| 669 |
mode_t umask, uint32_t flags, struct iovec *vector, int32_t count, |
| 670 |
off_t offset, struct iobref *iobref, dict_t *xattr, dict_t *xdata); |
| 671 |
|
| 672 |
int32_t |
| 673 |
posix_copy_file_range(call_frame_t *frame, xlator_t *this, fd_t *fd_in, |
| 674 |
off64_t off_in, fd_t *fd_out, off64_t off_out, size_t len, |
| 675 |
uint32_t flags, dict_t *xdata); |
| 676 |
|
| 677 |
int32_t |
| 678 |
posix_set_mode_in_dict(dict_t *in_dict, dict_t *out_dict, |
| 679 |
struct iatt *in_stbuf); |
| 680 |
|
| 681 |
gf_cs_obj_state |
| 682 |
posix_cs_check_status(xlator_t *this, const char *realpath, int *fd, |
| 683 |
struct iatt *buf); |
| 684 |
|
| 685 |
int |
| 686 |
posix_cs_set_state(xlator_t *this, dict_t **rsp, gf_cs_obj_state state, |
| 687 |
char const *path, int *fd); |
| 688 |
|
| 689 |
gf_cs_obj_state |
| 690 |
posix_cs_heal_state(xlator_t *this, const char *path, int *fd, |
| 691 |
struct iatt *stbuf); |
| 692 |
int |
| 693 |
posix_cs_maintenance(xlator_t *this, fd_t *fd, loc_t *loc, int *pfd, |
| 694 |
struct iatt *buf, const char *realpath, |
| 695 |
gf_boolean_t cs_obj_status, gf_boolean_t cs_obj_repair, |
| 696 |
dict_t **xattr_rsp, gf_boolean_t ignore_failure); |
| 697 |
int |
| 698 |
posix_check_dev_file(xlator_t *this, inode_t *inode, char *fop, int *op_errno); |
| 699 |
|
| 700 |
int |
| 701 |
posix_spawn_ctx_janitor_thread(xlator_t *this); |
| 702 |
|
| 703 |
void |
| 704 |
posix_update_iatt_buf(struct iatt *buf, int fd, char *loc); |
| 705 |
|
| 706 |
gf_boolean_t |
| 707 |
posix_is_layout_stale(dict_t *xdata, char *par_path, xlator_t *this); |
| 708 |
|
| 709 |
int |
| 710 |
posix_delete_user_xattr(dict_t *dict, char *k, data_t *v, void *data); |
| 711 |
|
| 712 |
#endif |