diff options
author | mckusick <mckusick@FreeBSD.org> | 2017-08-23 04:35:03 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2017-08-23 04:35:03 +0000 |
commit | 333947cd56f377ddcb1d8aaaf2bb3a01c2449bc8 (patch) | |
tree | f2f291c2062e70126416d7388f10aeb33714f680 /sys/ufs | |
parent | d5589b0101c9f5c1457a548e061ce830fe4137f9 (diff) | |
download | FreeBSD-src-333947cd56f377ddcb1d8aaaf2bb3a01c2449bc8.zip FreeBSD-src-333947cd56f377ddcb1d8aaaf2bb3a01c2449bc8.tar.gz |
MFC of 322200, 322201, 322271, and 322297
322200: Remove (broken) search for alternate superblocks
322201: Show differences when alternate superblock fails to match
322271: Cleanup for 322200.
322297: Restore fsck_ffs ability to find alternate superblocks
Discussed with: kib, imp
Differential Revision: https://reviews.freebsd.org/D11589
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/fs.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/ufs/ffs/fs.h b/sys/ufs/ffs/fs.h index 620fee9..35ee270 100644 --- a/sys/ufs/ffs/fs.h +++ b/sys/ufs/ffs/fs.h @@ -234,6 +234,20 @@ struct fsck_cmd { }; /* + * A recovery structure placed at the end of the boot block area by newfs + * that can be used by fsck to search for alternate superblocks. + */ +#define RESID (4096 - 20) /* disk sector size minus recovery area size */ +struct fsrecovery { + char block[RESID]; /* unused part of sector */ + int32_t fsr_magic; /* magic number */ + int32_t fsr_fsbtodb; /* fsbtodb and dbtofsb shift constant */ + int32_t fsr_sblkno; /* offset of super-block in filesys */ + int32_t fsr_fpg; /* blocks per group * fs_frag */ + u_int32_t fsr_ncg; /* number of cylinder groups */ +}; + +/* * 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 |