Date: Wed, 7 Feb 2018 18:33:46 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328983 - head/sys/cam/nvme Message-ID: <201802071833.w17IXkDe049902@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Wed Feb 7 18:33:46 2018 New Revision: 328983 URL: https://svnweb.freebsd.org/changeset/base/328983 Log: Fix cut and pasted comments to reflect differences in code from the original source. Sponsored by: Netflix Modified: head/sys/cam/nvme/nvme_da.c Modified: head/sys/cam/nvme/nvme_da.c ============================================================================== --- head/sys/cam/nvme/nvme_da.c Wed Feb 7 18:32:51 2018 (r328982) +++ head/sys/cam/nvme/nvme_da.c Wed Feb 7 18:33:46 2018 (r328983) @@ -1094,19 +1094,25 @@ ndaflush(void) CAM_PERIPH_FOREACH(periph, &ndadriver) { softc = (struct nda_softc *)periph->softc; + if (SCHEDULER_STOPPED()) { - /* If we paniced with the lock held, do not recurse. */ + /* + * If we paniced with the lock held or the periph is not + * open, do not recurse. Otherwise, call ndadump since + * that avoids the sleeping cam_periph_getccb does if no + * CCBs are available. + */ if (!cam_periph_owned(periph) && (softc->flags & NDA_FLAG_OPEN)) { ndadump(softc->disk, NULL, 0, 0, 0); } continue; } - cam_periph_lock(periph); + /* - * We only sync the cache if the drive is still open, and - * if the drive is capable of it.. + * We only sync the cache if the drive is still open */ + cam_periph_lock(periph); if ((softc->flags & NDA_FLAG_OPEN) == 0) { cam_periph_unlock(periph); continue;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802071833.w17IXkDe049902>