1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

makefs(8) leaves sblock.fs_providersize uninitialized (zero) that can be easily

checked with dumpfs(8). This may lead to other problems, f.e. geom_label kernel
module sanity checks do not like zero fs_old_size value and skips such UFS1
file system while tasting (fs_old_size derives from sblock.fs_providersize).

PR:	203704
Submitted by:	eugen@grosbein.net
Reviewed by:	marcel
This commit is contained in:
Sean Bruno 2015-10-13 17:00:14 +00:00
parent 4409569894
commit 24484ca4bf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=289225

View File

@ -248,7 +248,8 @@ ffs_mkfs(const char *fsys, const fsinfo_t *fsopts)
exit(21);
}
sblock.fs_fsbtodb = ilog2(sblock.fs_fsize / sectorsize);
sblock.fs_size = fssize = dbtofsb(&sblock, fssize);
sblock.fs_size = sblock.fs_providersize = fssize =
dbtofsb(&sblock, fssize);
if (Oflag <= 1) {
sblock.fs_magic = FS_UFS1_MAGIC;