FreeBSD Bugzilla – Attachment 224327 Details for
Bug 255261
Slow unmount of (ZFS) filesystem at reboot time
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to make zfs_fini more verbose at shutdown
zfs_shutdown-13.patch (text/plain), 2.40 KB, created by
Peter Eriksson
on 2021-04-21 09:39:16 UTC
(
hide
)
Description:
Patch to make zfs_fini more verbose at shutdown
Filename:
MIME Type:
Creator:
Peter Eriksson
Created:
2021-04-21 09:39:16 UTC
Size:
2.40 KB
patch
obsolete
>Index: sys/contrib/openzfs/module/zfs/zfs_ioctl.c >=================================================================== >--- sys/contrib/openzfs/module/zfs/zfs_ioctl.c (revision 369637) >+++ sys/contrib/openzfs/module/zfs/zfs_ioctl.c (working copy) >@@ -7281,9 +7281,23 @@ > return (EBUSY); > } > >+ if (verbose_shutdown) >+ printf("ZFS is shutting down.\n"); >+ >+ if (verbose_shutdown > 1) >+ printf(" Before zfsdev_fini\n"); > zfsdev_fini(); >+ >+ if (verbose_shutdown > 1) >+ printf(" Before zvol_fini\n"); > zvol_fini(); >+ >+ if (verbose_shutdown > 1) >+ printf(" Before zfs_fini\n"); > zfs_fini(); >+ >+ if (verbose_shutdown > 1) >+ printf(" Before spa_fini\n"); > spa_fini(); > > tsd_destroy(&zfs_fsyncer_key); >@@ -7292,6 +7306,9 @@ > > mutex_destroy(&zfs_share_lock); > >+ if (verbose_shutdown) >+ printf("ZFS is shut down.\n"); >+ > return (0); > } > >Index: sys/contrib/openzfs/module/zfs/zio.c >=================================================================== >--- sys/contrib/openzfs/module/zfs/zio.c (revision 369637) >+++ sys/contrib/openzfs/module/zfs/zio.c (working copy) >@@ -31,6 +31,7 @@ > #include <sys/fm/fs/zfs.h> > #include <sys/spa.h> > #include <sys/txg.h> >+#include <sys/time.h> > #include <sys/spa_impl.h> > #include <sys/vdev_impl.h> > #include <sys/zio_impl.h> >@@ -60,6 +61,7 @@ > SYSCTL_INT(_vfs_zfs_zio, OID_AUTO, exclude_metadata, CTLFLAG_RDTUN, &zio_exclude_metadata, 0, > "Exclude metadata buffers from dumps as well"); > >+ > zio_trim_stats_t zio_trim_stats = { > { "bytes", KSTAT_DATA_UINT64, > "Number of bytes successfully TRIMmed" }, >@@ -235,8 +237,20 @@ > size_t c; > kmem_cache_t *last_cache = NULL; > kmem_cache_t *last_data_cache = NULL; >+ time_t time_last = 0; > >+ if (verbose_shutdown) >+ printf("Destroying ZFS zio kmem caches:\n"); >+ > for (c = 0; c < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT; c++) { >+ time_t t0, t1; >+ int dt; >+ >+ if (verbose_shutdown && time_last != time_second) { >+ printf(" %lu\r", c); >+ time_last = time_second; >+ } >+ > if (zio_buf_cache[c] != last_cache) { > last_cache = zio_buf_cache[c]; > kmem_cache_destroy(zio_buf_cache[c]); >@@ -250,9 +264,19 @@ > zio_data_buf_cache[c] = NULL; > } > >+ if (verbose_shutdown) >+ printf(" %lu.\r", c); >+ > kmem_cache_destroy(zio_link_cache); >+ >+ if (verbose_shutdown) >+ printf(" %lu+\r", c); >+ > kmem_cache_destroy(zio_cache); > >+ if (verbose_shutdown) >+ printf(" %lu++\n", c); >+ > zio_inject_fini(); > > if (zio_trim_ksp != NULL) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 255261
:
224295
|
224325
|
224326
|
224327
|
224366
|
224367