ReactOS  0.4.13-dev-73-gcfe54aa
fs.h File Reference
#include "type.h"
Include dependency graph for fs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  csum
 
struct  csum_total
 
struct  fs
 
struct  cg
 
struct  ocg
 

Macros

#define BBSIZE   8192
 
#define BBOFF   ((off_t)(0))
 
#define BBLOCK   ((daddr_t)(0))
 
#define SBLOCK_FLOPPY   0
 
#define SBLOCK_UFS1   8192
 
#define SBLOCK_UFS2   65536
 
#define SBLOCK_PIGGY   262144
 
#define SBLOCKSIZE   8192
 
#define SBLOCKSEARCH   { SBLOCK_UFS2, SBLOCK_UFS1, SBLOCK_FLOPPY, SBLOCK_PIGGY, -1 }
 
#define MAXFRAG   8
 
#define MINBSIZE   4096
 
#define MAXMNTLEN   468
 
#define MAXVOLLEN   32
 
#define NOCSPTRS   ((128 / sizeof(void *)) - 4)
 
#define FS_MAXCONTIG   16
 
#define FSMAXSNAP   20
 
#define MINFREE   5
 
#define DEFAULTOPT   FS_OPTTIME
 
#define AVFILESIZ   16384 /* expected average file size */
 
#define AFPDIR   64 /* expected number of files per directory */
 
#define fs_old_postbloff   fs_spare5[0]
 
#define fs_old_rotbloff   fs_spare5[1]
 
#define fs_old_postbl_start   fs_maxbsize
 
#define fs_old_headswitch   fs_id[0]
 
#define fs_old_trkseek   fs_id[1]
 
#define fs_old_csmask   fs_spare1[0]
 
#define fs_old_csshift   fs_spare1[1]
 
#define FS_42POSTBLFMT   -1 /* 4.2BSD rotational table format */
 
#define FS_DYNAMICPOSTBLFMT   1 /* dynamic rotational table format */
 
#define old_fs_postbl(fs_, cylno, opostblsave)
 
#define old_fs_rotbl(fs)
 
#define FS_UFS1_MAGIC   0x011954 /* UFS1 fast file system magic number */
 
#define FS_UFS2_MAGIC   0x19540119 /* UFS2 fast file system magic number */
 
#define FS_UFS1_MAGIC_SWAPPED   0x54190100
 
#define FS_UFS2_MAGIC_SWAPPED   0x19015419
 
#define FS_OKAY   0x7c269d38 /* superblock checksum */
 
#define FS_42INODEFMT   -1 /* 4.2BSD inode format */
 
#define FS_44INODEFMT   2 /* 4.4BSD inode format */
 
#define FS_ISCLEAN   0x01
 
#define FS_WASCLEAN   0x02
 
#define FS_OPTTIME   0 /* minimize allocation time */
 
#define FS_OPTSPACE   1 /* minimize disk fragmentation */
 
#define FS_UNCLEAN   0x01 /* file system not clean at mount (unused) */
 
#define FS_DOSOFTDEP   0x02 /* file system using soft dependencies */
 
#define FS_NEEDSFSCK   0x04 /* needs sync fsck (FreeBSD compat, unused) */
 
#define FS_INDEXDIRS   0x08 /* kernel supports indexed directories */
 
#define FS_ACLS   0x10 /* file system has ACLs enabled */
 
#define FS_MULTILABEL   0x20 /* file system is MAC multi-label */
 
#define FS_FLAGS_UPDATED   0x80 /* flags have been moved to new location */
 
#define FS_SWAPPED   0x80000000 /* file system is endian swapped */
 
#define FS_INTERNAL   0x80000000 /* mask for internal flags */
 
#define CGSIZE_IF(fs, ipg, fpg)
 
#define CGSIZE(fs)   CGSIZE_IF((fs), (fs)->fs_ipg, (fs)->fs_fpg)
 
#define MINCYLGRPS   4
 
#define fs_cs(fs, indx)   fs_csp[indx]
 
#define CG_MAGIC   0x090255
 
#define old_cg_blktot_old(cgp, ns)   (((struct ocg *)(cgp))->cg_btot)
 
#define old_cg_blks_old(fs, cgp, cylno, ns)   (((struct ocg *)(cgp))->cg_b[cylno])
 
#define old_cg_blktot_new(cgp, ns)
 
#define old_cg_blks_new(fs, cgp, cylno, ns)
 
#define old_cg_blktot(cgp, ns)
 
#define old_cg_blks(fs, cgp, cylno, ns)
 
#define cg_inosused_new(cgp, ns)
 
#define cg_blksfree_new(cgp, ns)
 
#define cg_chkmagic_new(cgp, ns)   (ufs_rw32((cgp)->cg_magic, (ns)) == CG_MAGIC)
 
#define cg_inosused_old(cgp, ns)   (((struct ocg *)(cgp))->cg_iused)
 
#define cg_blksfree_old(cgp, ns)   (((struct ocg *)(cgp))->cg_free)
 
#define cg_chkmagic_old(cgp, ns)   (ufs_rw32(((struct ocg *)(cgp))->cg_magic, (ns)) == CG_MAGIC)
 
#define cg_inosused(cgp, ns)
 
#define cg_blksfree(cgp, ns)
 
#define cg_chkmagic(cgp, ns)   (cg_chkmagic_new(cgp, ns) || cg_chkmagic_old(cgp, ns))
 
#define cg_clustersfree(cgp, ns)
 
#define cg_clustersum(cgp, ns)
 
#define fsbtodb(fs, b)   ((b) << (fs)->fs_fsbtodb)
 
#define dbtofsb(fs, b)   ((b) >> (fs)->fs_fsbtodb)
 
#define cgbase(fs, c)   (((daddr_t)(fs)->fs_fpg) * (c))
 
#define cgstart_ufs1(fs, c)   (cgbase(fs, c) + (fs)->fs_old_cgoffset * ((c) & ~((fs)->fs_old_cgmask)))
 
#define cgstart_ufs2(fs, c)   cgbase((fs), (c))
 
#define cgstart(fs, c)
 
#define cgdmin(fs, c)   (cgstart(fs, c) + (fs)->fs_dblkno) /* 1st data */
 
#define cgimin(fs, c)   (cgstart(fs, c) + (fs)->fs_iblkno) /* inode blk */
 
#define cgsblock(fs, c)   (cgstart(fs, c) + (fs)->fs_sblkno) /* super blk */
 
#define cgtod(fs, c)   (cgstart(fs, c) + (fs)->fs_cblkno) /* cg block */
 
#define ino_to_cg(fs, x)   ((x) / (fs)->fs_ipg)
 
#define ino_to_fsba(fs, x)
 
#define ino_to_fsbo(fs, x)   ((x) % INOPB(fs))
 
#define dtog(fs, d)   ((d) / (fs)->fs_fpg)
 
#define dtogd(fs, d)   ((d) % (fs)->fs_fpg)
 
#define blkmap(fs, map, loc)   (((map)[(loc) / NBBY] >> ((loc) % NBBY)) & (0xff >> (NBBY - (fs)->fs_frag)))
 
#define old_cbtocylno(fs, bno)   (fsbtodb(fs, bno) / (fs)->fs_old_spc)
 
#define old_cbtorpos(fs, bno)
 
#define blkoff(fs, loc)
 
#define fragoff(fs, loc)
 
#define lfragtosize(fs, frag)
 
#define lblktosize(fs, blk)
 
#define lblkno(fs, loc)
 
#define numfrags(fs, loc)
 
#define blkroundup(fs, size)
 
#define fragroundup(fs, size)
 
#define fragstoblks(fs, frags)
 
#define blkstofrags(fs, blks)
 
#define fragnum(fs, fsb)
 
#define blknum(fs, fsb)
 
#define freespace(fs, percentreserved)
 
#define blksize(fs, ip, lbn)
 
#define sblksize(fs, size, lbn)
 
#define INOPB(fs)   ((fs)->fs_inopb)
 
#define INOPF(fs)   ((fs)->fs_inopb >> (fs)->fs_fragshift)
 
#define NINDIR(fs)   ((fs)->fs_nindir)
 
#define APPLEUFS_LABEL_MAGIC   0x4c41424c /* LABL */
 
#define APPLEUFS_LABEL_SIZE   1024
 
#define APPLEUFS_LABEL_OFFSET   (BBSIZE - APPLEUFS_LABEL_SIZE) /* located at 7k */
 
#define APPLEUFS_LABEL_VERSION   1
 
#define APPLEUFS_MAX_LABEL_NAME   512
 

Macro Definition Documentation

◆ AFPDIR

#define AFPDIR   64 /* expected number of files per directory */

Definition at line 208 of file fs.h.

◆ APPLEUFS_LABEL_MAGIC

#define APPLEUFS_LABEL_MAGIC   0x4c41424c /* LABL */

Definition at line 674 of file fs.h.

◆ APPLEUFS_LABEL_OFFSET

#define APPLEUFS_LABEL_OFFSET   (BBSIZE - APPLEUFS_LABEL_SIZE) /* located at 7k */

Definition at line 676 of file fs.h.

◆ APPLEUFS_LABEL_SIZE

#define APPLEUFS_LABEL_SIZE   1024

Definition at line 675 of file fs.h.

◆ APPLEUFS_LABEL_VERSION

#define APPLEUFS_LABEL_VERSION   1

Definition at line 677 of file fs.h.

◆ APPLEUFS_MAX_LABEL_NAME

#define APPLEUFS_MAX_LABEL_NAME   512

Definition at line 678 of file fs.h.

◆ AVFILESIZ

#define AVFILESIZ   16384 /* expected average file size */

Definition at line 207 of file fs.h.

◆ BBLOCK

#define BBLOCK   ((daddr_t)(0))

Definition at line 89 of file fs.h.

◆ BBOFF

#define BBOFF   ((off_t)(0))

Definition at line 88 of file fs.h.

◆ BBSIZE

#define BBSIZE   8192

Definition at line 87 of file fs.h.

◆ blkmap

#define blkmap (   fs,
  map,
  loc 
)    (((map)[(loc) / NBBY] >> ((loc) % NBBY)) & (0xff >> (NBBY - (fs)->fs_frag)))

Definition at line 596 of file fs.h.

◆ blknum

#define blknum (   fs,
  fsb 
)
Value:
/* calculates rounddown(fsb, fs->fs_frag) */ \
((fsb) &~ ((fs)->fs_frag - 1))
Definition: fs.h:235

Definition at line 633 of file fs.h.

◆ blkoff

#define blkoff (   fs,
  loc 
)
Value:
/* calculates (loc % fs->fs_bsize) */ \
((loc) & (fs)->fs_qbmask)
Definition: fs.h:235

Definition at line 611 of file fs.h.

◆ blkroundup

#define blkroundup (   fs,
  size 
)
Value:
/* calculates roundup(size, fs->fs_bsize) */ \
(((size) + (fs)->fs_qbmask) & (fs)->fs_bmask)
Definition: fs.h:235
GLsizeiptr size
Definition: glext.h:5919

Definition at line 623 of file fs.h.

◆ blksize

#define blksize (   fs,
  ip,
  lbn 
)
Value:
(((lbn) >= NDADDR || (ip)->i_size >= lblktosize(fs, (lbn) + 1)) \
? (fs)->fs_bsize \
: (fragroundup(fs, blkoff(fs, (ip)->i_size))))
#define NDADDR
Definition: dinode.h:77
#define blkoff(fs, loc)
Definition: fs.h:611
Definition: fs.h:235
#define lblktosize(fs, blk)
Definition: fs.h:617
Definition: dhcpd.h:61
#define fragroundup(fs, size)
Definition: fs.h:625

Definition at line 648 of file fs.h.

◆ blkstofrags

#define blkstofrags (   fs,
  blks 
)
Value:
/* calculates (blks * fs->fs_frag) */ \
((blks) << (fs)->fs_fragshift)
Definition: fs.h:235

Definition at line 629 of file fs.h.

◆ cg_blksfree

#define cg_blksfree (   cgp,
  ns 
)
Value:
((ufs_rw32((cgp)->cg_magic, (ns)) != CG_MAGIC) ? \
#define cg_blksfree_old(cgp, ns)
Definition: fs.h:529
#define CG_MAGIC
Definition: fs.h:439
Definition: mxnamespace.c:44
#define cg_blksfree_new(cgp, ns)
Definition: fs.h:521

Definition at line 537 of file fs.h.

◆ cg_blksfree_new

#define cg_blksfree_new (   cgp,
  ns 
)
Value:
((u_int8_t *)((u_int8_t *)(cgp) + \
ufs_rw32((cgp)->cg_freeoff, (ns))))
unsigned char u_int8_t
Definition: rosdhcp.h:33
Definition: mxnamespace.c:44

Definition at line 521 of file fs.h.

◆ cg_blksfree_old

#define cg_blksfree_old (   cgp,
  ns 
)    (((struct ocg *)(cgp))->cg_free)

Definition at line 529 of file fs.h.

◆ cg_chkmagic

#define cg_chkmagic (   cgp,
  ns 
)    (cg_chkmagic_new(cgp, ns) || cg_chkmagic_old(cgp, ns))

Definition at line 540 of file fs.h.

◆ cg_chkmagic_new

#define cg_chkmagic_new (   cgp,
  ns 
)    (ufs_rw32((cgp)->cg_magic, (ns)) == CG_MAGIC)

Definition at line 524 of file fs.h.

◆ cg_chkmagic_old

#define cg_chkmagic_old (   cgp,
  ns 
)    (ufs_rw32(((struct ocg *)(cgp))->cg_magic, (ns)) == CG_MAGIC)

Definition at line 531 of file fs.h.

◆ cg_clustersfree

#define cg_clustersfree (   cgp,
  ns 
)
Value:
((u_int8_t *)((u_int8_t *)(cgp) + \
ufs_rw32((cgp)->cg_clusteroff, (ns))))
unsigned char u_int8_t
Definition: rosdhcp.h:33
Definition: mxnamespace.c:44

Definition at line 543 of file fs.h.

◆ cg_clustersum

#define cg_clustersum (   cgp,
  ns 
)
Value:
((int32_t *)((u_int8_t *)(cgp) + \
ufs_rw32((cgp)->cg_clustersumoff, (ns))))
unsigned char u_int8_t
Definition: rosdhcp.h:33
Definition: mxnamespace.c:44
INT32 int32_t
Definition: types.h:71

Definition at line 546 of file fs.h.

◆ cg_inosused

#define cg_inosused (   cgp,
  ns 
)
Value:
((ufs_rw32((cgp)->cg_magic, (ns)) != CG_MAGIC) ? \
#define cg_inosused_old(cgp, ns)
Definition: fs.h:527
#define CG_MAGIC
Definition: fs.h:439
#define cg_inosused_new(cgp, ns)
Definition: fs.h:518
Definition: mxnamespace.c:44

Definition at line 534 of file fs.h.

◆ cg_inosused_new

#define cg_inosused_new (   cgp,
  ns 
)
Value:
((u_int8_t *)((u_int8_t *)(cgp) + \
ufs_rw32((cgp)->cg_iusedoff, (ns))))
unsigned char u_int8_t
Definition: rosdhcp.h:33
Definition: mxnamespace.c:44

Definition at line 518 of file fs.h.

◆ cg_inosused_old

#define cg_inosused_old (   cgp,
  ns 
)    (((struct ocg *)(cgp))->cg_iused)

Definition at line 527 of file fs.h.

◆ CG_MAGIC

#define CG_MAGIC   0x090255

Definition at line 439 of file fs.h.

◆ cgbase

#define cgbase (   fs,
  c 
)    (((daddr_t)(fs)->fs_fpg) * (c))

Definition at line 562 of file fs.h.

◆ cgdmin

#define cgdmin (   fs,
  c 
)    (cgstart(fs, c) + (fs)->fs_dblkno) /* 1st data */

Definition at line 568 of file fs.h.

◆ cgimin

#define cgimin (   fs,
  c 
)    (cgstart(fs, c) + (fs)->fs_iblkno) /* inode blk */

Definition at line 569 of file fs.h.

◆ cgsblock

#define cgsblock (   fs,
  c 
)    (cgstart(fs, c) + (fs)->fs_sblkno) /* super blk */

Definition at line 570 of file fs.h.

◆ CGSIZE

#define CGSIZE (   fs)    CGSIZE_IF((fs), (fs)->fs_ipg, (fs)->fs_fpg)

Definition at line 423 of file fs.h.

◆ CGSIZE_IF

#define CGSIZE_IF (   fs,
  ipg,
  fpg 
)
Value:
/* base cg */ (sizeof(struct cg) + sizeof(int32_t) + \
/* old btotoff */ (fs)->fs_old_cpg * sizeof(int32_t) + \
/* old boff */ (fs)->fs_old_cpg * sizeof(u_int16_t) + \
/* inode map */ howmany((ipg), NBBY) + \
/* block map */ howmany((fpg), NBBY) +\
/* if present */ ((fs)->fs_contigsumsize <= 0 ? 0 : \
/* cluster sum */ (fs)->fs_contigsumsize * sizeof(int32_t) + \
/* cluster map */ howmany(fragstoblks(fs, (fpg)), NBBY)))
#define NBBY
Definition: param.h:46
#define int32_t
Definition: nsiface.idl:56
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
#define howmany(x, y)
Definition: multi.c:45
#define u_int16_t
Definition: icmp.c:52
Definition: fs.h:440
Definition: fs.h:235
INT32 int32_t
Definition: types.h:71
#define fragstoblks(fs, frags)
Definition: fs.h:627
#define fs
Definition: i386-dis.c:435

Definition at line 413 of file fs.h.

◆ cgstart

#define cgstart (   fs,
  c 
)
Value:
((fs)->fs_magic == FS_UFS2_MAGIC \
? cgstart_ufs2((fs), (c)) : cgstart_ufs1((fs), (c)))
Definition: fs.h:235
#define cgstart_ufs2(fs, c)
Definition: fs.h:565
const GLubyte * c
Definition: glext.h:8905
#define cgstart_ufs1(fs, c)
Definition: fs.h:563
#define FS_UFS2_MAGIC
Definition: fs.h:370
#define fs
Definition: i386-dis.c:435
#define c
Definition: ke_i.h:80

Definition at line 566 of file fs.h.

◆ cgstart_ufs1

#define cgstart_ufs1 (   fs,
  c 
)    (cgbase(fs, c) + (fs)->fs_old_cgoffset * ((c) & ~((fs)->fs_old_cgmask)))

Definition at line 563 of file fs.h.

◆ cgstart_ufs2

#define cgstart_ufs2 (   fs,
  c 
)    cgbase((fs), (c))

Definition at line 565 of file fs.h.

◆ cgtod

#define cgtod (   fs,
  c 
)    (cgstart(fs, c) + (fs)->fs_cblkno) /* cg block */

Definition at line 571 of file fs.h.

◆ dbtofsb

#define dbtofsb (   fs,
  b 
)    ((b) >> (fs)->fs_fsbtodb)

Definition at line 556 of file fs.h.

◆ DEFAULTOPT

#define DEFAULTOPT   FS_OPTTIME

Definition at line 196 of file fs.h.

◆ dtog

#define dtog (   fs,
  d 
)    ((d) / (fs)->fs_fpg)

Definition at line 589 of file fs.h.

◆ dtogd

#define dtogd (   fs,
  d 
)    ((d) % (fs)->fs_fpg)

Definition at line 590 of file fs.h.

◆ fragnum

#define fragnum (   fs,
  fsb 
)
Value:
/* calculates (fsb % fs->fs_frag) */ \
((fsb) & ((fs)->fs_frag - 1))
Definition: fs.h:235

Definition at line 631 of file fs.h.

◆ fragoff

#define fragoff (   fs,
  loc 
)
Value:
/* calculates (loc % fs->fs_fsize) */ \
((loc) & (fs)->fs_qfmask)
Definition: fs.h:235

Definition at line 613 of file fs.h.

◆ fragroundup

#define fragroundup (   fs,
  size 
)
Value:
/* calculates roundup(size, fs->fs_fsize) */ \
(((size) + (fs)->fs_qfmask) & (fs)->fs_fmask)
Definition: fs.h:235
GLsizeiptr size
Definition: glext.h:5919

Definition at line 625 of file fs.h.

◆ fragstoblks

#define fragstoblks (   fs,
  frags 
)
Value:
/* calculates (frags / fs->fs_frag) */ \
((frags) >> (fs)->fs_fragshift)
Definition: fs.h:235

Definition at line 627 of file fs.h.

◆ freespace

#define freespace (   fs,
  percentreserved 
)
Value:
(blkstofrags((fs), (fs)->fs_cstotal.cs_nbfree) + \
(fs)->fs_cstotal.cs_nffree - \
(((off_t)((fs)->fs_dsize)) * (percentreserved) / 100))
__kernel_off_t off_t
Definition: linux.h:201
Definition: fs.h:235
#define fs
Definition: i386-dis.c:435
#define blkstofrags(fs, blks)
Definition: fs.h:629

Definition at line 640 of file fs.h.

◆ FS_42INODEFMT

#define FS_42INODEFMT   -1 /* 4.2BSD inode format */

Definition at line 374 of file fs.h.

◆ FS_42POSTBLFMT

#define FS_42POSTBLFMT   -1 /* 4.2BSD rotational table format */

Definition at line 352 of file fs.h.

◆ FS_44INODEFMT

#define FS_44INODEFMT   2 /* 4.4BSD inode format */

Definition at line 375 of file fs.h.

◆ FS_ACLS

#define FS_ACLS   0x10 /* file system has ACLs enabled */

Definition at line 396 of file fs.h.

◆ fs_cs

#define fs_cs (   fs,
  indx 
)    fs_csp[indx]

Definition at line 434 of file fs.h.

◆ FS_DOSOFTDEP

#define FS_DOSOFTDEP   0x02 /* file system using soft dependencies */

Definition at line 393 of file fs.h.

◆ FS_DYNAMICPOSTBLFMT

#define FS_DYNAMICPOSTBLFMT   1 /* dynamic rotational table format */

Definition at line 353 of file fs.h.

◆ FS_FLAGS_UPDATED

#define FS_FLAGS_UPDATED   0x80 /* flags have been moved to new location */

Definition at line 398 of file fs.h.

◆ FS_INDEXDIRS

#define FS_INDEXDIRS   0x08 /* kernel supports indexed directories */

Definition at line 395 of file fs.h.

◆ FS_INTERNAL

#define FS_INTERNAL   0x80000000 /* mask for internal flags */

Definition at line 405 of file fs.h.

◆ FS_ISCLEAN

#define FS_ISCLEAN   0x01

Definition at line 380 of file fs.h.

◆ FS_MAXCONTIG

#define FS_MAXCONTIG   16

Definition at line 176 of file fs.h.

◆ FS_MULTILABEL

#define FS_MULTILABEL   0x20 /* file system is MAC multi-label */

Definition at line 397 of file fs.h.

◆ FS_NEEDSFSCK

#define FS_NEEDSFSCK   0x04 /* needs sync fsck (FreeBSD compat, unused) */

Definition at line 394 of file fs.h.

◆ FS_OKAY

#define FS_OKAY   0x7c269d38 /* superblock checksum */

Definition at line 373 of file fs.h.

◆ fs_old_csmask

#define fs_old_csmask   fs_spare1[0]

Definition at line 349 of file fs.h.

◆ fs_old_csshift

#define fs_old_csshift   fs_spare1[1]

Definition at line 350 of file fs.h.

◆ fs_old_headswitch

#define fs_old_headswitch   fs_id[0]

Definition at line 347 of file fs.h.

◆ fs_old_postbl_start

#define fs_old_postbl_start   fs_maxbsize

Definition at line 346 of file fs.h.

◆ fs_old_postbloff

#define fs_old_postbloff   fs_spare5[0]

Definition at line 344 of file fs.h.

◆ fs_old_rotbloff

#define fs_old_rotbloff   fs_spare5[1]

Definition at line 345 of file fs.h.

◆ fs_old_trkseek

#define fs_old_trkseek   fs_id[1]

Definition at line 348 of file fs.h.

◆ FS_OPTSPACE

#define FS_OPTSPACE   1 /* minimize disk fragmentation */

Definition at line 387 of file fs.h.

◆ FS_OPTTIME

#define FS_OPTTIME   0 /* minimize allocation time */

Definition at line 386 of file fs.h.

◆ FS_SWAPPED

#define FS_SWAPPED   0x80000000 /* file system is endian swapped */

Definition at line 404 of file fs.h.

◆ FS_UFS1_MAGIC

#define FS_UFS1_MAGIC   0x011954 /* UFS1 fast file system magic number */

Definition at line 369 of file fs.h.

◆ FS_UFS1_MAGIC_SWAPPED

#define FS_UFS1_MAGIC_SWAPPED   0x54190100

Definition at line 371 of file fs.h.

◆ FS_UFS2_MAGIC

#define FS_UFS2_MAGIC   0x19540119 /* UFS2 fast file system magic number */

Definition at line 370 of file fs.h.

◆ FS_UFS2_MAGIC_SWAPPED

#define FS_UFS2_MAGIC_SWAPPED   0x19015419

Definition at line 372 of file fs.h.

◆ FS_UNCLEAN

#define FS_UNCLEAN   0x01 /* file system not clean at mount (unused) */

Definition at line 392 of file fs.h.

◆ FS_WASCLEAN

#define FS_WASCLEAN   0x02

Definition at line 381 of file fs.h.

◆ fsbtodb

#define fsbtodb (   fs,
  b 
)    ((b) << (fs)->fs_fsbtodb)

Definition at line 555 of file fs.h.

◆ FSMAXSNAP

#define FSMAXSNAP   20

Definition at line 181 of file fs.h.

◆ ino_to_cg

#define ino_to_cg (   fs,
  x 
)    ((x) / (fs)->fs_ipg)

Definition at line 579 of file fs.h.

◆ ino_to_fsba

#define ino_to_fsba (   fs,
  x 
)
Value:
(blkstofrags((fs), (((x) % (fs)->fs_ipg) / INOPB(fs))))))
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
Definition: fs.h:235
#define ino_to_cg(fs, x)
Definition: fs.h:579
__int64 daddr_t
Definition: type.h:22
#define blkstofrags(fs, blks)
Definition: fs.h:629
#define INOPB(fs)
Definition: fs.h:662
#define cgimin(fs, c)
Definition: fs.h:569

Definition at line 580 of file fs.h.

◆ ino_to_fsbo

#define ino_to_fsbo (   fs,
  x 
)    ((x) % INOPB(fs))

Definition at line 583 of file fs.h.

◆ INOPB

#define INOPB (   fs)    ((fs)->fs_inopb)

Definition at line 662 of file fs.h.

◆ INOPF

#define INOPF (   fs)    ((fs)->fs_inopb >> (fs)->fs_fragshift)

Definition at line 663 of file fs.h.

◆ lblkno

#define lblkno (   fs,
  loc 
)
Value:
/* calculates (loc / fs->fs_bsize) */ \
((loc) >> (fs)->fs_bshift)
Definition: fs.h:235

Definition at line 619 of file fs.h.

◆ lblktosize

#define lblktosize (   fs,
  blk 
)
Value:
/* calculates ((off_t)blk * fs->fs_bsize) */ \
(((off_t)(blk)) << (fs)->fs_bshift)
Definition: fs.h:235
#define off_t
Definition: dosfsck.h:5
#define blk
Definition: linetest.c:70

Definition at line 617 of file fs.h.

◆ lfragtosize

#define lfragtosize (   fs,
  frag 
)
Value:
/* calculates ((off_t)frag * fs->fs_fsize) */ \
(((off_t)(frag)) << (fs)->fs_fshift)
Definition: fs.h:235
#define off_t
Definition: dosfsck.h:5

Definition at line 615 of file fs.h.

◆ MAXFRAG

#define MAXFRAG   8

Definition at line 107 of file fs.h.

◆ MAXMNTLEN

#define MAXMNTLEN   468

Definition at line 146 of file fs.h.

◆ MAXVOLLEN

#define MAXVOLLEN   32

Definition at line 153 of file fs.h.

◆ MINBSIZE

#define MINBSIZE   4096

Definition at line 139 of file fs.h.

◆ MINCYLGRPS

#define MINCYLGRPS   4

Definition at line 428 of file fs.h.

◆ MINFREE

#define MINFREE   5

Definition at line 195 of file fs.h.

◆ NINDIR

#define NINDIR (   fs)    ((fs)->fs_nindir)

Definition at line 668 of file fs.h.

◆ NOCSPTRS

#define NOCSPTRS   ((128 / sizeof(void *)) - 4)

Definition at line 168 of file fs.h.

◆ numfrags

#define numfrags (   fs,
  loc 
)
Value:
/* calculates (loc / fs->fs_fsize) */ \
((loc) >> (fs)->fs_fshift)
Definition: fs.h:235

Definition at line 621 of file fs.h.

◆ old_cbtocylno

#define old_cbtocylno (   fs,
  bno 
)    (fsbtodb(fs, bno) / (fs)->fs_old_spc)

Definition at line 598 of file fs.h.

◆ old_cbtorpos

#define old_cbtorpos (   fs,
  bno 
)
Value:
((fs)->fs_old_nrpos <= 1 ? 0 : \
(fsbtodb(fs, bno) % (fs)->fs_old_spc / (fs)->fs_old_nsect * (fs)->fs_old_trackskew + \
fsbtodb(fs, bno) % (fs)->fs_old_spc % (fs)->fs_old_nsect * (fs)->fs_old_interleave) % \
(fs)->fs_old_nsect * (fs)->fs_old_nrpos / (fs)->fs_old_npsect)
Definition: fs.h:235
#define fsbtodb(fs, b)
Definition: fs.h:555
#define fs
Definition: i386-dis.c:435

Definition at line 600 of file fs.h.

◆ old_cg_blks

#define old_cg_blks (   fs,
  cgp,
  cylno,
  ns 
)
Value:
((ufs_rw32((cgp)->cg_magic, (ns)) != CG_MAGIC) ? \
old_cg_blks_old(fs, cgp, cylno, ns) : old_cg_blks_new(fs, cgp, cylno, ns))
#define old_cg_blks_new(fs, cgp, cylno, ns)
Definition: fs.h:507
Definition: fs.h:235
#define old_cg_blks_old(fs, cgp, cylno, ns)
Definition: fs.h:501
#define CG_MAGIC
Definition: fs.h:439
Definition: mxnamespace.c:44
int32_t cg_magic
Definition: fs.h:442

Definition at line 514 of file fs.h.

◆ old_cg_blks_new

#define old_cg_blks_new (   fs,
  cgp,
  cylno,
  ns 
)
Value:
((int16_t *)((u_int8_t *)(cgp) + \
ufs_rw32((cgp)->cg_old_boff, (ns))) + (cylno) * (fs)->fs_old_nrpos)
unsigned char u_int8_t
Definition: rosdhcp.h:33
Definition: mxnamespace.c:44
#define fs
Definition: i386-dis.c:435
INT16 int16_t
Definition: types.h:70

Definition at line 507 of file fs.h.

◆ old_cg_blks_old

#define old_cg_blks_old (   fs,
  cgp,
  cylno,
  ns 
)    (((struct ocg *)(cgp))->cg_b[cylno])

Definition at line 501 of file fs.h.

◆ old_cg_blktot

#define old_cg_blktot (   cgp,
  ns 
)
Value:
((ufs_rw32((cgp)->cg_magic, (ns)) != CG_MAGIC) ? \
#define old_cg_blktot_new(cgp, ns)
Definition: fs.h:504
#define CG_MAGIC
Definition: fs.h:439
Definition: mxnamespace.c:44
int32_t cg_magic
Definition: fs.h:442
#define old_cg_blktot_old(cgp, ns)
Definition: fs.h:499

Definition at line 511 of file fs.h.

◆ old_cg_blktot_new

#define old_cg_blktot_new (   cgp,
  ns 
)
Value:
((int32_t *)((u_int8_t *)(cgp) + \
ufs_rw32((cgp)->cg_old_btotoff, (ns))))
unsigned char u_int8_t
Definition: rosdhcp.h:33
Definition: mxnamespace.c:44
INT32 int32_t
Definition: types.h:71

Definition at line 504 of file fs.h.

◆ old_cg_blktot_old

#define old_cg_blktot_old (   cgp,
  ns 
)    (((struct ocg *)(cgp))->cg_btot)

Definition at line 499 of file fs.h.

◆ old_fs_postbl

#define old_fs_postbl (   fs_,
  cylno,
  opostblsave 
)
Value:
((((fs_)->fs_old_postblformat == FS_42POSTBLFMT) || \
? ((int16_t *)(opostblsave) + (cylno) * (fs_)->fs_old_nrpos) \
: ((int16_t *)((uint8_t *)(fs_) + \
(fs_)->fs_old_postbloff) + (cylno) * (fs_)->fs_old_nrpos))
#define fs_old_postbloff
Definition: fs.h:344
Definition: fs.h:235
#define offsetof(TYPE, MEMBER)
BYTE uint8_t
Definition: msvideo1.c:66
INT16 int16_t
Definition: types.h:70
#define FS_42POSTBLFMT
Definition: fs.h:352
#define fs_old_postbl_start
Definition: fs.h:346

Definition at line 355 of file fs.h.

◆ old_fs_rotbl

#define old_fs_rotbl (   fs)
Value:
(((fs)->fs_old_postblformat == FS_42POSTBLFMT) \
? ((uint8_t *)(&(fs)->fs_magic+1)) \
: ((uint8_t *)((uint8_t *)(fs) + (fs)->fs_old_rotbloff)))
Definition: fs.h:235
BYTE uint8_t
Definition: msvideo1.c:66
#define fs
Definition: i386-dis.c:435
#define FS_42POSTBLFMT
Definition: fs.h:352

Definition at line 361 of file fs.h.

◆ sblksize

#define sblksize (   fs,
  size,
  lbn 
)
Value:
(((lbn) >= NDADDR || (size) >= ((lbn) + 1) << (fs)->fs_bshift) \
? (fs)->fs_bsize \
#define NDADDR
Definition: dinode.h:77
#define blkoff(fs, loc)
Definition: fs.h:611
Definition: fs.h:235
GLsizeiptr size
Definition: glext.h:5919
#define fragroundup(fs, size)
Definition: fs.h:625
#define fs
Definition: i386-dis.c:435

Definition at line 653 of file fs.h.

◆ SBLOCK_FLOPPY

#define SBLOCK_FLOPPY   0

Definition at line 91 of file fs.h.

◆ SBLOCK_PIGGY

#define SBLOCK_PIGGY   262144

Definition at line 94 of file fs.h.

◆ SBLOCK_UFS1

#define SBLOCK_UFS1   8192

Definition at line 92 of file fs.h.

◆ SBLOCK_UFS2

#define SBLOCK_UFS2   65536

Definition at line 93 of file fs.h.

◆ SBLOCKSEARCH

#define SBLOCKSEARCH   { SBLOCK_UFS2, SBLOCK_UFS1, SBLOCK_FLOPPY, SBLOCK_PIGGY, -1 }

Definition at line 101 of file fs.h.

◆ SBLOCKSIZE

#define SBLOCKSIZE   8192

Definition at line 95 of file fs.h.