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

Decrement sc_writes when BIO_DELETE requests complete.

Otherwise a gmirror that has received a BIO_DELETE request will never be
marked clean (unless sc_writes overflows).

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
This commit is contained in:
Mark Johnston 2017-12-12 17:24:30 +00:00
parent 6e16d0bc43
commit a3584ee355
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326796

View File

@ -937,7 +937,7 @@ g_mirror_regular_request(struct bio *bp)
pbp = bp->bio_parent;
sc = pbp->bio_to->private;
bp->bio_from->index--;
if (bp->bio_cmd == BIO_WRITE)
if (bp->bio_cmd == BIO_WRITE || bp->bio_cmd == BIO_DELETE)
sc->sc_writes--;
disk = bp->bio_from->private;
if (disk == NULL) {