Use sc->sc_mediasize instead of sc->sc_provider->mediasize which contains

exactly the same value, but is shorter.
This commit is contained in:
Pawel Jakub Dawidek 2004-08-28 02:35:43 +00:00
parent 08249e9e6e
commit c0d68b6ef2

View File

@ -1332,7 +1332,7 @@ g_raid3_sync_request(struct bio *bp)
disk->d_sync.ds_offset_done = bp->bio_offset + bp->bio_length;
g_destroy_bio(bp);
if (disk->d_sync.ds_offset_done ==
sc->sc_provider->mediasize / (sc->sc_ndisks - 1)) {
sc->sc_mediasize / (sc->sc_ndisks - 1)) {
/*
* Disk up-to-date, activate it.
*/
@ -1649,7 +1649,7 @@ g_raid3_worker(void *arg)
nreqs = 0;
disk = sc->sc_syncdisk;
if (disk->d_sync.ds_offset <
sc->sc_provider->mediasize / (sc->sc_ndisks - 1) &&
sc->sc_mediasize / (sc->sc_ndisks - 1) &&
disk->d_sync.ds_offset ==
disk->d_sync.ds_offset_done) {
g_raid3_sync_one(sc);
@ -2816,8 +2816,7 @@ g_raid3_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp,
else {
sbuf_printf(sb, "%u%%",
(u_int)((disk->d_sync.ds_offset_done * 100) /
(sc->sc_provider->mediasize /
(sc->sc_ndisks - 1))));
(sc->sc_mediasize / (sc->sc_ndisks - 1))));
}
sbuf_printf(sb, "</Synchronized>\n");
}