Explicitly set the sector state to JUNK if we encounter a read-error.
This commit is contained in:
parent
01dfc1deae
commit
d8e7c92c9e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=114148
@ -479,7 +479,10 @@ g_bde_read_done(struct bio *bp)
|
||||
sc = bp->bio_caller2;
|
||||
mtx_lock(&sc->worklist_mutex);
|
||||
sp->error = bp->bio_error;
|
||||
sp->state = VALID;
|
||||
if (sp->error == 0)
|
||||
sp->state = VALID;
|
||||
else
|
||||
sp->state = JUNK;
|
||||
wakeup(sc);
|
||||
g_destroy_bio(bp);
|
||||
mtx_unlock(&sc->worklist_mutex);
|
||||
|
Loading…
Reference in New Issue
Block a user