svn commit: r310778 - head/sys/cam/ctl

Mateusz Guzik mjguzik at gmail.com
Thu Dec 29 18:02:29 UTC 2016


On Thu, Dec 29, 2016 at 03:09:34PM +0000, Alexander Motin wrote:
> Author: mav
> Date: Thu Dec 29 15:09:34 2016
> New Revision: 310778
> URL: https://svnweb.freebsd.org/changeset/base/310778
> 
> Log:
>   Improve use of I/O's private area.
>   
>    - Since I/Os are allocates from per-port pools, make allocations store
>   pointer to CTL softc there, and use it where needed instead of global.
>    - Created bunch of helper macros to access LUN, port and CTL softc.
>   

This fails to build with:

sys/modules/ctl/../../cam/ctl/ctl.c:12522:27: error: member reference
base type 'void' is not a structure or union
        mtx_assert(&CTL_SOFTC(io)->ctl_lock, MA_NOTOWNED);

Looks like thep roblem is that CTL_SOFTC indeed does not cast and
returns void instead:
+#define CTL_SOFTC(io)  ((io)->io_hdr.ctl_private[CTL_PRIV_LUN].ptrs[1])

-- 
Mateusz Guzik <mjguzik gmail.com>


More information about the svn-src-all mailing list