summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_disk.h
diff options
context:
space:
mode:
authorken <ken@FreeBSD.org>2016-06-23 20:05:59 +0000
committerken <ken@FreeBSD.org>2016-06-23 20:05:59 +0000
commitab14b434c175ecf71563899622d311668779e65c (patch)
treec8a67bdfd1fc008fbf7a9c2968dbbb725cdaa61e /sys/geom/geom_disk.h
parent5d697e7c812c904333f7baac06c0cddd0ad1263b (diff)
downloadFreeBSD-src-ab14b434c175ecf71563899622d311668779e65c.zip
FreeBSD-src-ab14b434c175ecf71563899622d311668779e65c.tar.gz
Switch geom_disk over to using a pool mutex.
The GEOM disk d_mtx is only acquired on disk creation and destruction. It is a good candidate for replacement with a pool mutex. This eliminates the mutex initialization and teardown and the mutex and name variables themselves from struct disk. sys/geom/geom_disk.h: Take d_mtx and d_mtx_name out of struct disk. sys/geom/geom_disk.c: Use mtx_pool_lock() and mtx_pool_unlock() to guard the disk initialization state instead of a dedicated mutex. This allows removing the initialization and destruction of d_mtx. sys/sys/param.h: Bump __FreeBSD_version to 1100119 for the change to struct disk. Suggested by: jhb Sponsored by: Spectra Logic Approved by: re (gjb)
Diffstat (limited to 'sys/geom/geom_disk.h')
-rw-r--r--sys/geom/geom_disk.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/sys/geom/geom_disk.h b/sys/geom/geom_disk.h
index 8549348..5fce5b9 100644
--- a/sys/geom/geom_disk.h
+++ b/sys/geom/geom_disk.h
@@ -72,8 +72,6 @@ struct disk {
struct devstat *d_devstat;
int d_goneflag;
int d_destroyed;
- struct mtx d_mtx;
- char d_mtx_name[24];
disk_init_level d_init_level;
/* Shared fields */
OpenPOWER on IntegriCloud