From ab14b434c175ecf71563899622d311668779e65c Mon Sep 17 00:00:00 2001 From: ken Date: Thu, 23 Jun 2016 20:05:59 +0000 Subject: 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) --- sys/geom/geom_disk.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'sys/geom/geom_disk.h') 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 */ -- cgit v1.1