opnsense-src/usr.sbin/makefs
Mark Johnston fbc5610259 makefs/zfs/tests: Force-destroy md devices
Most of these tests create a md(4) device backed by a makefs-generated
image, then import the pool, using the md device as a pool vdev.  When
a test finishes, it destroys the pool, then destroys the md device.

Once in a while md device destruction fails with EBUSY.  This happens
when a GEOM consumer is holding the device open; kern_mddetach_locked()
simply fails if any consumers are present.  zpool destruction is
synchronous so ZFS is innocent, rather, the problem seems to be that
GEOM re-tastes the device after the zpool reference goes away.  This
operation creates a transient reference that causes the spurious
failure.

Use "mdconfig -o force" to work around this.

MFC after:	2 weeks

(cherry picked from commit d6bc31f92991b6d67da54868f3563278015389ca)
2026-02-09 18:03:42 +00:00
..
cd9660 makefs: Initialize cd9660 inode map only once 2025-03-01 08:35:15 -05:00
ffs makefs: Ensure that FFS superblocks are reproducible 2025-05-08 15:49:53 +00:00
msdos makefs: Fix typo 's/mirrorring/mirroring/' 2026-01-15 19:38:55 +00:00
sys
tests makefs/zfs/tests: Force-destroy md devices 2026-02-09 18:03:42 +00:00
zfs makefs: zfs uberblock location is calculated wrong 2025-08-15 07:55:49 +03:00
cd9660.c makefs: Fix cd9660 duplicate directory names 2024-12-30 14:48:44 -05:00
cd9660.h makefs: Make cd9660 Rock Ridge inodes reproducible 2025-02-28 15:34:52 -05:00
ffs.c makefs: Calculate indirect block count properly for large files on ffs 2025-08-27 15:18:50 -04:00
ffs.h
Makefile src: Use gnu17 as the default C standard for userland instead of gnu99 2025-02-11 09:16:25 -05:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend.host Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend.options
makefs.8 makefs.8: Cleanup man page 2026-01-15 19:39:10 +00:00
makefs.c makefs: Honor -T timestamps when creating images from mtree manifests 2025-05-20 11:50:22 +02:00
makefs.h makefs: Honor -T timestamps when creating images from mtree manifests 2025-05-20 11:50:22 +02:00
msdos.c usr.sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
msdos.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
mtree.c makefs: Honor -T timestamps when creating images from mtree manifests 2025-05-20 11:50:22 +02:00
walk.c makefs: Honor -T timestamps when creating images from mtree manifests 2025-05-20 11:50:22 +02:00
zfs.c makefs: zfs uberblock location is calculated wrong 2025-08-15 07:55:49 +03:00