File disk.h

disk.h ------
FCFS Disk abstraction.
$Id: disk.h,v 1.7 2003/10/20 07:18:11 stewart Exp $
(C)2003 Stewart Smith Distributed under the GNU Public License

Included in: disk_testkit.c
  fcfs_newobj.c
  fcfs_readobj.c
  fcfs_updateobj.c
  mkfs.c
  mount_testkit.c
  onode.c
  onode_index.c
  space_bitmap.c
  super_block.c
  volinfo.c


Included Files


Preprocessor definitions

#define __GXX_ABI_VERSION 102

#define __SIZE_TYPE__

#define __PTRDIFF_TYPE__ int

#define __WCHAR_TYPE__

#define __WINT_TYPE__

#define __SCHAR_MAX__ 127

#define __SHRT_MAX__ 32767

#define __INT_MAX__ 2147483647

#define __LONG_MAX__ 2147483647L

#define __LONG_LONG_MAX__ 9223372036854775807LL

#define __WCHAR_MAX__ 2147483647

#define __CHAR_BIT__ 8

#define __FLT_EVAL_METHOD__ 0

#define __FLT_RADIX__ 2

#define __FLT_MANT_DIG__ 24

#define __FLT_DIG__ 6

#define __FLT_MIN_EXP__ -125

#define __FLT_MIN_10_EXP__ -37

#define __FLT_MAX_EXP__ 128

#define __FLT_MAX_10_EXP__ 38

#define __FLT_MAX__ 3.40282347e+38F

#define __FLT_MIN__ 1.17549435e-38F

#define __FLT_EPSILON__ 1.19209290e-7F

#define __FLT_DENORM_MIN__ 1.40129846e-45F

#define __DBL_MANT_DIG__ 53

#define __DBL_DIG__ 15

#define __DBL_MIN_EXP__ -1021

#define __DBL_MIN_10_EXP__ -307

#define __DBL_MAX_EXP__ 1024

#define __DBL_MAX_10_EXP__ 308

#define __DBL_MAX__ 1.7976931348623157e+308

#define __DBL_MIN__ 2.2250738585072014e-308

#define __DBL_EPSILON__ 2.2204460492503131e-16

#define __DBL_DENORM_MIN__ 4.9406564584124654e-324

#define __LDBL_MANT_DIG__ 53

#define __LDBL_DIG__ 15

#define __LDBL_MIN_EXP__ -1021

#define __LDBL_MIN_10_EXP__ -307

#define __LDBL_MAX_EXP__ 1024

#define __LDBL_MAX_10_EXP__ 308

#define __DECIMAL_DIG__ 17

#define __LDBL_MAX__ 1.7976931348623157e+308L

#define __LDBL_MIN__ 2.2250738585072014e-308L

#define __LDBL_EPSILON__ 2.2204460492503131e-16L

#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L

#define __REGISTER_PREFIX__

#define __USER_LABEL_PREFIX__

#define __VERSION__ "3.3.2 (Debian)"

#define __STDC_HOSTED__ 1

#define __NO_INLINE__ 1

#define __FINITE_MATH_ONLY__ 0

#define __CHAR_UNSIGNED__ 1

#define _ARCH_PPC 1

#define __BIG_ENDIAN__ 1

#define _BIG_ENDIAN 1

#define _CALL_SYSV 1

#define __PPC 1

#define __PPC__ 1

#define PPC 1

#define __ELF__ 1

#define __powerpc 1

#define __powerpc__ 1

#define powerpc 1

#define __GNUC__ 3

#define __GNUC_MINOR__ 3

#define __GNUC_PATCHLEVEL__ 2

#define __unix__ 1

#define __gnu_linux__ 1

#define __linux__ 1

#define unix 1

#define __unix 1

#define linux 1

#define __linux 1

#define __DISK_H__

#define BR_SECTOR_T( disk, br )


Type struct fcfs_disk

struct fcfs_disk
struct fcfs_disk 
   { 
     sector_t blocksnr;number of blocks
     u32 bsize;Size of blocks
     struct fcfs_disk_block* sb_block; 
     struct fcfs_sb* sb;The Disk SuperBlock
     void* os_private;Used by OS for it's structure
   } 

Type struct fcfs_disk_block

struct fcfs_disk_block
struct fcfs_disk_block 
   { 
     sector_t blocknr;Number of block
     u32 bsize;Size of block
     char* data;Block data
     struct fcfs_disk* disk;The disk the block is from
     void* os_private;The OS data structure
   } 

Local Function disk_freeblock()

When finished using a disk block

static inline struct fcfs_disk_block* disk_freeblock ( struct fcfs_disk_block* block )
Called by: ag_block_free()space_bitmap.c
  fcfs_mount()mount_testkit.c
  fcfs_umount()mount_testkit.c
  fcfs_write_sb()super_block.c
  main()mkfs.c
  onode1_fork_grow()onode.c
  onode1_fork_new()onode.c
  onode1_fork_read()onode.c
  onode1_fork_write()onode.c
  onode_index_delete()onode_index.c
  onode_index_free_node()onode_index.c
  onode_index_insert()onode_index.c
  onode_index_lookup()onode_index.c
  onode_index_write_leaf()onode_index.c
  onode_index_write_node()onode_index.c
  print_onode_index()volinfo.c
  print_onode_index_leaf()volinfo.c
  print_sb()volinfo.c
  space_bitmap_allocate_block()space_bitmap.c
  write_block_bitmaps()mkfs.c
  write_superblocks()mkfs.c


Local Function disk_writeblock()

Write a disk block immediately.

static inline struct fcfs_disk_block* disk_writeblock ( struct fcfs_disk_block* block )
Calls: set_buffer_dirty(), submit_bh()
Called by: fcfs_write_sb()super_block.c
  onode1_fork_grow()onode.c
  onode1_fork_new()onode.c
  onode1_fork_write()onode.c
  onode_index_insert()onode_index.c
  onode_index_write_leaf()onode_index.c
  onode_index_write_node()onode_index.c
  space_bitmap_allocate_block()space_bitmap.c
  write_block_bitmaps()mkfs.c
  write_superblocks()mkfs.c