Date: Tue, 12 Mar 2013 08:59:51 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248188 - in head/sys: dev/iscsi/initiator fs/nfs xdr Message-ID: <201303120859.r2C8xpa6007963@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Tue Mar 12 08:59:51 2013 New Revision: 248188 URL: http://svnweb.freebsd.org/changeset/base/248188 Log: Finish r243882: mechanically substitute flags from historic mbuf allocator with malloc(9) flags within sys. Sponsored by: Nginx, Inc. Modified: head/sys/dev/iscsi/initiator/isc_soc.c head/sys/fs/nfs/nfsport.h head/sys/xdr/xdr_mbuf.c Modified: head/sys/dev/iscsi/initiator/isc_soc.c ============================================================================== --- head/sys/dev/iscsi/initiator/isc_soc.c Tue Mar 12 08:45:42 2013 (r248187) +++ head/sys/dev/iscsi/initiator/isc_soc.c Tue Mar 12 08:59:51 2013 (r248188) @@ -91,7 +91,7 @@ isc_sendPDU(isc_session_t *sp, pduq_t *p /* | mbuf for the iSCSI header */ - MGETHDR(mh, M_TRYWAIT, MT_DATA); + MGETHDR(mh, M_WAITOK, MT_DATA); mh->m_pkthdr.rcvif = NULL; mh->m_next = NULL; mh->m_len = sizeof(union ipdu_u); @@ -132,7 +132,7 @@ isc_sendPDU(isc_session_t *sp, pduq_t *p while(len > 0) { int l; - MGET(md, M_TRYWAIT, MT_DATA); + MGET(md, M_WAITOK, MT_DATA); md->m_ext.ref_cnt = &ou_refcnt; l = min(MCLBYTES, len); debug(4, "setting ext_free(arg=%p len/l=%d/%d)", pq->buf, len, l); @@ -150,7 +150,7 @@ isc_sendPDU(isc_session_t *sp, pduq_t *p off += l; } if(((pp->ds_len & 03) != 0) || ISOK2DIG(sp->dataDigest, pp)) { - MGET(md, M_TRYWAIT, MT_DATA); + MGET(md, M_WAITOK, MT_DATA); if(pp->ds_len & 03) len = 4 - (pp->ds_len & 03); else Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Tue Mar 12 08:45:42 2013 (r248187) +++ head/sys/fs/nfs/nfsport.h Tue Mar 12 08:59:51 2013 (r248188) @@ -140,32 +140,32 @@ * Allocate mbufs. Must succeed and never set the mbuf ptr to NULL. */ #define NFSMGET(m) do { \ - MGET((m), M_TRYWAIT, MT_DATA); \ + MGET((m), M_WAITOK, MT_DATA); \ while ((m) == NULL ) { \ (void) nfs_catnap(PZERO, 0, "nfsmget"); \ - MGET((m), M_TRYWAIT, MT_DATA); \ + MGET((m), M_WAITOK, MT_DATA); \ } \ } while (0) #define NFSMGETHDR(m) do { \ - MGETHDR((m), M_TRYWAIT, MT_DATA); \ + MGETHDR((m), M_WAITOK, MT_DATA); \ while ((m) == NULL ) { \ (void) nfs_catnap(PZERO, 0, "nfsmget"); \ - MGETHDR((m), M_TRYWAIT, MT_DATA); \ + MGETHDR((m), M_WAITOK, MT_DATA); \ } \ } while (0) #define NFSMCLGET(m, w) do { \ - MGET((m), M_TRYWAIT, MT_DATA); \ + MGET((m), M_WAITOK, MT_DATA); \ while ((m) == NULL ) { \ (void) nfs_catnap(PZERO, 0, "nfsmget"); \ - MGET((m), M_TRYWAIT, MT_DATA); \ + MGET((m), M_WAITOK, MT_DATA); \ } \ MCLGET((m), (w)); \ } while (0) #define NFSMCLGETHDR(m, w) do { \ - MGETHDR((m), M_TRYWAIT, MT_DATA); \ + MGETHDR((m), M_WAITOK, MT_DATA); \ while ((m) == NULL ) { \ (void) nfs_catnap(PZERO, 0, "nfsmget"); \ - MGETHDR((m), M_TRYWAIT, MT_DATA); \ + MGETHDR((m), M_WAITOK, MT_DATA); \ } \ } while (0) #define NFSMTOD mtod Modified: head/sys/xdr/xdr_mbuf.c ============================================================================== --- head/sys/xdr/xdr_mbuf.c Tue Mar 12 08:45:42 2013 (r248187) +++ head/sys/xdr/xdr_mbuf.c Tue Mar 12 08:59:51 2013 (r248188) @@ -228,9 +228,9 @@ xdrmbuf_putbytes(XDR *xdrs, const char * if (xdrs->x_handy == m->m_len && M_TRAILINGSPACE(m) == 0) { if (!m->m_next) { - MGET(n, M_TRYWAIT, m->m_type); + MGET(n, M_WAITOK, m->m_type); if (m->m_flags & M_EXT) - MCLGET(n, M_TRYWAIT); + MCLGET(n, M_WAITOK); m->m_next = n; } m = m->m_next;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303120859.r2C8xpa6007963>