patch-2.4.4 linux/include/linux/affs_fs_sb.h
Next file: linux/include/linux/amigaffs.h
Previous file: linux/include/linux/affs_fs_i.h
Back to the patch index
Back to the overall index
- Lines: 74
- Date:
Thu Apr 19 22:57:06 2001
- Orig file:
v2.4.3/linux/include/linux/affs_fs_sb.h
- Orig date:
Mon Feb 23 22:01:26 1998
diff -u --recursive --new-file v2.4.3/linux/include/linux/affs_fs_sb.h linux/include/linux/affs_fs_sb.h
@@ -8,51 +8,29 @@
*
*/
-#define MAX_ZONES 8
-#define AFFS_DATA_MIN_FREE 512 /* Number of free blocks in zone for data blocks */
-#define AFFS_HDR_MIN_FREE 128 /* Same for header blocks */
-#define AFFS_ZONE_SIZE 1024 /* Blocks per alloc zone, must be multiple of 32 */
-
struct affs_bm_info {
- struct buffer_head *bm_bh; /* Buffer head if loaded (bm_count > 0) */
- s32 bm_firstblk; /* Block number of first bit in this map */
- s32 bm_key; /* Disk block number */
- int bm_count; /* Usage counter */
-};
-
-struct affs_alloc_zone {
- short az_size; /* Size of this allocation zone in double words */
- short az_count; /* Number of users */
- int az_free; /* Free blocks in here (no. of bits) */
-};
-
-struct affs_zone {
- unsigned long z_ino; /* Associated inode number */
- struct affs_bm_info *z_bm; /* Zone lies in this bitmap */
- int z_start; /* Index of first word in bitmap */
- int z_end; /* Index of last word in zone + 1 */
- int z_az_no; /* Zone number */
- unsigned long z_lru_time; /* Time of last usage */
+ u32 bm_key; /* Disk block number */
+ u32 bm_free; /* Free blocks in here */
};
struct affs_sb_info {
int s_partition_size; /* Partition size in blocks. */
- int s_blksize; /* Initial device blksize */
- s32 s_root_block; /* FFS root block number. */
+ int s_reserved; /* Number of reserved blocks. */
+ //u32 s_blksize; /* Initial device blksize */
+ u32 s_data_blksize; /* size of the data block w/o header */
+ u32 s_root_block; /* FFS root block number. */
int s_hashsize; /* Size of hash table. */
unsigned long s_flags; /* See below. */
- s16 s_uid; /* uid to override */
- s16 s_gid; /* gid to override */
+ uid_t s_uid; /* uid to override */
+ gid_t s_gid; /* gid to override */
umode_t s_mode; /* mode to override */
- int s_reserved; /* Number of reserved blocks. */
struct buffer_head *s_root_bh; /* Cached root block. */
+ struct semaphore s_bmlock; /* Protects bitmap access. */
struct affs_bm_info *s_bitmap; /* Bitmap infos. */
- int s_bm_count; /* Number of bitmap blocks. */
- int s_nextzone; /* Next zone to look for free blocks. */
- int s_num_az; /* Total number of alloc zones. */
- struct affs_zone *s_zones; /* The zones themselves. */
- struct affs_alloc_zone *s_alloc;/* The allocation zones. */
- char *s_zonemap; /* Bitmap for allocation zones. */
+ u32 s_bmap_count; /* # of bitmap blocks. */
+ u32 s_bmap_bits; /* # of bits in one bitmap blocks */
+ u32 s_last_bmap;
+ struct buffer_head *s_bmap_bh;
char *s_prefix; /* Prefix for volumes and assigns. */
int s_prefix_len; /* Length of prefix. */
char s_volume[32]; /* Volume prefix for absolute symlinks. */
@@ -70,5 +48,8 @@
#define SF_PREFIX 0x0400 /* Buffer for prefix is allocated */
#define SF_VERBOSE 0x0800 /* Talk about fs when mounting */
#define SF_READONLY 0x1000 /* Don't allow to remount rw */
+
+/* short cut to get to the affs specific sb data */
+#define AFFS_SB (&sb->u.affs_sb)
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)