summaryrefslogtreecommitdiffstats
path: root/sys/geom/bde
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-04-25 21:43:11 +0000
committerphk <phk@FreeBSD.org>2003-04-25 21:43:11 +0000
commit876e7e7a6d855d35156801b21d804bda4722d8db (patch)
tree7e51d3f90bd343bce374a01b748a31a609bace4f /sys/geom/bde
parent82e4f296ffa08c58666099c9917ecbc998d24d2b (diff)
downloadFreeBSD-src-876e7e7a6d855d35156801b21d804bda4722d8db.zip
FreeBSD-src-876e7e7a6d855d35156801b21d804bda4722d8db.tar.gz
Do an explicit retry after we have dumped the cache, rather than a
(potential) tail recursion.
Diffstat (limited to 'sys/geom/bde')
-rw-r--r--sys/geom/bde/g_bde_work.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/geom/bde/g_bde_work.c b/sys/geom/bde/g_bde_work.c
index 1093566..6b5d763 100644
--- a/sys/geom/bde/g_bde_work.c
+++ b/sys/geom/bde/g_bde_work.c
@@ -251,15 +251,12 @@ g_bde_get_sector(struct g_bde_work *wp, off_t offset)
if (sp != NULL) {
TAILQ_REMOVE(&sc->freelist, sp, list);
TAILQ_INSERT_TAIL(&sc->freelist, sp, list);
+ sp->used = time_uptime;
}
wp->ksp = sp;
if (sp == NULL) {
g_bde_purge_sector(sc, -1);
- sp = g_bde_get_sector(wp, offset);
}
- if (sp != NULL)
- sp->used = time_uptime;
- KASSERT(sp != NULL, ("get_sector failed"));
return(sp);
}
@@ -337,6 +334,8 @@ g_bde_read_keysector(struct g_bde_softc *sc, struct g_bde_work *wp)
g_trace(G_T_TOPOLOGY, "g_bde_read_keysector(%p)", wp);
sp = g_bde_get_sector(wp, wp->kso);
if (sp == NULL)
+ sp = g_bde_get_sector(wp, wp->kso);
+ if (sp == NULL)
return (sp);
if (sp->owner != wp)
return (sp);
OpenPOWER on IntegriCloud