| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
#define __XOPEN_SOURCE 500 |
| 11 |
|
| 12 |
|
| 13 |
#ifndef _GNU_SOURCE |
| 14 |
#define _GNU_SOURCE |
| 15 |
#endif |
| 16 |
|
| 17 |
#include "posix.h" |
| 18 |
|
| 19 |
int32_t |
| 20 |
mem_acct_init(xlator_t *this); |
| 21 |
|
| 22 |
extern struct volume_options posix_options[]; |
| 23 |
|
| 24 |
struct xlator_dumpops dumpops = { |
| 25 |
.priv = posix_priv, |
| 26 |
.inode = posix_inode, |
| 27 |
}; |
| 28 |
|
| 29 |
struct xlator_fops fops = { |
| 30 |
.lookup = posix_lookup, |
| 31 |
.stat = posix_stat, |
| 32 |
.opendir = posix_opendir, |
| 33 |
.readdir = posix_readdir, |
| 34 |
.readdirp = posix_readdirp, |
| 35 |
.readlink = posix_readlink, |
| 36 |
.mknod = posix_mknod, |
| 37 |
.mkdir = posix_mkdir, |
| 38 |
.unlink = posix_unlink, |
| 39 |
.rmdir = posix_rmdir, |
| 40 |
.symlink = posix_symlink, |
| 41 |
.rename = posix_rename, |
| 42 |
.link = posix_link, |
| 43 |
.truncate = posix_truncate, |
| 44 |
.create = posix_create, |
| 45 |
.open = posix_open, |
| 46 |
.readv = posix_readv, |
| 47 |
.writev = posix_writev, |
| 48 |
.statfs = posix_statfs, |
| 49 |
.flush = posix_flush, |
| 50 |
.fsync = posix_fsync, |
| 51 |
.setxattr = posix_setxattr, |
| 52 |
.fsetxattr = posix_fsetxattr, |
| 53 |
.getxattr = posix_getxattr, |
| 54 |
.fgetxattr = posix_fgetxattr, |
| 55 |
.removexattr = posix_removexattr, |
| 56 |
.fremovexattr = posix_fremovexattr, |
| 57 |
.fsyncdir = posix_fsyncdir, |
| 58 |
.access = posix_access, |
| 59 |
.ftruncate = posix_ftruncate, |
| 60 |
.fstat = posix_fstat, |
| 61 |
.lk = posix_lk, |
| 62 |
.inodelk = posix_inodelk, |
| 63 |
.finodelk = posix_finodelk, |
| 64 |
.entrylk = posix_entrylk, |
| 65 |
.fentrylk = posix_fentrylk, |
| 66 |
.rchecksum = posix_rchecksum, |
| 67 |
.xattrop = posix_xattrop, |
| 68 |
.fxattrop = posix_fxattrop, |
| 69 |
.setattr = posix_setattr, |
| 70 |
.fsetattr = posix_fsetattr, |
| 71 |
.fallocate = posix_glfallocate, |
| 72 |
.discard = posix_discard, |
| 73 |
.zerofill = posix_zerofill, |
| 74 |
.ipc = posix_ipc, |
| 75 |
.seek = posix_seek, |
| 76 |
.lease = posix_lease, |
| 77 |
.put = posix_put, |
| 78 |
.copy_file_range = posix_copy_file_range, |
| 79 |
}; |
| 80 |
|
| 81 |
struct xlator_cbks cbks = { |
| 82 |
.release = posix_release, |
| 83 |
.releasedir = posix_releasedir, |
| 84 |
.forget = posix_forget, |
| 85 |
}; |
| 86 |
|
| 87 |
xlator_api_t xlator_api = { |
| 88 |
.init = posix_init, |
| 89 |
.fini = posix_fini, |
| 90 |
.notify = posix_notify, |
| 91 |
.reconfigure = posix_reconfigure, |
| 92 |
.mem_acct_init = mem_acct_init, |
| 93 |
.op_version = {1}, |
| 94 |
.dumpops = &dumpops, |
| 95 |
.fops = &fops, |
| 96 |
.cbks = &cbks, |
| 97 |
.options = posix_options, |
| 98 |
.identifier = "posix", |
| 99 |
.category = GF_MAINTAINED, |
| 100 |
}; |