From owner-svn-src-head@freebsd.org Thu Sep 10 09:27:23 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A36AA007C2; Thu, 10 Sep 2015 09:27:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B03A1988; Thu, 10 Sep 2015 09:27:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8A9RN84002998; Thu, 10 Sep 2015 09:27:23 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8A9RNuM002996; Thu, 10 Sep 2015 09:27:23 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509100927.t8A9RNuM002996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 10 Sep 2015 09:27:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287618 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Sep 2015 09:27:23 -0000 Author: mav Date: Thu Sep 10 09:27:22 2015 New Revision: 287618 URL: https://svnweb.freebsd.org/changeset/base/287618 Log: Disable CTL_IO_DELAY feature. It is too developer-oriented to be enabled by default. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_io.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Thu Sep 10 08:37:03 2015 (r287617) +++ head/sys/cam/ctl/ctl.c Thu Sep 10 09:27:22 2015 (r287618) @@ -1188,15 +1188,6 @@ ctl_init(void) SYSCTL_ADD_PROC(&softc->sysctl_ctx,SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, "ha_state", CTLTYPE_INT | CTLFLAG_RWTUN, softc, 0, ctl_ha_state_sysctl, "I", "HA state for this head"); - -#ifdef CTL_IO_DELAY - if (sizeof(struct callout) > CTL_TIMER_BYTES) { - printf("sizeof(struct callout) %zd > CTL_TIMER_BYTES %zd\n", - sizeof(struct callout), CTL_TIMER_BYTES); - return (EINVAL); - } -#endif /* CTL_IO_DELAY */ - return (0); } @@ -12198,12 +12189,10 @@ ctl_datamove(union ctl_io *io) lun =(struct ctl_lun *)io->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; if ((lun != NULL) && (lun->delay_info.datamove_delay > 0)) { - struct callout *callout; - callout = (struct callout *)&io->io_hdr.timer_bytes; - callout_init(callout, /*mpsafe*/ 1); + callout_init(&io->io_hdr.delay_callout, /*mpsafe*/ 1); io->io_hdr.flags |= CTL_FLAG_DELAY_DONE; - callout_reset(callout, + callout_reset(&io->io_hdr.delay_callout, lun->delay_info.datamove_delay * hz, ctl_datamove_timer_wakeup, io); if (lun->delay_info.datamove_type == @@ -13448,12 +13437,10 @@ ctl_done(union ctl_io *io) if ((lun != NULL) && (lun->delay_info.done_delay > 0)) { - struct callout *callout; - callout = (struct callout *)&io->io_hdr.timer_bytes; - callout_init(callout, /*mpsafe*/ 1); + callout_init(&io->io_hdr.delay_callout, /*mpsafe*/ 1); io->io_hdr.flags |= CTL_FLAG_DELAY_DONE; - callout_reset(callout, + callout_reset(&io->io_hdr.delay_callout, lun->delay_info.done_delay * hz, ctl_done_timer_wakeup, io); if (lun->delay_info.done_type == CTL_DELAY_TYPE_ONESHOT) Modified: head/sys/cam/ctl/ctl_io.h ============================================================================== --- head/sys/cam/ctl/ctl_io.h Thu Sep 10 08:37:03 2015 (r287617) +++ head/sys/cam/ctl/ctl_io.h Thu Sep 10 09:27:22 2015 (r287618) @@ -58,13 +58,12 @@ EXTERN(int ctl_time_io_secs, CTL_TIME_IO #endif /* - * Uncomment these next two lines to enable the CTL I/O delay feature. You + * Uncomment this next line to enable the CTL I/O delay feature. You * can delay I/O at two different points -- datamove and done. This is * useful for diagnosing abort conditions (for hosts that send an abort on a * timeout), and for determining how long a host's timeout is. */ -#define CTL_IO_DELAY -#define CTL_TIMER_BYTES sizeof(struct callout) +//#define CTL_IO_DELAY typedef enum { CTL_STATUS_NONE, /* No status */ @@ -231,7 +230,7 @@ struct ctl_io_hdr { uint32_t timeout; /* timeout in ms */ uint32_t retries; /* retry count */ #ifdef CTL_IO_DELAY - uint8_t timer_bytes[CTL_TIMER_BYTES]; /* timer kludge */ + struct callout delay_callout; #endif /* CTL_IO_DELAY */ #ifdef CTL_TIME_IO time_t start_time; /* I/O start time */