ShingledFS 2.0
SMR-AwareFUSE-basedFileSystem
|
00001 00010 #ifndef __SHINGLEDFS_H_ 00011 #define __SHINGLEDFS_H_ 00012 00013 00014 #include <fuse.h> 00015 00016 #include "common.h" 00017 00018 00019 /* ======================= */ 00020 /* -- Macro Definitions -- */ 00021 /* ======================= */ 00022 00026 #define MAX_FILENAME_LEN 255 00027 00028 00029 00030 /* ========================= */ 00031 /* -- Function Prototypes -- */ 00032 /* ========================= */ 00033 00034 void *shingledfs_init(struct fuse_conn_info *conn); 00035 //void shingledfs_destroy(void *userdata); 00036 00037 int shingledfs_mkdir(const char *path, mode_t mode); 00038 int shingledfs_rmdir(const char *path); 00039 int shingledfs_opendir(const char *path, struct fuse_file_info *fi); 00040 int shingledfs_readdir(const char *path, void *buf, fuse_fill_dir_t filler, 00041 off_t offset, struct fuse_file_info *fi); 00042 int shingledfs_releasedir(const char *path, struct fuse_file_info *fi); 00043 00044 00045 int shingledfs_mknod(const char *path, mode_t mode, dev_t dev); 00046 int shingledfs_open(const char *path, struct fuse_file_info *fi); 00047 int shingledfs_read(const char *path, char *buf, size_t size, off_t offset, 00048 struct fuse_file_info *fi); 00049 int shingledfs_write(const char *path, const char *buf, size_t size, 00050 off_t offset, struct fuse_file_info *fi); 00051 int shingledfs_flush(const char *path, struct fuse_file_info *fi); 00052 int shingledfs_release(const char *path, struct fuse_file_info *fi); 00053 int shingledfs_rename(const char *path, const char *path_new); 00054 int shingledfs_unlink(const char *path); 00055 int shingledfs_truncate(const char *path, off_t offset); 00056 00057 int shingledfs_getattr(const char *path, struct stat *statbuf); 00058 int shingledfs_fgetattr(const char *path, struct stat *statbuf, 00059 struct fuse_file_info *fi); 00060 int shingledfs_setxattr(const char *path, const char *name, const char *value, 00061 size_t size, int flags); 00062 int shingledfs_getxattr(const char *path, const char *name, char *value, 00063 size_t size); 00064 int shingledfs_listxattr(const char *path, char *list, size_t size); 00065 int shingledfs_removexattr(const char *path, const char *name); 00066 00067 int shingledfs_access(const char *path, int mask); 00068 int shingledfs_utime(const char *path, struct utimbuf *tv); 00069 int shingledfs_chmod(const char *path, mode_t mode); 00070 int shingledfs_chown(const char *path, uid_t uid, gid_t gid); 00071 00072 int shingledfs_symlink(const char *path, const char *path_target); 00073 int shingledfs_readlink(const char *path, char *buf, size_t size); 00074 int shingledfs_link(const char *path, const char *path_target); 00075 00076 int shingledfs_statfs(const char *path, struct statvfs *statv); 00077 00078 00079 00080 #endif /* __SHINGLEDFS_H_ */