summaryrefslogtreecommitdiffstats
path: root/sys/ufs/ffs/ffs_extern.h
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2002-06-21 06:18:05 +0000
committermckusick <mckusick@FreeBSD.org>2002-06-21 06:18:05 +0000
commit88d85c15ef183c06524d6ca695f62c0c0672b00c (patch)
treef1364dbfb9835934a3879b5904f7ff9a1495744c /sys/ufs/ffs/ffs_extern.h
parenteacb69b0197a8553d5004aa99532cabad8778e36 (diff)
downloadFreeBSD-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 'sys/ufs/ffs/ffs_extern.h')
-rw-r--r--sys/ufs/ffs/ffs_extern.h38
1 files changed, 21 insertions, 17 deletions
diff --git a/sys/ufs/ffs/ffs_extern.h b/sys/ufs/ffs/ffs_extern.h
index bbb12ab..8274765 100644
--- a/sys/ufs/ffs/ffs_extern.h
+++ b/sys/ufs/ffs/ffs_extern.h
@@ -49,26 +49,30 @@ struct sockaddr;
struct statfs;
struct ucred;
struct vnode;
-struct vop_balloc_args;
struct vop_fsync_args;
struct vop_reallocblks_args;
struct vop_copyonwrite_args;
int ffs_alloc(struct inode *,
- ufs_daddr_t, ufs_daddr_t, int, struct ucred *, ufs_daddr_t *);
-int ffs_balloc(struct vnode *a_vp, off_t a_startoffset, int a_size,
+ ufs2_daddr_t, ufs2_daddr_t, int, struct ucred *, ufs2_daddr_t *);
+int ffs_balloc_ufs1(struct vnode *a_vp, off_t a_startoffset, int a_size,
+ struct ucred *a_cred, int a_flags, struct buf **a_bpp);
+int ffs_balloc_ufs2(struct vnode *a_vp, off_t a_startoffset, int a_size,
struct ucred *a_cred, int a_flags, struct buf **a_bpp);
int ffs_blkatoff(struct vnode *, off_t, char **, struct buf **);
-void ffs_blkfree(struct fs *, struct vnode *, ufs_daddr_t, long, ino_t);
-ufs_daddr_t ffs_blkpref(struct inode *, ufs_daddr_t, int, ufs_daddr_t *);
-void ffs_clrblock(struct fs *, u_char *, ufs_daddr_t);
-void ffs_clusteracct (struct fs *, struct cg *, ufs_daddr_t, int);
+void ffs_blkfree(struct fs *, struct vnode *, ufs2_daddr_t, long, ino_t);
+ufs2_daddr_t ffs_blkpref_ufs1(struct inode *, ufs_lbn_t, int, ufs1_daddr_t *);
+ufs2_daddr_t ffs_blkpref_ufs2(struct inode *, ufs_lbn_t, int, ufs2_daddr_t *);
+void ffs_clrblock(struct fs *, u_char *, ufs1_daddr_t);
+void ffs_clusteracct (struct fs *, struct cg *, ufs1_daddr_t, int);
int ffs_fhtovp(struct mount *, struct fid *, struct vnode **);
int ffs_flushfiles(struct mount *, int, struct thread *);
void ffs_fragacct(struct fs *, int, int32_t [], int);
int ffs_freefile(struct fs *, struct vnode *, ino_t, int );
-int ffs_isblock(struct fs *, u_char *, ufs_daddr_t);
-int ffs_isfreeblock(struct fs *, unsigned char *, ufs_daddr_t);
+int ffs_isblock(struct fs *, u_char *, ufs1_daddr_t);
+int ffs_isfreeblock(struct fs *, unsigned char *, ufs1_daddr_t);
+void ffs_load_inode(struct buf *, struct inode *, struct malloc_type *,
+ struct fs *, ino_t);
int ffs_mountfs(struct vnode *, struct mount *, struct thread *,
struct malloc_type *);
int ffs_mountroot(void);
@@ -76,9 +80,9 @@ int ffs_mount(struct mount *, char *, caddr_t, struct nameidata *,
struct thread *);
int ffs_reallocblks(struct vop_reallocblks_args *);
int ffs_realloccg(struct inode *,
- ufs_daddr_t, ufs_daddr_t, int, int, struct ucred *, struct buf **);
-void ffs_setblock(struct fs *, u_char *, ufs_daddr_t);
-int ffs_snapblkfree(struct fs *, struct vnode *, ufs_daddr_t, long, ino_t);
+ ufs2_daddr_t, ufs2_daddr_t, int, int, struct ucred *, struct buf **);
+void ffs_setblock(struct fs *, u_char *, ufs1_daddr_t);
+int ffs_snapblkfree(struct fs *, struct vnode *, ufs2_daddr_t, long, ino_t);
void ffs_snapremove(struct vnode *vp);
int ffs_snapshot(struct mount *mp, char *snapfile);
void ffs_snapshot_mount(struct mount *mp);
@@ -112,13 +116,13 @@ void softdep_freefile(struct vnode *, ino_t, int);
int softdep_request_cleanup(struct fs *, struct vnode *);
void softdep_setup_freeblocks(struct inode *, off_t);
void softdep_setup_inomapdep(struct buf *, struct inode *, ino_t);
-void softdep_setup_blkmapdep(struct buf *, struct fs *, ufs_daddr_t);
-void softdep_setup_allocdirect(struct inode *, ufs_lbn_t, ufs_daddr_t,
- ufs_daddr_t, long, long, struct buf *);
+void softdep_setup_blkmapdep(struct buf *, struct fs *, ufs2_daddr_t);
+void softdep_setup_allocdirect(struct inode *, ufs_lbn_t, ufs2_daddr_t,
+ ufs2_daddr_t, long, long, struct buf *);
void softdep_setup_allocindir_meta(struct buf *, struct inode *,
- struct buf *, int, ufs_daddr_t);
+ struct buf *, int, ufs2_daddr_t);
void softdep_setup_allocindir_page(struct inode *, ufs_lbn_t,
- struct buf *, int, ufs_daddr_t, ufs_daddr_t, struct buf *);
+ struct buf *, int, ufs2_daddr_t, ufs2_daddr_t, struct buf *);
void softdep_fsync_mountdev(struct vnode *);
int softdep_sync_metadata(struct vop_fsync_args *);
/* XXX incorrectly moved to mount.h - should be indirect function */
OpenPOWER on IntegriCloud