4 * Copyright IBM, Corp. 2010
7 * Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
15 #include <sys/types.h>
22 typedef struct FsContext
28 typedef struct FileOperations
30 int (*lstat
)(FsContext
*, const char *, struct stat
*);
31 ssize_t (*readlink
)(FsContext
*, const char *, char *, size_t);
32 int (*chmod
)(FsContext
*, const char *, mode_t
);
33 int (*chown
)(FsContext
*, const char *, uid_t
, gid_t
);
34 int (*mknod
)(FsContext
*, const char *, mode_t
, dev_t
);
35 int (*mksock
)(FsContext
*, const char *);
36 int (*utime
)(FsContext
*, const char *, const struct utimbuf
*);
37 int (*remove
)(FsContext
*, const char *);
38 int (*symlink
)(FsContext
*, const char *, const char *);
39 int (*link
)(FsContext
*, const char *, const char *);
40 int (*setuid
)(FsContext
*, uid_t
);
41 int (*close
)(FsContext
*, int);
42 int (*closedir
)(FsContext
*, DIR *);
43 DIR *(*opendir
)(FsContext
*, const char *);
44 int (*open
)(FsContext
*, const char *, int);
45 int (*open2
)(FsContext
*, const char *, int, mode_t
);
46 void (*rewinddir
)(FsContext
*, DIR *);
47 off_t (*telldir
)(FsContext
*, DIR *);
48 struct dirent
*(*readdir
)(FsContext
*, DIR *);
49 void (*seekdir
)(FsContext
*, DIR *, off_t
);
50 ssize_t (*readv
)(FsContext
*, int, const struct iovec
*, int);
51 ssize_t (*writev
)(FsContext
*, int, const struct iovec
*, int);
52 off_t (*lseek
)(FsContext
*, int, off_t
, int);
53 int (*mkdir
)(FsContext
*, const char *, mode_t
);
54 int (*fstat
)(FsContext
*, int, struct stat
*);
55 int (*rename
)(FsContext
*, const char *, const char *);
56 int (*truncate
)(FsContext
*, const char *, off_t
);
57 int (*fsync
)(FsContext
*, int);