Changes in uspace/srv/fs/fat/fat.h [ffa2c8ef:852b801] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat.h
rffa2c8ef r852b801 35 35 36 36 #include "fat_fat.h" 37 #include <fibril_synch.h> 37 #include <ipc/ipc.h> 38 #include <fibril_sync.h> 38 39 #include <libfs.h> 39 40 #include <atomic.h> … … 47 48 48 49 #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)->spc55 #define RSCNT(bs) uint16_t_le2host((bs)->rscnt)56 #define FATCNT(bs) (bs)->fatcnt57 #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))62 50 63 51 #define BS_BLOCK 0 … … 131 119 /** Signature. */ 132 120 uint16_t signature; 133 } fat32__attribute__ ((packed));134 }; 121 } __attribute__ ((packed)); 122 }; 135 123 } __attribute__ ((packed)) fat_bs_t; 136 124 … … 175 163 176 164 fibril_mutex_t lock; 177 dev map_handle_t devmap_handle;165 dev_handle_t dev_handle; 178 166 fs_index_t index; 179 167 /** … … 206 194 /** FAT in-core node free list link. */ 207 195 link_t ffn_link; 208 aoff64_tsize;196 size_t size; 209 197 unsigned lnkcnt; 210 198 unsigned refcnt; 211 199 bool dirty; 212 213 /*214 * Cache of the node's last and "current" cluster to avoid some215 * 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;224 200 } fat_node_t; 225 201 … … 228 204 extern void fat_mounted(ipc_callid_t, ipc_call_t *); 229 205 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 *);232 206 extern void fat_lookup(ipc_callid_t, ipc_call_t *); 233 207 extern void fat_read(ipc_callid_t, ipc_call_t *); … … 241 215 extern void fat_sync(ipc_callid_t, ipc_call_t *); 242 216 243 extern int fat_idx_get_new(fat_idx_t **, devmap_handle_t);244 extern fat_idx_t *fat_idx_get_by_pos(dev map_handle_t, fat_cluster_t, unsigned);245 extern fat_idx_t *fat_idx_get_by_index(dev map_handle_t, fs_index_t);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); 246 220 extern void fat_idx_destroy(fat_idx_t *); 247 221 extern void fat_idx_hashin(fat_idx_t *); … … 250 224 extern int fat_idx_init(void); 251 225 extern void fat_idx_fini(void); 252 extern int fat_idx_init_by_dev map_handle(devmap_handle_t);253 extern void fat_idx_fini_by_dev map_handle(devmap_handle_t);226 extern int fat_idx_init_by_dev_handle(dev_handle_t); 227 extern void fat_idx_fini_by_dev_handle(dev_handle_t); 254 228 255 229 #endif
Note:
See TracChangeset
for help on using the changeset viewer.