Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F172209699
D35034.id105345.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D35034.id105345.diff
View Options
Index: share/man/man4/geom.4
===================================================================
--- share/man/man4/geom.4
+++ share/man/man4/geom.4
@@ -34,7 +34,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 13, 2019
+.Dd April 23, 2022
.Dt GEOM 4
.Os
.Sh NAME
@@ -443,6 +443,20 @@
.It 0x80 Pq Dv G_F_CTLDUMP
Dump contents of gctl requests.
.El
+.Pp
+By default
+.Va g_vfs_done
+reports all errors on requests to the disk subsystem.
+However, the error code
+.Va ENXIO
+is reported on all pending I/Os when the underlying disk has
+been destroyed.
+This can result in a large spew of information that cannot easily be acted upon.
+The
+.Va kern.geom.report_enxio
+sysctl can be set to
+.Va false
+to suppress these messages, but still report other errors.
.Sh SEE ALSO
.Xr libgeom 3 ,
.Xr DECLARE_GEOM_CLASS 9 ,
Index: sys/geom/geom_int.h
===================================================================
--- sys/geom/geom_int.h
+++ sys/geom/geom_int.h
@@ -73,6 +73,7 @@
extern struct thread *g_down_td;
extern int g_shutdown;
extern int g_notaste;
+extern bool g_report_enxio;
/* geom_ctl.c */
void g_ctl_init(void);
Index: sys/geom/geom_kern.c
===================================================================
--- sys/geom/geom_kern.c
+++ sys/geom/geom_kern.c
@@ -69,6 +69,7 @@
int __read_mostly g_collectstats = G_STATS_PROVIDERS;
int g_shutdown;
int g_notaste;
+bool g_report_enxio = true;
/*
* G_UP and G_DOWN are the two threads which push I/O through the
@@ -228,6 +229,9 @@
SYSCTL_INT(_kern_geom, OID_AUTO, notaste, CTLFLAG_RW,
&g_notaste, 0, "Prevent GEOM tasting");
+SYSCTL_BOOL(_kern_geom, OID_AUTO, report_enxio, CTLFLAG_RW,
+ &g_report_enxio, 0, "Report ENXIO errors in g_vfs_done");
+
SYSCTL_INT(_kern_geom, OID_AUTO, collectstats, CTLFLAG_RW,
&g_collectstats, 0,
"Control statistics collection on GEOM providers and consumers");
Index: sys/geom/geom_vfs.c
===================================================================
--- sys/geom/geom_vfs.c
+++ sys/geom/geom_vfs.c
@@ -41,6 +41,7 @@
#include <sys/mount.h>
#include <geom/geom.h>
+#include <geom/geom_int.h>
#include <geom/geom_vfs.h>
/*
@@ -147,8 +148,10 @@
sc->sc_enxio_active = 1;
if (sc->sc_enxio_active)
bip->bio_error = ENXIO;
- g_print_bio("g_vfs_done():", bip, "error = %d",
- bip->bio_error);
+ if (bip->bio_error != ENXIO || g_report_enxio) {
+ g_print_bio("g_vfs_done():", bip, "error = %d",
+ bip->bio_error);
+ }
}
bp->b_error = bip->bio_error;
bp->b_ioflags = bip->bio_flags;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Sep 17, 9:27 PM (11 h, 23 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39106389
Default Alt Text
D35034.id105345.diff (2 KB)
Attached To
Mode
D35034: g_vfs_done: Only report ENXIO once
Attached
Detach File
Event Timeline
Log In to Comment