Changes in uspace/srv/fs/mfs/mfs.h [802f0b7:7a46bfe] in mainline
- File:
-
- 1 edited
-
uspace/srv/fs/mfs/mfs.h (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/mfs/mfs.h
r802f0b7 r7a46bfe 48 48 #define NAME "mfs" 49 49 50 / * #define DEBUG_MODE */50 //#define DEBUG_MODE 51 51 52 52 #define min(a, b) ((a) < (b) ? (a) : (b)) … … 71 71 } mfs_version_t; 72 72 73 /* Generic MinixFS superblock*/73 /*Generic MinixFS superblock*/ 74 74 struct mfs_sb_info { 75 75 uint32_t ninodes; … … 84 84 uint16_t state; 85 85 86 /* The following fields do not exist on disk but only in memory*/86 /*The following fields do not exist on disk but only in memory*/ 87 87 unsigned long itable_size; 88 88 mfs_version_t fs_version; … … 97 97 }; 98 98 99 /* Generic MinixFS inode*/99 /*Generic MinixFS inode*/ 100 100 struct mfs_ino_info { 101 101 uint16_t i_mode; … … 107 107 int32_t i_mtime; 108 108 int32_t i_ctime; 109 /* Block numbers for direct zones*/109 /*Block numbers for direct zones*/ 110 110 uint32_t i_dzone[V2_NR_DIRECT_ZONES]; 111 /* Block numbers for indirect zones*/111 /*Block numbers for indirect zones*/ 112 112 uint32_t i_izone[V2_NR_INDIRECT_ZONES]; 113 113 114 /* The following fields do not exist on disk but only in memory*/114 /*The following fields do not exist on disk but only in memory*/ 115 115 bool dirty; 116 116 fs_index_t index; 117 117 }; 118 118 119 /* Generic MFS directory entry*/119 /*Generic MFS directory entry*/ 120 120 struct mfs_dentry_info { 121 121 uint32_t d_inum; 122 122 char d_name[MFS3_MAX_NAME_LEN + 1]; 123 123 124 /* The following fields do not exist on disk but only in memory*/125 126 /* Index of the dentry in the list*/124 /*The following fields do not exist on disk but only in memory*/ 125 126 /*Index of the dentry in the list*/ 127 127 unsigned index; 128 /* Pointer to the node at witch the dentry belongs*/128 /*Pointer to the node at witch the dentry belongs*/ 129 129 struct mfs_node *node; 130 130 }; 131 131 132 132 struct mfs_instance { 133 link_t link; 133 134 service_id_t service_id; 134 135 struct mfs_sb_info *sbi; … … 136 137 }; 137 138 138 /* MinixFS node in core*/139 /*MinixFS node in core*/ 139 140 struct mfs_node { 140 141 struct mfs_ino_info *ino_i; … … 145 146 }; 146 147 147 /* mfs_ops.c*/148 /*mfs_ops.c*/ 148 149 extern vfs_out_ops_t mfs_ops; 149 150 extern libfs_ops_t mfs_libfs_ops; … … 152 153 mfs_global_init(void); 153 154 154 /* mfs_inode.c*/155 /*mfs_inode.c*/ 155 156 extern int 156 157 mfs_get_inode(struct mfs_instance *inst, struct mfs_ino_info **ino_i, 157 fs_index_t index);158 159 extern int 160 mfs_put_inode (struct mfs_node *mnode);158 fs_index_t index); 159 160 extern int 161 mfs_put_inode_core(struct mfs_node *mnode); 161 162 162 163 extern int 163 164 mfs_inode_shrink(struct mfs_node *mnode, size_t size_shrink); 164 165 165 /* mfs_rw.c*/166 /*mfs_rw.c*/ 166 167 extern int 167 168 mfs_read_map(uint32_t *b, const struct mfs_node *mnode, const uint32_t pos); … … 169 170 extern int 170 171 mfs_write_map(struct mfs_node *mnode, uint32_t pos, uint32_t new_zone, 171 uint32_t *old_zone);172 uint32_t *old_zone); 172 173 173 174 extern int 174 175 mfs_prune_ind_zones(struct mfs_node *mnode, size_t new_size); 175 176 176 /* mfs_dentry.c*/177 /*mfs_dentry.c*/ 177 178 extern int 178 179 mfs_read_dentry(struct mfs_node *mnode, 179 struct mfs_dentry_info *d_info, unsigned index);180 struct mfs_dentry_info *d_info, unsigned index); 180 181 181 182 extern int … … 188 189 mfs_insert_dentry(struct mfs_node *mnode, const char *d_name, fs_index_t d_inum); 189 190 190 /* mfs_balloc.c*/191 /*mfs_balloc.c*/ 191 192 extern int 192 193 mfs_alloc_inode(struct mfs_instance *inst, uint32_t *inum); … … 201 202 mfs_free_zone(struct mfs_instance *inst, uint32_t zone); 202 203 203 /* mfs_utils.c*/204 /*mfs_utils.c*/ 204 205 extern uint16_t 205 206 conv16(bool native, uint16_t n);
Note:
See TracChangeset
for help on using the changeset viewer.
