Remove debugging printf.

Instead, issue a diagnostic and return appropriate error if
ncl_flush() was unable to clean buffer queue after the specified
number or retries.

Reviewed by:	rmacklem
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
This commit is contained in:
Konstantin Belousov 2017-04-11 08:29:12 +00:00
parent 82bd08ee81
commit 6627d919de

View File

@ -2971,15 +2971,18 @@ ncl_flush(struct vnode *vp, int waitfor, struct ucred *cred, struct thread *td,
free(bvec, M_TEMP);
if (error == 0 && commit != 0 && waitfor == MNT_WAIT &&
(bo->bo_dirty.bv_cnt != 0 || bo->bo_numoutput != 0 ||
np->n_directio_asyncwr != 0) && trycnt++ < 5) {
np->n_directio_asyncwr != 0)) {
if (trycnt++ < 5) {
/* try, try again... */
passone = 1;
wcred = NULL;
bvec = NULL;
bvecsize = 0;
printf("try%d\n", trycnt);
goto again;
}
vn_printf(vp, "ncl_flush failed");
error = called_from_renewthread != 0 ? EIO : EBUSY;
}
return (error);
}