Date: Thu, 28 May 2009 14:48:10 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r192975 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/mpt Message-ID: <200905281448.n4SEmBWh040733@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Thu May 28 14:48:10 2009 New Revision: 192975 URL: http://svn.freebsd.org/changeset/base/192975 Log: MFC: Largely revert the earlier change to use a single CCB for the RAID recovery thread. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/mpt/mpt_raid.c Modified: stable/7/sys/dev/mpt/mpt_raid.c ============================================================================== --- stable/7/sys/dev/mpt/mpt_raid.c Thu May 28 13:16:23 2009 (r192974) +++ stable/7/sys/dev/mpt/mpt_raid.c Thu May 28 14:48:10 2009 (r192975) @@ -658,19 +658,19 @@ mpt_terminate_raid_thread(struct mpt_sof static void mpt_cam_rescan_callback(struct cam_periph *periph, union ccb *ccb) { + xpt_free_path(ccb->ccb_h.path); + xpt_free_ccb(ccb); } static void mpt_raid_thread(void *arg) { struct mpt_softc *mpt; - union ccb *ccb; int firstrun; mpt = (struct mpt_softc *)arg; firstrun = 1; - ccb = xpt_alloc_ccb(); MPT_LOCK(mpt); while (mpt->shutdwn_raid == 0) { @@ -698,15 +698,21 @@ mpt_raid_thread(void *arg) } if (mpt->raid_rescan != 0) { + union ccb *ccb; struct cam_path *path; int error; mpt->raid_rescan = 0; + MPT_UNLOCK(mpt); + ccb = xpt_alloc_ccb(); + + MPT_LOCK(mpt); error = xpt_create_path(&path, xpt_periph, cam_sim_path(mpt->phydisk_sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); if (error != CAM_REQ_CMP) { + xpt_free_ccb(ccb); mpt_prt(mpt, "Unable to rescan RAID Bus!\n"); } else { xpt_setup_ccb(&ccb->ccb_h, path, 5); @@ -719,7 +725,6 @@ mpt_raid_thread(void *arg) } } } - xpt_free_ccb(ccb); mpt->raid_thread = NULL; wakeup(&mpt->raid_thread); MPT_UNLOCK(mpt);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905281448.n4SEmBWh040733>