1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Give a couple of predication functions a bool return type.

No functional change intended.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
This commit is contained in:
Mark Johnston 2017-12-15 19:14:21 +00:00
parent 204d94f161
commit 68eadcec0f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326882

View File

@ -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, struct bio *bp)
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, struct bio *bp)
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);
}
/*