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).
This commit is contained in:
parent
e730167f16
commit
5c65ae3a88
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154065
@ -213,6 +213,11 @@ UDF_ICONV opt_dontuse.h
|
||||
# otherwise a STUB module will be compiled in.
|
||||
SOFTUPDATES opt_ffs.h
|
||||
|
||||
# On small, embedded systems, it can be useful to turn off support for
|
||||
# snapshots. It saves about 30-40k for a feature that would be lightly
|
||||
# used, if it is used at all.
|
||||
NO_FFS_SNAPSHOT opt_ffs.h
|
||||
|
||||
# Enabling this option turns on support for Access Control Lists in UFS,
|
||||
# which can be used to support high security configurations. Depends on
|
||||
# UFS_EXTATTR.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user