1 |
1633 |
jcastillo |
#ifndef _AFFS_FS_SB
|
2 |
|
|
#define _AFFS_FS_SB
|
3 |
|
|
|
4 |
|
|
/*
|
5 |
|
|
* super-block data in memory
|
6 |
|
|
*
|
7 |
|
|
* Block numbers are adjusted for their actual size
|
8 |
|
|
*
|
9 |
|
|
*/
|
10 |
|
|
|
11 |
|
|
#define MAX_ZONES 8
|
12 |
|
|
#define AFFS_DATA_MIN_FREE 512 /* Number of free blocks in zone for data blocks */
|
13 |
|
|
#define AFFS_HDR_MIN_FREE 128 /* Same for header blocks */
|
14 |
|
|
#define AFFS_ZONE_SIZE 1024 /* Blocks per alloc zone, must be multiple of 32 */
|
15 |
|
|
|
16 |
|
|
struct affs_bm_info {
|
17 |
|
|
struct buffer_head *bm_bh; /* Buffer head if loaded (bm_count > 0) */
|
18 |
|
|
int bm_firstblk; /* Block number of first bit in this map */
|
19 |
|
|
int bm_key; /* Disk block number */
|
20 |
|
|
int bm_count; /* Usage counter */
|
21 |
|
|
};
|
22 |
|
|
|
23 |
|
|
struct affs_alloc_zone {
|
24 |
|
|
short az_size; /* Size of this allocation zone in double words */
|
25 |
|
|
short az_count; /* Number of users */
|
26 |
|
|
int az_free; /* Free blocks in here (no. of bits) */
|
27 |
|
|
};
|
28 |
|
|
|
29 |
|
|
struct affs_zone {
|
30 |
|
|
unsigned long z_ino; /* Associated inode number */
|
31 |
|
|
struct affs_bm_info *z_bm; /* Zone lies in this bitmap */
|
32 |
|
|
int z_start; /* Index of first word in bitmap */
|
33 |
|
|
int z_end; /* Index of last word in zone + 1 */
|
34 |
|
|
int z_az_no; /* Zone number */
|
35 |
|
|
unsigned long z_lru_time; /* Time of last usage */
|
36 |
|
|
};
|
37 |
|
|
|
38 |
|
|
struct affs_sb_info {
|
39 |
|
|
int s_partition_size; /* Partition size in blocks. */
|
40 |
|
|
int s_root_block; /* FFS root block number. */
|
41 |
|
|
int s_hashsize; /* Size of hash table. */
|
42 |
|
|
unsigned long s_flags; /* See below. */
|
43 |
|
|
short s_uid; /* uid to override */
|
44 |
|
|
short s_gid; /* gid to override */
|
45 |
|
|
umode_t s_mode; /* mode to override */
|
46 |
|
|
int s_reserved; /* Number of reserved blocks. */
|
47 |
|
|
struct buffer_head *s_root_bh; /* Cached root block. */
|
48 |
|
|
struct affs_bm_info *s_bitmap; /* Bitmap infos. */
|
49 |
|
|
int s_bm_count; /* Number of bitmap blocks. */
|
50 |
|
|
int s_nextzone; /* Next zone to look for free blocks. */
|
51 |
|
|
int s_num_az; /* Total number of alloc zones. */
|
52 |
|
|
struct affs_zone *s_zones; /* The zones themselves. */
|
53 |
|
|
struct affs_alloc_zone *s_alloc;/* The allocation zones. */
|
54 |
|
|
char *s_zonemap; /* Bitmap for allocation zones. */
|
55 |
|
|
char *s_prefix; /* Prefix for volumes and assigns. */
|
56 |
|
|
int s_prefix_len; /* Length of prefix. */
|
57 |
|
|
char s_volume[32]; /* Volume prefix for absolute symlinks. */
|
58 |
|
|
};
|
59 |
|
|
|
60 |
|
|
#define SF_INTL 0x0001 /* International filesystem. */
|
61 |
|
|
#define SF_BM_VALID 0x0002 /* Bitmap is valid. */
|
62 |
|
|
#define SF_IMMUTABLE 0x0004 /* Protection bits cannot be changed */
|
63 |
|
|
#define SF_QUIET 0x0008 /* chmod errors will be not reported */
|
64 |
|
|
#define SF_SETUID 0x0010 /* Ignore Amiga uid */
|
65 |
|
|
#define SF_SETGID 0x0020 /* Ignore Amiga gid */
|
66 |
|
|
#define SF_SETMODE 0x0040 /* Ignore Amiga protection bits */
|
67 |
|
|
#define SF_MUFS 0x0100 /* Use MUFS uid/gid mapping */
|
68 |
|
|
#define SF_OFS 0x0200 /* Old filesystem */
|
69 |
|
|
#define SF_PREFIX 0x0400 /* Buffer for prefix is allocated */
|
70 |
|
|
#define SF_VERBOSE 0x0800 /* Talk about fs when mounting */
|
71 |
|
|
|
72 |
|
|
#endif
|