diff options
author | mckusick <mckusick@FreeBSD.org> | 2000-07-11 22:07:57 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2000-07-11 22:07:57 +0000 |
commit | a3d0c189ea25a7af3dfab30112f5d8d65e214e1c (patch) | |
tree | c84458dcf49aaf90ff010ebc108cb3b6ca3c2f4a /sys/ufs/ffs/ffs_extern.h | |
parent | c8c04452402a28eabd1ed8a1a06e0a14ac3d22c6 (diff) | |
download | FreeBSD-src-a3d0c189ea25a7af3dfab30112f5d8d65e214e1c.zip FreeBSD-src-a3d0c189ea25a7af3dfab30112f5d8d65e214e1c.tar.gz |
Add snapshots to the fast filesystem. Most of the changes support
the gating of system calls that cause modifications to the underlying
filesystem. The gating can be enabled by any filesystem that needs
to consistently suspend operations by adding the vop_stdgetwritemount
to their set of vnops. Once gating is enabled, the function
vfs_write_suspend stops all new write operations to a filesystem,
allows any filesystem modifying system calls already in progress
to complete, then sync's the filesystem to disk and returns. The
function vfs_write_resume allows the suspended write operations to
begin again. Gating is not added by default for all filesystems as
for SMP systems it adds two extra locks to such critical kernel
paths as the write system call. Thus, gating should only be added
as needed.
Details on the use and current status of snapshots in FFS can be
found in /sys/ufs/ffs/README.snapshot so for brevity and timelyness
is not included here. Unless and until you create a snapshot file,
these changes should have no effect on your system (famous last words).
Diffstat (limited to 'sys/ufs/ffs/ffs_extern.h')
-rw-r--r-- | sys/ufs/ffs/ffs_extern.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_extern.h b/sys/ufs/ffs/ffs_extern.h index fe7391b..8e011bb 100644 --- a/sys/ufs/ffs/ffs_extern.h +++ b/sys/ufs/ffs/ffs_extern.h @@ -67,6 +67,7 @@ struct vop_balloc_args; struct vop_bmap_args; struct vop_fsync_args; struct vop_reallocblks_args; +struct vop_copyonwrite_args; int ffs_alloc __P((struct inode *, ufs_daddr_t, ufs_daddr_t, int, struct ucred *, ufs_daddr_t *)); @@ -76,6 +77,7 @@ void ffs_blkfree __P((struct inode *, ufs_daddr_t, long)); ufs_daddr_t ffs_blkpref __P((struct inode *, ufs_daddr_t, int, ufs_daddr_t *)); int ffs_bmap __P((struct vop_bmap_args *)); void ffs_clrblock __P((struct fs *, u_char *, ufs_daddr_t)); +int ffs_copyonwrite __P((struct vop_copyonwrite_args *ap)); int ffs_fhtovp __P((struct mount *, struct fid *, struct vnode **)); int ffs_flushfiles __P((struct mount *, int, struct proc *)); void ffs_fragacct __P((struct fs *, int, int32_t [], int)); @@ -89,6 +91,10 @@ int ffs_reallocblks __P((struct vop_reallocblks_args *)); int ffs_realloccg __P((struct inode *, ufs_daddr_t, ufs_daddr_t, int, int, struct ucred *, struct buf **)); void ffs_setblock __P((struct fs *, u_char *, ufs_daddr_t)); +int ffs_snapblkfree __P((struct inode *freeip, ufs_daddr_t bno, long size)); +int ffs_snapshot __P((struct mount *mp, char *snapfile)); +void ffs_snapshot_mount __P((struct mount *mp)); +void ffs_snapshot_unmount __P((struct mount *mp)); int ffs_statfs __P((struct mount *, struct statfs *, struct proc *)); int ffs_sync __P((struct mount *, int, struct ucred *, struct proc *)); int ffs_truncate __P((struct vnode *, off_t, int, struct ucred *, struct proc *)); |