NetBSD/sys/ufs
kardel a924db8894 PR/53990, PR/52380, PR/52102: UFS2 cylinder group inode allocation botch
Fix rare allocation botch in ffs_nodealloccg().

Conditions:
   a) less than
        #_of_initialized_inodes(cg->cg_initediblk)
        - inodes_per_filesystem_block
      are allocated in the cylinder group
   b) cg->cg_irotor points to a uninterupted run of
      allocated inodes in the inode bitmap up to the
      end of dynamically initialized inodes
      (cg->cg_initediblk)

In this case the next inode after this run was returned
without initializing the respective inode block. As the
block is not initialized these inodes could trigger panics
on inode consistency due to old (uninitialized) disk data.

In very rare cases data loss could occur when
the uninitialized inode block is initialized via the
normal mechanism.
Further conditions to occur after the above:
   c) no panic
   d) no (forced) fsck
   e) and more than cg->cg_initediblk - inodes_per_filesystem_block
      allocated inodes.

Fix:
Always insure allocation always in initialized inode range
extending the initialized inode range as needed.

Add KASSERTMSG() safeguards.

ok hannken@
2019-04-14 15:55:24 +00:00
..
chfs add a genfs method to allow a file system to limit the range of pages 2018-05-28 21:04:37 +00:00
ext2fs Add "void *extra" argument to vcache_new() so a file system may 2019-01-01 10:06:54 +00:00
ffs PR/53990, PR/52380, PR/52102: UFS2 cylinder group inode allocation botch 2019-04-14 15:55:24 +00:00
lfs Update comment (overlooked in r1.179). 2019-01-10 06:31:04 +00:00
mfs Remove superfluous VOP_UNLOCK(), vnode will be unlocked from spec_reclaim(). 2019-02-20 10:03:55 +00:00
ufs Revert -r1.244-245 of ufs_vnops.c; they are wrong. 2019-02-25 06:00:40 +00:00
Makefile
files.ufs add support for extended attributes in ext2fs for ext3/ext4; read-only for now 2016-08-12 19:04:03 +00:00