]> xenbits.xensource.com Git - people/royger/freebsd.git/commitdiff
aio_md_test: label the md
authorEric van Gyzen <vangyzen@FreeBSD.org>
Fri, 23 Jul 2021 13:57:44 +0000 (08:57 -0500)
committerEric van Gyzen <vangyzen@FreeBSD.org>
Wed, 2 Mar 2022 21:56:30 +0000 (15:56 -0600)
Add a label to md devices created by this test.  The next time this
test leaks md devices, finding the culprit will be much easier.

Thanks to: sobomax, for adding labels in r322969
MFC after: 1 week
Sponsored by: Dell EMC Isilon

(cherry picked from commit 9666cda9764a1d19cbf967940508dc6d2020cbfb)

tests/sys/aio/aio_test.c

index 0f929c510e9f3d1813751af97e0f2fa4475fbc6f..d6fb3d2f58d9ff0dee27108961dde2098bf04d3c 100644 (file)
@@ -734,6 +734,8 @@ aio_md_setup(void)
        mdio.md_options = MD_AUTOUNIT | MD_COMPRESS;
        mdio.md_mediasize = GLOBAL_MAX;
        mdio.md_sectorsize = 512;
+       strlcpy(buf, __func__, sizeof(buf));
+       mdio.md_label = buf;
 
        if (ioctl(mdctl_fd, MDIOCATTACH, &mdio) < 0) {
                error = errno;