From owner-svn-src-all@freebsd.org Fri Dec 15 19:14:22 2017 Return-Path: Delivered-To: svn-src-all@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 63029E89B3B; Fri, 15 Dec 2017 19:14:22 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 2D9EA2101; Fri, 15 Dec 2017 19:14:22 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBFJELaU040501; Fri, 15 Dec 2017 19:14:21 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBFJELDM040500; Fri, 15 Dec 2017 19:14:21 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712151914.vBFJELDM040500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 15 Dec 2017 19:14:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326882 - head/sys/geom/mirror X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/geom/mirror X-SVN-Commit-Revision: 326882 X-SVN-Commit-Repository: base 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.25 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: Fri, 15 Dec 2017 19:14:22 -0000 Author: markj Date: Fri Dec 15 19:14:21 2017 New Revision: 326882 URL: https://svnweb.freebsd.org/changeset/base/326882 Log: Give a couple of predication functions a bool return type. No functional change intended. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Fri Dec 15 19:03:03 2017 (r326881) +++ head/sys/geom/mirror/g_mirror.c Fri Dec 15 19:14:21 2017 (r326882) @@ -1204,7 +1204,7 @@ g_mirror_start(struct bio *bp) * Return TRUE if the given request is colliding with a in-progress * synchronization request. */ -static int +static bool g_mirror_sync_collision(struct g_mirror_softc *sc, struct bio *bp) { struct g_mirror_disk *disk; @@ -1213,7 +1213,7 @@ g_mirror_sync_collision(struct g_mirror_softc *sc, str u_int i; if (sc->sc_sync.ds_ndisks == 0) - return (0); + return (false); rstart = bp->bio_offset; rend = bp->bio_offset + bp->bio_length; LIST_FOREACH(disk, &sc->sc_disks, d_next) { @@ -1226,33 +1226,33 @@ g_mirror_sync_collision(struct g_mirror_softc *sc, str sstart = sbp->bio_offset; send = sbp->bio_offset + sbp->bio_length; if (rend > sstart && rstart < send) - return (1); + return (true); } } - return (0); + return (false); } /* * Return TRUE if the given sync request is colliding with a in-progress regular * request. */ -static int +static bool g_mirror_regular_collision(struct g_mirror_softc *sc, struct bio *sbp) { off_t rstart, rend, sstart, send; struct bio *bp; if (sc->sc_sync.ds_ndisks == 0) - return (0); + return (false); sstart = sbp->bio_offset; send = sbp->bio_offset + sbp->bio_length; TAILQ_FOREACH(bp, &sc->sc_inflight.queue, bio_queue) { rstart = bp->bio_offset; rend = bp->bio_offset + bp->bio_length; if (rend > sstart && rstart < send) - return (1); + return (true); } - return (0); + return (false); } /*