Created attachment 161920 [details] initialise sblock.fs_providersize 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).
Seems sensible to me. I'll give Marcel a day or two to comment, else I'll commit.
(In reply to Sean Bruno from comment #1) Looks good to me.
A commit references this bug: Author: sbruno Date: Tue Oct 13 17:00:14 UTC 2015 New revision: 289225 URL: https://svnweb.freebsd.org/changeset/base/289225 Log: 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 Changes: head/usr.sbin/makefs/ffs/mkfs.c
How about MFC to stable/10? That whould help cross-building FreeBSD-11/mips using FreeBSD-10/amd64 build box. And https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203707 too, please.
I think these should be MFC'd. I can do it if Sean doesn't get to it.
Bulk taking makefs bugs.
A commit references this bug: Author: ngie Date: Mon Nov 9 09:28:35 UTC 2015 New revision: 290599 URL: https://svnweb.freebsd.org/changeset/base/290599 Log: MFC r266930,r289225: r266930 (by jmg): convert to using the _daddr_t types like newfs was... Put the superblock in the correct possition for UFS2... There is a bug in FFS that if we don't put it here (for UFS2), it will forcefully relocate the superblock, and I believe cause data loss.. I have a fix for that, but w/ how many releases are broken, we won't be able to switch to the better _FLOPPY (block 0) for this for a while.. r289225 (by sbruno): 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 Changes: _U stable/10/ stable/10/usr.sbin/makefs/ffs/mkfs.c
A commit references this bug: Author: ngie Date: Mon Nov 9 09:29:39 UTC 2015 New revision: 290600 URL: https://svnweb.freebsd.org/changeset/base/290600 Log: MFstable/10 r290599: MFC r266930,r289225: r266930 (by jmg): convert to using the _daddr_t types like newfs was... Put the superblock in the correct possition for UFS2... There is a bug in FFS that if we don't put it here (for UFS2), it will forcefully relocate the superblock, and I believe cause data loss.. I have a fix for that, but w/ how many releases are broken, we won't be able to switch to the better _FLOPPY (block 0) for this for a while.. r289225 (by sbruno): 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 Changes: _U stable/9/ _U stable/9/usr.sbin/ _U stable/9/usr.sbin/makefs/ stable/9/usr.sbin/makefs/ffs/mkfs.c