NetBSD/sys/ufs/ffs
maxv 7fcc4ddf11 In fact, we need to sanitize the superblock *after* swapping it. Therefore,
move the swap code inside the loop.

'fs->fs_sbsize' is swapped twice: the first time in order to get the
correct superblock size, and later when swapping the whole superblock
structure. As a result, we need to check 'fs->fs_sbsize' twice.

This:
 - fixes my previous changes for swapped FSes
 - allows the kernel to look for other superblock locations if the
   current superblock is not validated

And now:
 - ffs_superblock_validate() takes only one argument: the fs structure
 - 'fs_bsize' is unused, so delete it

Add some comments to explain a bit what we are doing.
2015-02-14 09:55:53 +00:00
..
ffs_alloc.c Prefer cprng_fast32 over random. A good distribution even in the lower 2014-09-08 20:52:37 +00:00
ffs_appleufs.c ffs_appleufs_validate(): 2015-02-14 08:07:39 +00:00
ffs_balloc.c Definining needswap where needed. 2013-10-20 00:29:10 +00:00
ffs_bswap.c Remove lfs-only inumber field (and its supporting union) from struct 2013-06-09 17:55:46 +00:00
ffs_extern.h Add an UFS_SNAPGONE() ufs op replacing the calls 2013-06-16 13:33:30 +00:00
ffs_inode.c Definining needswap where needed. 2013-10-20 00:29:10 +00:00
ffs_quota2.c Welcome to 5.99.53! Merge rmind-uvmplock branch: 2011-06-12 03:35:36 +00:00
ffs_snapshot.c Don't nest structure definitions. 2014-09-05 06:10:07 +00:00
ffs_subr.c Definining needswap where needed. 2013-10-20 00:29:10 +00:00
ffs_tables.c
ffs_vfsops.c In fact, we need to sanitize the superblock *after* swapping it. Therefore, 2015-02-14 09:55:53 +00:00
ffs_vnops.c Add VOP_FALLOCATE and VOP_FDISCARD to every vnode ops table I can 2014-07-25 08:20:51 +00:00
ffs_wapbl.c move the flag setting higher to avoid KASSERT (dholland) 2014-07-11 16:17:29 +00:00
fs.h Two typos: 2015-02-14 09:06:11 +00:00
Makefile