home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #1 / Amiga Plus CD - 2000 - No. 1.iso / Tools / HD / SmartFileSystem / V1.58 / Sources / fs / adminspaces.h next >
Encoding:
C/C++ Source or Header  |  1999-01-18  |  1.5 KB  |  59 lines

  1. #include <exec/types.h>
  2. #include <libraries/iffparse.h>
  3. #include "blockstructure.h"
  4.  
  5. struct fsAdminSpace {
  6.   BLCK  space;
  7.   ULONG bits;      /* Set bits are used blocks, bit 31 is
  8.                       the first block in the AdminSpace. */
  9. };
  10.  
  11.  
  12. #define ADMINSPACECONTAINER_ID     MAKE_ID('A','D','M','C')
  13.  
  14. struct fsAdminSpaceContainer {
  15.   struct fsBlockHeader bheader;
  16.  
  17.   BLCK next;
  18.   BLCK previous;
  19.  
  20.   UBYTE bits;    /* Bits 0-2: %000 = 2^0 = bitmap size 1 byte.
  21.                               %001 = 2^1 = bitmap size 2 bytes.
  22.                               %010 = 2^2 = bitmap size 4 bytes.
  23.                               %011 = 2^3 = bitmap size 8 bytes.
  24.                               %100 = 2^4 = bitmap size 16 bytes.
  25.                               %101 = 2^5 = bitmap size 32 bytes.
  26.                               %110 = 2^6 = bitmap size 64 bytes.
  27.                               %111 = 2^7 = bitmap size 128 bytes. */
  28.   UBYTE pad1;
  29.   UWORD pad2;
  30.  
  31.   struct fsAdminSpace adminspace[0];
  32. };
  33.  
  34.  
  35.  
  36. /*
  37.  
  38.   INT((blocksize-sizeof(struct fsAdminSpaceContainer)) / (2^bits+4)) * 2^bits
  39.  
  40.   Effectiveness     512  1024  2048  4096  8192
  41.   -----------------------------------------------
  42.      4              244   500
  43.      8              320   664
  44.     16              384   800
  45.     32              468   864
  46.     64              476   896  1856  3776  7680
  47.    128              396   896  1920  3840  7808
  48.   -----------------------------------------------
  49. */
  50.  
  51. /* 
  52.   30.000 files -> 3000-6000 OBJC -> 6000-12000 blocks.
  53.  
  54.   1952 blocks/ADMC
  55.  
  56.  
  57.  
  58. */
  59.