diff options
author | imp <imp@FreeBSD.org> | 2006-01-06 04:44:09 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2006-01-06 04:44:09 +0000 |
commit | 4492beecb898ee22642d0faa3dad545c75b6ea59 (patch) | |
tree | fde5c8dadfbd46767567c81325d7f7f3e6af76b6 /sys/ufs | |
parent | 6d056f7e81646d633af5284304365fe626e950d8 (diff) | |
download | FreeBSD-src-4492beecb898ee22642d0faa3dad545c75b6ea59.zip FreeBSD-src-4492beecb898ee22642d0faa3dad545c75b6ea59.tar.gz |
New option: NO_FFS_SNAPSHOT. I did this in p4 about the same time
that NetBSD implemented it independently of them (don't know which one
was actually first). This saves about 24k for those times you don't
need snapshot support (like when running off a ram disk, or in an
embedded environment where size matters).
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_snapshot.c | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index 98a1f23..c64a1e3 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -66,6 +66,62 @@ __FBSDID("$FreeBSD$"); #define KERNCRED thread0.td_ucred #define DEBUG 1 +#include "opt_ffs.h" + +#ifdef NO_FFS_SNAPSHOT +int +ffs_snapshot(mp, snapfile) + struct mount *mp; + char *snapfile; +{ + return (EINVAL); +} + +int +ffs_snapblkfree(fs, devvp, bno, size, inum) + struct fs *fs; + struct vnode *devvp; + ufs2_daddr_t bno; + long size; + ino_t inum; +{ + return (EINVAL); +} + +void +ffs_snapremove(vp) + struct vnode *vp; +{ +} + +void +ffs_snapshot_mount(mp) + struct mount *mp; +{ +} + +void +ffs_snapshot_unmount(mp) + struct mount *mp; +{ +} + +void +ffs_snapgone(ip) + struct inode *ip; +{ +} + +int +ffs_copyonwrite(devvp, bp) + struct vnode *devvp; + struct buf *bp; +{ + return (EINVAL); +} + +#else + TAILQ_HEAD(snaphead, inode); struct snapdata { @@ -2171,3 +2227,5 @@ readblock(vp, bp, lbn) g_destroy_bio(bip); return (bp->b_error); } + +#endif |