Changes in uspace/srv/fs/fat/fat.h [852b801:ffa2c8ef] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat.h
r852b801 rffa2c8ef 35 35 36 36 #include "fat_fat.h" 37 #include <ipc/ipc.h> 38 #include <fibril_sync.h> 37 #include <fibril_synch.h> 39 38 #include <libfs.h> 40 39 #include <atomic.h> … … 48 47 49 48 #define min(a, b) ((a) < (b) ? (a) : (b)) 49 50 /* 51 * Convenience macros for accessing some frequently used boot sector members. 52 */ 53 #define BPS(bs) uint16_t_le2host((bs)->bps) 54 #define SPC(bs) (bs)->spc 55 #define RSCNT(bs) uint16_t_le2host((bs)->rscnt) 56 #define FATCNT(bs) (bs)->fatcnt 57 #define SF(bs) uint16_t_le2host((bs)->sec_per_fat) 58 #define RDE(bs) uint16_t_le2host((bs)->root_ent_max) 59 #define TS(bs) (uint16_t_le2host((bs)->totsec16) != 0 ? \ 60 uint16_t_le2host((bs)->totsec16) : \ 61 uint32_t_le2host(bs->totsec32)) 50 62 51 63 #define BS_BLOCK 0 … … 119 131 /** Signature. */ 120 132 uint16_t signature; 121 } __attribute__ ((packed));122 }; 133 } fat32 __attribute__ ((packed)); 134 }; 123 135 } __attribute__ ((packed)) fat_bs_t; 124 136 … … 163 175 164 176 fibril_mutex_t lock; 165 dev _handle_t dev_handle;177 devmap_handle_t devmap_handle; 166 178 fs_index_t index; 167 179 /** … … 194 206 /** FAT in-core node free list link. */ 195 207 link_t ffn_link; 196 size_tsize;208 aoff64_t size; 197 209 unsigned lnkcnt; 198 210 unsigned refcnt; 199 211 bool dirty; 212 213 /* 214 * Cache of the node's last and "current" cluster to avoid some 215 * unnecessary FAT walks. 216 */ 217 /* Node's last cluster in FAT. */ 218 bool lastc_cached_valid; 219 fat_cluster_t lastc_cached_value; 220 /* Node's "current" cluster, i.e. where the last I/O took place. */ 221 bool currc_cached_valid; 222 aoff64_t currc_cached_bn; 223 fat_cluster_t currc_cached_value; 200 224 } fat_node_t; 201 225 … … 204 228 extern void fat_mounted(ipc_callid_t, ipc_call_t *); 205 229 extern void fat_mount(ipc_callid_t, ipc_call_t *); 230 extern void fat_unmounted(ipc_callid_t, ipc_call_t *); 231 extern void fat_unmount(ipc_callid_t, ipc_call_t *); 206 232 extern void fat_lookup(ipc_callid_t, ipc_call_t *); 207 233 extern void fat_read(ipc_callid_t, ipc_call_t *); … … 215 241 extern void fat_sync(ipc_callid_t, ipc_call_t *); 216 242 217 extern fat_idx_t *fat_idx_get_new(dev_handle_t);218 extern fat_idx_t *fat_idx_get_by_pos(dev _handle_t, fat_cluster_t, unsigned);219 extern fat_idx_t *fat_idx_get_by_index(dev _handle_t, fs_index_t);243 extern int fat_idx_get_new(fat_idx_t **, devmap_handle_t); 244 extern fat_idx_t *fat_idx_get_by_pos(devmap_handle_t, fat_cluster_t, unsigned); 245 extern fat_idx_t *fat_idx_get_by_index(devmap_handle_t, fs_index_t); 220 246 extern void fat_idx_destroy(fat_idx_t *); 221 247 extern void fat_idx_hashin(fat_idx_t *); … … 224 250 extern int fat_idx_init(void); 225 251 extern void fat_idx_fini(void); 226 extern int fat_idx_init_by_dev _handle(dev_handle_t);227 extern void fat_idx_fini_by_dev _handle(dev_handle_t);252 extern int fat_idx_init_by_devmap_handle(devmap_handle_t); 253 extern void fat_idx_fini_by_devmap_handle(devmap_handle_t); 228 254 229 255 #endif
Note:
See TracChangeset
for help on using the changeset viewer.