2 Copyright 1999-2001, Be Incorporated. All Rights Reserved.
3 This file may be used under the terms of the Be Sample Code License.
12 #define vIS_DATA_CLUSTER(vol,cluster) (((cluster) >= 2) && ((cluster) < vol->total_clusters + 2))
13 #define IS_DATA_CLUSTER(cluster) vIS_DATA_CLUSTER(vol,cluster)
15 // cluster 1 represents root directory for fat12 and fat16
16 #define IS_FIXED_ROOT(cluster) ((cluster) == 1)
18 int32
count_free_clusters(nspace
*vol
);
19 int32
get_nth_fat_entry(nspace
*vol
, int32 cluster
, uint32 n
);
20 uint32
count_clusters(nspace
*vol
, int32 cluster
);
22 /* remember to update vnode iteration after calling this function */
23 status_t
clear_fat_chain(nspace
*vol
, uint32 cluster
,
24 bool discardBlockCache
);
26 /* remember to set end of chain field when merging into a vnode */
27 status_t
allocate_n_fat_entries(nspace
*vol
, int32 n
, int32
*start
);
29 /* remember to update vnode iteration after calling this function */
30 status_t
set_fat_chain_length(nspace
*vol
, vnode
*node
, uint32 clusters
,
31 bool discardBlockCache
);
33 void dump_fat_chain(nspace
*vol
, uint32 cluster
);
35 status_t
fragment(nspace
*vol
, uint32
*pattern
);