Do not use waitable allocation of pbuf when creating cluster for write.

Previously just ensuring that we do not sleep when clustering for
md(4) vnode was enough.  Now, with the switch of the pbuf allocator to
uma and completely broken per-subsystem pbuf limits, it might cause
unbounded sleep even for non-md(4) vnodes.

Reported and tested by:	pho
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D22899
This commit is contained in:
Konstantin Belousov 2019-12-23 20:15:19 +00:00
parent e41d62768d
commit 52f3524cfd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=356038

View File

@ -865,8 +865,7 @@ cluster_wbuild(struct vnode *vp, long size, daddr_t start_lbn, int len,
(tbp->b_bcount != tbp->b_bufsize) ||
(tbp->b_bcount != size) ||
(len == 1) ||
((bp = uma_zalloc(cluster_pbuf_zone,
(vp->v_vflag & VV_MD) != 0 ? M_NOWAIT : M_WAITOK)) == NULL)) {
((bp = uma_zalloc(cluster_pbuf_zone, M_NOWAIT)) == NULL)) {
totalwritten += tbp->b_bufsize;
bawrite(tbp);
++start_lbn;