From freebsd-hackers@, thread "Seeking reviewers for patch; PR 193873"[0]: As mentioned in another thread ([1], [2]), I'm looking at dumping on systems w/ AF-4Kn drives (on a fairly old version of FreeBSD). Unfortunately, I'm not at all familiar w/ the process. I'm going to pick at it a few more days, but will probably end up having to punt and dumpsys onto a 512n or AF-512e device. But, since you are refactoring all this code in -CURRENT anyway, I think it would be awesome if you could look to the future and make it work w/o assuming that dump device block size is DEV_BSIZE; it would be better to use the sector size, as returned (for example) by ioctl(DIOCGSECTORSIZE). [0] https://lists.freebsd.org/pipermail/freebsd-hackers/2014-October/046217.html [1] https://lists.freebsd.org/pipermail/freebsd-hackers/2014-September/046164.html [2] https://lists.freebsd.org/pipermail/freebsd-hackers/2014-October/046181.html
Patch from Doug Ambrisko in review and testing here: https://reviews.freebsd.org/D5848 An earlier version has been tested against 512 and 4K-n drives. I've tested this latest version against ordinary 512 drives and it seems to work with kgdb. Procstat is having issues but I'm not sure if that's an old userspace problem or a new issue.
A commit references this bug: Author: cem Date: Fri Apr 15 17:45:12 UTC 2016 New revision: 298076 URL: https://svnweb.freebsd.org/changeset/base/298076 Log: Add 4Kn kernel dump support (And 4Kn minidump support, but only for amd64.) Make sure all I/O to the dump device is of the native sector size. To that end, we keep a native sector sized buffer associated with dump devices (di->blockbuf) and use it to pad smaller objects as needed (e.g. kerneldumpheader). Add dump_write_pad() as a convenience API to dump smaller objects with zero padding. (Rather than pull in NPM leftpad, we wrote our own.) Savecore(1) has been updated to deal with these dumps. The format for 512-byte sector dumps should remain backwards compatible. Minidumps for other architectures are left as an exercise for the reader. PR: 194279 Submitted by: ambrisko@ Reviewed by: cem (earlier version), rpokala Tested by: rpokala (4Kn/512 except 512 fulldump), cem (512 fulldump) Relnotes: yes Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D5848 Changes: head/sbin/savecore/savecore.c head/sys/amd64/amd64/minidump_machdep.c head/sys/kern/kern_dump.c head/sys/kern/kern_shutdown.c head/sys/sys/conf.h