]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r249347:
authorken <ken@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 19 Apr 2013 21:09:27 +0000 (21:09 +0000)
committerken <ken@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 19 Apr 2013 21:09:27 +0000 (21:09 +0000)
commitb7a9e9deaa401b78c9b4ac490296f6afcc8632b1
treeacb97ed9d3dbc9da771e1b193be100a505db2d77
parente2f19bf1a0762b029473c4d046f060ac053a37ae
MFC r249347:
  ------------------------------------------------------------------------
  r249347 | ken | 2013-04-10 16:12:21 -0600 (Wed, 10 Apr 2013) | 22 lines

  Add a callback to the ada(4) driver so that it knows when GEOM has released
  references to it.

  This is the functional equivalent to change r237518, which added this
  functionality to the cd(4) and da(4) drivers.

  This fix prevents a panic caused by GEOM calling adaopen() while the device
  is going away.  We now keep the device around until GEOM has finished
  cleaning up its state.

  ata_da.c: In adaregister(), add a d_gone callback to the GEOM disk
structure registered for the ada driver.  Increment the
peripheral reference count for GEOM.

Add a new callback, adadiskgonecb(), that GEOM calls when
it is done with its resources.  This callback releases the
reference acquired in adaregister().

Submitted by: Po-Li Soong
Sponsored by: Spectra Logic

git-svn-id: svn://svn.freebsd.org/base/stable/9@249661 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/cam/ata/ata_da.c