svn commit: r326882 - head/sys/geom/mirror
Mark Johnston
markj at FreeBSD.org
Fri Dec 15 19:14:22 UTC 2017
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);
}
/*
More information about the svn-src-all
mailing list