ShingledFS 2.0
SMR-AwareFUSE-basedFileSystem
|
00001 00009 #ifndef __HELPER_H_ 00010 #define __HELPER_H_ 00011 00012 00013 #include <stdio.h> 00014 #include <limits.h> 00015 #include <pthread.h> 00016 00017 #include "debug.h" 00018 #include "common.h" 00019 #include "inode.h" 00020 00021 00022 00023 /* ======================= */ 00024 /* -- Macro Definitions -- */ 00025 /* ======================= */ 00026 00027 #define X_STATS "user.sfs.stats" 00028 #define X_INODE "user.sfs.inode" 00029 00030 00031 00032 /* ====================== */ 00033 /* -- Type Definitions -- */ 00034 /* ====================== */ 00035 00036 00037 00038 /* ========================= */ 00039 /* -- Function Prototypes -- */ 00040 /* ========================= */ 00041 void read_edi_parameters(int fd, uint32_t *blk_size, band_t *band_count, 00042 rba_t *band_size); 00043 void translate_path(const char *in_path, const char *prefix, char *out_path); 00044 void xattr_path(const char *in_path, char *out_path); 00045 int xattr_get(const char *path, const char *name, void *value, size_t size); 00046 void xattr_set(const char *path, const char *name, void *value, size_t size, 00047 int flags); 00048 int is_valid_dir(const char *path); 00049 int is_valid_file(const char *path); 00050 00051 inline void mark_for_cleaning(inode_t inode); 00052 inline void inode_free(int inodeno); 00053 inline void inode_update(inode_t *inode, band_t band, rba_t rba, size_t size); 00054 inline void inode_unlink(inode_t inode); 00055 00056 00057 00058 #endif /* __HELPER_H_ */