FreeBSD Bugzilla – Attachment 129155 Details for
Bug 173113
Add descriptions to ZFS TRIM sysctls (patch included)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
file.txt
file.txt (text/plain), 3.25 KB, created by
Steven Hartland
on 2012-10-26 09:40:00 UTC
(
hide
)
Description:
file.txt
Filename:
MIME Type:
Creator:
Steven Hartland
Created:
2012-10-26 09:40:00 UTC
Size:
3.25 KB
patch
obsolete
>Renamed zfs trim stats removing duplicate zio_trim identifier from the name >Added description option to kstats. >Added descriptions for zio_trim kstats >--- sys/cddl/compat/opensolaris/kern/opensolaris_kstat.c.orig 2012-10-25 21:21:30.619929627 +0000 >+++ sys/cddl/compat/opensolaris/kern/opensolaris_kstat.c 2012-10-25 21:35:15.540025058 +0000 >@@ -118,7 +118,7 @@ > SYSCTL_ADD_PROC(&ksp->ks_sysctl_ctx, > SYSCTL_CHILDREN(ksp->ks_sysctl_root), OID_AUTO, ksent->name, > CTLTYPE_QUAD | CTLFLAG_RD, ksent, sizeof(*ksent), >- kstat_sysctl, "QU", ""); >+ kstat_sysctl, "QU", ksent->desc); > } > } > >--- sys/cddl/compat/opensolaris/sys/kstat.h.orig 2012-10-25 21:19:45.151906457 +0000 >+++ sys/cddl/compat/opensolaris/sys/kstat.h 2012-10-25 21:30:42.595989713 +0000 >@@ -53,6 +53,8 @@ > #define KSTAT_DATA_INT64 3 > #define KSTAT_DATA_UINT64 4 > uchar_t data_type; >+#define KSTAT_DESCLEN 128 >+ char desc[KSTAT_DESCLEN]; > union { > uint64_t ui64; > } value; >--- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h.orig 2012-10-25 21:08:34.369771576 +0000 >+++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h 2012-10-25 21:09:21.595777954 +0000 >@@ -359,23 +359,23 @@ > /* > * Number of bytes successfully TRIMmed. > */ >- kstat_named_t zio_trim_bytes; >+ kstat_named_t bytes; > > /* > * Number of successful TRIM requests. > */ >- kstat_named_t zio_trim_success; >+ kstat_named_t success; > > /* > * Number of TRIM requests that failed because TRIM is not > * supported. > */ >- kstat_named_t zio_trim_unsupported; >+ kstat_named_t unsupported; > > /* > * Number of TRIM requests that failed for other reasons. > */ >- kstat_named_t zio_trim_failed; >+ kstat_named_t failed; > } zio_trim_stats_t; > > extern zio_trim_stats_t zio_trim_stats; >--- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c.orig 2012-10-25 21:03:26.967732770 +0000 >+++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c 2012-10-25 22:10:25.871594713 +0000 >@@ -44,14 +44,15 @@ > SYSCTL_INT(_vfs_zfs_zio, OID_AUTO, use_uma, CTLFLAG_RDTUN, &zio_use_uma, 0, > "Use uma(9) for ZIO allocations"); > >-/* >- * See zio.h for more information about these fields. >- */ > zio_trim_stats_t zio_trim_stats = { >- { "zio_trim_bytes", KSTAT_DATA_UINT64 }, >- { "zio_trim_success", KSTAT_DATA_UINT64 }, >- { "zio_trim_unsupported", KSTAT_DATA_UINT64 }, >- { "zio_trim_failed", KSTAT_DATA_UINT64 }, >+ { "bytes", KSTAT_DATA_UINT64, >+ "Number of bytes successfully TRIMmed" }, >+ { "success", KSTAT_DATA_UINT64, >+ "Number of successful TRIM requests" }, >+ { "unsupported", KSTAT_DATA_UINT64, >+ "Number of TRIM requests that failed because TRIM is not supported" }, >+ { "failed", KSTAT_DATA_UINT64, >+ "Number of TRIM requests that failed for reasons other than not supported" }, > }; > > static kstat_t *zio_trim_ksp; >@@ -2536,14 +2537,14 @@ > if (zio->io_type == ZIO_TYPE_IOCTL && zio->io_cmd == DKIOCTRIM) > switch (zio->io_error) { > case 0: >- ZIO_TRIM_STAT_INCR(zio_trim_bytes, zio->io_size); >- ZIO_TRIM_STAT_BUMP(zio_trim_success); >+ ZIO_TRIM_STAT_INCR(bytes, zio->io_size); >+ ZIO_TRIM_STAT_BUMP(success); > break; > case EOPNOTSUPP: >- ZIO_TRIM_STAT_BUMP(zio_trim_unsupported); >+ ZIO_TRIM_STAT_BUMP(unsupported); > break; > default: >- ZIO_TRIM_STAT_BUMP(zio_trim_failed); >+ ZIO_TRIM_STAT_BUMP(failed); > break; > }
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 Raw
Actions:
View
Attachments on
bug 173113
: 129155