diff options
author | mckusick <mckusick@FreeBSD.org> | 2002-06-21 06:18:05 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2002-06-21 06:18:05 +0000 |
commit | 88d85c15ef183c06524d6ca695f62c0c0672b00c (patch) | |
tree | f1364dbfb9835934a3879b5904f7ff9a1495744c /sbin/dump/dump.h | |
parent | eacb69b0197a8553d5004aa99532cabad8778e36 (diff) | |
download | FreeBSD-src-88d85c15ef183c06524d6ca695f62c0c0672b00c.zip FreeBSD-src-88d85c15ef183c06524d6ca695f62c0c0672b00c.tar.gz |
This commit adds basic support for the UFS2 filesystem. The UFS2
filesystem expands the inode to 256 bytes to make space for 64-bit
block pointers. It also adds a file-creation time field, an ability
to use jumbo blocks per inode to allow extent like pointer density,
and space for extended attributes (up to twice the filesystem block
size worth of attributes, e.g., on a 16K filesystem, there is space
for 32K of attributes). UFS2 fully supports and runs existing UFS1
filesystems. New filesystems built using newfs can be built in either
UFS1 or UFS2 format using the -O option. In this commit UFS1 is
the default format, so if you want to build UFS2 format filesystems,
you must specify -O 2. This default will be changed to UFS2 when
UFS2 proves itself to be stable. In this commit the boot code for
reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c)
as there is insufficient space in the boot block. Once the size of the
boot block is increased, this code can be defined.
Things to note: the definition of SBSIZE has changed to SBLOCKSIZE.
The header file <ufs/ufs/dinode.h> must be included before
<ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and
ufs_lbn_t.
Still TODO:
Verify that the first level bootstraps work for all the architectures.
Convert the utility ffsinfo to understand UFS2 and test growfs.
Add support for the extended attribute storage. Update soft updates
to ensure integrity of extended attribute storage. Switch the
current extended attribute interfaces to use the extended attribute
storage. Add the extent like functionality (framework is there,
but is currently never used).
Sponsored by: DARPA & NAI Labs.
Reviewed by: Poul-Henning Kamp <phk@freebsd.org>
Diffstat (limited to 'sbin/dump/dump.h')
-rw-r--r-- | sbin/dump/dump.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sbin/dump/dump.h b/sbin/dump/dump.h index 4b42755..cd84596 100644 --- a/sbin/dump/dump.h +++ b/sbin/dump/dump.h @@ -35,9 +35,6 @@ * $FreeBSD$ */ -#define MAXINOPB (MAXBSIZE / sizeof(struct dinode)) -#define MAXNINDIR (MAXBSIZE / sizeof(ufs_daddr_t)) - /* * Dump maps used to describe what is to be dumped. */ @@ -102,22 +99,23 @@ void timeest(void); time_t unctime(char *str); /* mapping rouintes */ -struct dinode; -long blockest(struct dinode *dp); +union dinode; +long blockest(union dinode *dp); int mapfiles(ino_t maxino, long *tapesize); int mapdirs(ino_t maxino, long *tapesize); /* file dumping routines */ -void blksout(ufs_daddr_t *blkp, int frags, ino_t ino); -void bread(ufs_daddr_t blkno, char *buf, int size); -void dumpino(struct dinode *dp, ino_t ino); +void ufs1_blksout(ufs1_daddr_t *blkp, int frags, ino_t ino); +void ufs2_blksout(ufs2_daddr_t *blkp, int frags, ino_t ino); +void bread(ufs2_daddr_t blkno, char *buf, int size); +void dumpino(union dinode *dp, ino_t ino); void dumpmap(char *map, int type, ino_t ino); void writeheader(ino_t ino); /* tape writing routines */ int alloctape(void); void close_rewind(void); -void dumpblock(ufs_daddr_t blkno, int size); +void dumpblock(ufs2_daddr_t blkno, int size); void startnewtape(int top); void trewind(void); void writerec(char *dp, int isspcl); @@ -127,7 +125,7 @@ void dumpabort(int signo); void getfstab(void); char *rawname(char *cp); -struct dinode *getino(ino_t inum); +union dinode *getino(ino_t inum, int *mode); /* rdump routines */ #ifdef RDUMP |