From owner-svn-src-all@FreeBSD.ORG Sat Jan 3 13:36:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D705D431; Sat, 3 Jan 2015 13:36:58 +0000 (UTC) Received: from svn.freebsd.org (svn.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 B95811780; Sat, 3 Jan 2015 13:36:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t03DawIX051923; Sat, 3 Jan 2015 13:36:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t03DavvF051919; Sat, 3 Jan 2015 13:36:57 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501031336.t03DavvF051919@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 3 Jan 2015 13:36:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276618 - in stable/10/sys: cam/ctl dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2015 13:36:59 -0000 Author: mav Date: Sat Jan 3 13:36:56 2015 New Revision: 276618 URL: https://svnweb.freebsd.org/changeset/base/276618 Log: MFC r274036 (by trasz): s/icl_pdu_new_bhs/icl_pdu_new/; no functional changes, just a little nicer code. Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/dev/iscsi/icl.c stable/10/sys/dev/iscsi/icl.h stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Sat Jan 3 13:12:47 2015 (r276617) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Sat Jan 3 13:36:56 2015 (r276618) @@ -191,7 +191,7 @@ static struct icl_pdu * cfiscsi_pdu_new_response(struct icl_pdu *request, int flags) { - return (icl_pdu_new_bhs(request->ip_conn, flags)); + return (icl_pdu_new(request->ip_conn, flags)); } static bool @@ -1057,7 +1057,7 @@ cfiscsi_callout(void *context) if (cs->cs_timeout < 2) return; - cp = icl_pdu_new_bhs(cs->cs_conn, M_NOWAIT); + cp = icl_pdu_new(cs->cs_conn, M_NOWAIT); if (cp == NULL) { CFISCSI_SESSION_WARN(cs, "failed to allocate memory"); return; @@ -1672,7 +1672,7 @@ cfiscsi_ioctl_terminate(struct ctl_iscsi strcmp(cs->cs_initiator_addr, citp->initiator_addr) != 0) continue; - response = icl_pdu_new_bhs(cs->cs_conn, M_NOWAIT); + response = icl_pdu_new(cs->cs_conn, M_NOWAIT); if (response == NULL) { /* * Oh well. Just terminate the connection. @@ -1722,7 +1722,7 @@ cfiscsi_ioctl_logout(struct ctl_iscsi *c strcmp(cs->cs_initiator_addr, cilp->initiator_addr) != 0) continue; - response = icl_pdu_new_bhs(cs->cs_conn, M_NOWAIT); + response = icl_pdu_new(cs->cs_conn, M_NOWAIT); if (response == NULL) { ci->status = CTL_ISCSI_ERROR; snprintf(ci->error_str, sizeof(ci->error_str), @@ -1892,7 +1892,7 @@ cfiscsi_ioctl_send(struct ctl_iscsi *ci) } } - ip = icl_pdu_new_bhs(cs->cs_conn, M_WAITOK); + ip = icl_pdu_new(cs->cs_conn, M_WAITOK); memcpy(ip->ip_bhs, cisp->bhs, sizeof(*ip->ip_bhs)); if (datalen > 0) { icl_pdu_append_data(ip, data, datalen, M_WAITOK); Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Sat Jan 3 13:12:47 2015 (r276617) +++ stable/10/sys/dev/iscsi/icl.c Sat Jan 3 13:36:56 2015 (r276618) @@ -193,7 +193,7 @@ icl_pdu_free(struct icl_pdu *ip) * Allocate icl_pdu with empty BHS to fill up by the caller. */ struct icl_pdu * -icl_pdu_new_bhs(struct icl_conn *ic, int flags) +icl_pdu_new(struct icl_conn *ic, int flags) { struct icl_pdu *ip; Modified: stable/10/sys/dev/iscsi/icl.h ============================================================================== --- stable/10/sys/dev/iscsi/icl.h Sat Jan 3 13:12:47 2015 (r276617) +++ stable/10/sys/dev/iscsi/icl.h Sat Jan 3 13:36:56 2015 (r276618) @@ -57,7 +57,7 @@ struct icl_pdu { uint32_t ip_prv2; }; -struct icl_pdu *icl_pdu_new_bhs(struct icl_conn *ic, int flags); +struct icl_pdu *icl_pdu_new(struct icl_conn *ic, int flags); size_t icl_pdu_data_segment_length(const struct icl_pdu *ip); int icl_pdu_append_data(struct icl_pdu *ip, const void *addr, size_t len, int flags); void icl_pdu_get_data(struct icl_pdu *ip, size_t off, void *addr, size_t len); Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Sat Jan 3 13:12:47 2015 (r276617) +++ stable/10/sys/dev/iscsi/iscsi.c Sat Jan 3 13:36:56 2015 (r276618) @@ -274,7 +274,7 @@ iscsi_session_logout(struct iscsi_sessio struct icl_pdu *request; struct iscsi_bhs_logout_request *bhslr; - request = icl_pdu_new_bhs(is->is_conn, M_NOWAIT); + request = icl_pdu_new(is->is_conn, M_NOWAIT); if (request == NULL) return; @@ -593,7 +593,7 @@ iscsi_callout(void *context) if (is->is_timeout < 2) return; - request = icl_pdu_new_bhs(is->is_conn, M_NOWAIT); + request = icl_pdu_new(is->is_conn, M_NOWAIT); if (request == NULL) { ISCSI_SESSION_WARN(is, "failed to allocate PDU"); return; @@ -811,7 +811,7 @@ iscsi_pdu_handle_nop_in(struct icl_pdu * icl_pdu_get_data(response, 0, data, datasize); } - request = icl_pdu_new_bhs(response->ip_conn, M_NOWAIT); + request = icl_pdu_new(response->ip_conn, M_NOWAIT); if (request == NULL) { ISCSI_SESSION_WARN(is, "failed to allocate memory; " "reconnecting"); @@ -1179,7 +1179,7 @@ iscsi_pdu_handle_r2t(struct icl_pdu *res return; } - request = icl_pdu_new_bhs(response->ip_conn, M_NOWAIT); + request = icl_pdu_new(response->ip_conn, M_NOWAIT); if (request == NULL) { icl_pdu_free(response); iscsi_session_reconnect(is); @@ -1583,7 +1583,7 @@ iscsi_ioctl_daemon_send(struct iscsi_sof } } - ip = icl_pdu_new_bhs(is->is_conn, M_WAITOK); + ip = icl_pdu_new(is->is_conn, M_WAITOK); memcpy(ip->ip_bhs, ids->ids_bhs, sizeof(*ip->ip_bhs)); if (datalen > 0) { error = icl_pdu_append_data(ip, data, datalen, M_WAITOK); @@ -2067,7 +2067,7 @@ iscsi_action_abort(struct iscsi_session return; } - request = icl_pdu_new_bhs(is->is_conn, M_NOWAIT); + request = icl_pdu_new(is->is_conn, M_NOWAIT); if (request == NULL) { ccb->ccb_h.status = CAM_RESRC_UNAVAIL; xpt_done(ccb); @@ -2121,7 +2121,7 @@ iscsi_action_scsiio(struct iscsi_session } #endif - request = icl_pdu_new_bhs(is->is_conn, M_NOWAIT); + request = icl_pdu_new(is->is_conn, M_NOWAIT); if (request == NULL) { if ((ccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { xpt_freeze_devq(ccb->ccb_h.path, 1);