ShingledFS 2.0
SMR-AwareFUSE-basedFileSystem

common.h

Go to the documentation of this file.
00001 
00009 #ifndef __COMMON_H_
00010 #define __COMMON_H_
00011 
00012 
00013 #include <fuse.h>
00014 #include <limits.h>
00015 
00016 #include "log.h"
00017 #include "emutypes.h"
00018 
00019 
00020 
00021 /* ======================= */
00022 /* -- Macro Definitions -- */
00023 /* ======================= */
00024 
00028 #define FILE_PREFIX                                             ".smr_"
00029 #define FILE_XATTR_PREFIX                               ".smr_xattr_"
00030 
00031 
00032 
00033 
00034 /* ====================== */
00035 /* -- Type Definitions -- */
00036 /* ====================== */
00037 
00038 typedef struct {
00039     char                         path_unshingled[PATH_MAX];
00040     char                         path_tmpfs[PATH_MAX];
00041     char                         path_edi[PATH_MAX];
00042 
00043     int                          fd_edi;
00044     int                          fd_bitmap;
00045 
00046     uint32_t             edi_blksize;
00047     band_t                       edi_bandcount;
00048     rba_t                        edi_bandsize;
00049 }shingledfs_data_t;
00050 
00051 
00052 
00053 /* ====================== */
00054 /* -- Global Variables -- */
00055 /* ====================== */
00056 
00061 shingledfs_data_t shingledfs_data;
00062 #define SFSDATA shingledfs_data
00063 
00064 
00065 
00066 #endif  /* __COMMON_H_ */