this addresses pr/23924
this includes most of support for creating fslevel 3 compatible filesystems,
although there is currently no command line option to invoke it when
not using apple_ufs
use the size of 'device' for teh file syste size - fixes pr 18353.
(It might be better to be able to say 50% of the size...)
Fix 'mount_mfs -N ...', as well as supressing the creation of the fs, the -N
inhibits the supression of the prints of the mfs parameters.
and don't try the disklabel.
Allows to create a filesystem on a floppy again.
(It is arguably another bug that DIOCGDINFO returns nonsense
for floppies.)
kernels) so that newfs works on vinum (and similar).
Kill the -V hack for vinum.
Don't bother faking up a label for -F and mfs, nothing is needed from it.
Ignore label if special doesn't match DISKPART(sb.st_rdev);
Simplifly logic for default block/frag sizes.
Update man page to match.
WARNS=3.
There's no reasonable situation where there will be one there, except if the
disk had data on it previously for some reason. It's significantly more
likely (read "the world until UFS2 was merged") that sector 0(..15)
contains really important stuff like boot blocks and disk labels.
Once again, I ask, why wasn't UFS2 implemented as a separate file
system a la lfs & ext2fs ?
It could have shared a chunk of the kernel code (just like those),
and had different userland tools and a different fs_type.
Correct calculation of number of inodes from density for small filesystems.
Add a '-n inodes' option so that the desired number of inodes can be
explicitly given - init needs this for mfs /dev, -i density is too crude.
first alternate superblock is zerod.
Removes any possibility of any programs using a trully out of date
alternate superblock if a filesystem is remade with a larger block size.
-c used to specify the number of cylinders per group
- but newfs has ignored cylinders for a while.
Changing what -c meant is just asking for trouble!
I might add something to let MINCYL be changed.
- allows less than 'one fragment per inode' (useful for mfs /dev)
- limits number of inodes to 2^31 (they are stored in an int32_t)
- errors if the number of cylinder groups is such that the cylinder group
summary won't fit in the first cylinder group.
- ensures that the last cylinder block contains a valid number of fragments
and inodes, and is not larger than any earlier ones.
- cylinder groups are now created with almost the same size as each other.
Change posted to tech-kern, and no one objected.
80 columns (sysinst uses full width these days).
Use {;} instead of , in a couple of places.
Abort if user tries to make a UFS1 filesytem with > 2^31 fragments.
Abort if the cylinder group summary won't fit into the first cylinder group.
Use pread/pwrite and remove a few redundant casts.