mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04: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:
parent
204d94f161
commit
68eadcec0f
1 changed files with 8 additions and 8 deletions
|
|
@ -1204,7 +1204,7 @@ g_mirror_start(struct bio *bp)
|
||||||
* Return TRUE if the given request is colliding with a in-progress
|
* Return TRUE if the given request is colliding with a in-progress
|
||||||
* synchronization request.
|
* synchronization request.
|
||||||
*/
|
*/
|
||||||
static int
|
static bool
|
||||||
g_mirror_sync_collision(struct g_mirror_softc *sc, struct bio *bp)
|
g_mirror_sync_collision(struct g_mirror_softc *sc, struct bio *bp)
|
||||||
{
|
{
|
||||||
struct g_mirror_disk *disk;
|
struct g_mirror_disk *disk;
|
||||||
|
|
@ -1213,7 +1213,7 @@ g_mirror_sync_collision(struct g_mirror_softc *sc, struct bio *bp)
|
||||||
u_int i;
|
u_int i;
|
||||||
|
|
||||||
if (sc->sc_sync.ds_ndisks == 0)
|
if (sc->sc_sync.ds_ndisks == 0)
|
||||||
return (0);
|
return (false);
|
||||||
rstart = bp->bio_offset;
|
rstart = bp->bio_offset;
|
||||||
rend = bp->bio_offset + bp->bio_length;
|
rend = bp->bio_offset + bp->bio_length;
|
||||||
LIST_FOREACH(disk, &sc->sc_disks, d_next) {
|
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;
|
sstart = sbp->bio_offset;
|
||||||
send = sbp->bio_offset + sbp->bio_length;
|
send = sbp->bio_offset + sbp->bio_length;
|
||||||
if (rend > sstart && rstart < send)
|
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
|
* Return TRUE if the given sync request is colliding with a in-progress regular
|
||||||
* request.
|
* request.
|
||||||
*/
|
*/
|
||||||
static int
|
static bool
|
||||||
g_mirror_regular_collision(struct g_mirror_softc *sc, struct bio *sbp)
|
g_mirror_regular_collision(struct g_mirror_softc *sc, struct bio *sbp)
|
||||||
{
|
{
|
||||||
off_t rstart, rend, sstart, send;
|
off_t rstart, rend, sstart, send;
|
||||||
struct bio *bp;
|
struct bio *bp;
|
||||||
|
|
||||||
if (sc->sc_sync.ds_ndisks == 0)
|
if (sc->sc_sync.ds_ndisks == 0)
|
||||||
return (0);
|
return (false);
|
||||||
sstart = sbp->bio_offset;
|
sstart = sbp->bio_offset;
|
||||||
send = sbp->bio_offset + sbp->bio_length;
|
send = sbp->bio_offset + sbp->bio_length;
|
||||||
TAILQ_FOREACH(bp, &sc->sc_inflight.queue, bio_queue) {
|
TAILQ_FOREACH(bp, &sc->sc_inflight.queue, bio_queue) {
|
||||||
rstart = bp->bio_offset;
|
rstart = bp->bio_offset;
|
||||||
rend = bp->bio_offset + bp->bio_length;
|
rend = bp->bio_offset + bp->bio_length;
|
||||||
if (rend > sstart && rstart < send)
|
if (rend > sstart && rstart < send)
|
||||||
return (1);
|
return (true);
|
||||||
}
|
}
|
||||||
return (0);
|
return (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue