diff options
author | mckusick <mckusick@FreeBSD.org> | 2000-07-04 04:58:34 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2000-07-04 04:58:34 +0000 |
commit | 5e6b00a0a70c6df314384e61f6db7131308e1add (patch) | |
tree | 63aeae2ac4bafff3e2991ec769442667a718abfe /sys/ufs | |
parent | 2f0e9591fa0ef8bf1039608fd618c45ca89f9ec5 (diff) | |
download | FreeBSD-src-5e6b00a0a70c6df314384e61f6db7131308e1add.zip FreeBSD-src-5e6b00a0a70c6df314384e61f6db7131308e1add.tar.gz |
Get userland visible flags added for snapshots to give a few days
advance preparation for them to get migrated into place so that
subsequent changes in utilities will not fail to compile for lack
of up-to-date header files in /usr/include.
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/fs.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/sys/ufs/ffs/fs.h b/sys/ufs/ffs/fs.h index d93f2a7..5d76aee 100644 --- a/sys/ufs/ffs/fs.h +++ b/sys/ufs/ffs/fs.h @@ -139,6 +139,30 @@ #define DEFAULTOPT FS_OPTTIME /* + * The maximum number of snapshot nodes that can be associated + * with each filesystem. This limit affects only the number of + * snapshot files that can be recorded within the superblock so + * that they can be found when the filesystem is mounted. However, + * maintaining too many will slow the filesystem performance, so + * having this limit is a good idea. + */ +#define FSMAXSNAP 20 + +/* + * Used to identify special blocks in snapshots: + * + * BLK_NOCOPY - A block that was unallocated at the time the snapshot + * was taken, hence does not need to be copied when written. + * BLK_SNAP - A block held by another snapshot that is not needed by this + * snapshot. When the other snapshot is freed, the BLK_SNAP entries + * are converted to BLK_NOCOPY. These are needed to allow fsck to + * identify blocks that are in use by other snapshots (which are + * expunged from this snapshot). + */ +#define BLK_NOCOPY ((ufs_daddr_t)(1)) +#define BLK_SNAP ((ufs_daddr_t)(2)) + +/* * Per cylinder group information; summarized in blocks allocated * from first cylinder group data blocks. These blocks have to be * read in from fs_csaddr (size fs_cssize) in addition to the @@ -230,7 +254,8 @@ struct fs { int32_t *fs_maxcluster; /* max cluster in each cyl group */ int32_t fs_cpc; /* cyl per cycle in postbl */ int16_t fs_opostbl[16][8]; /* old rotation block list head */ - int32_t fs_sparecon[50]; /* reserved for future constants */ + int32_t fs_snapinum[FSMAXSNAP];/* list of snapshot inode numbers */ + int32_t fs_sparecon[30]; /* reserved for future constants */ int32_t fs_contigsumsize; /* size of cluster summary array */ int32_t fs_maxsymlinklen; /* max length of an internal symlink */ int32_t fs_inodefmt; /* format of on-disk inodes */ |