From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 17:22:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 620EFEC; Wed, 7 Jan 2015 17:22:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 337431676; Wed, 7 Jan 2015 17:22:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t07HMwGV001818; Wed, 7 Jan 2015 17:22:58 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t07HMvoQ001815; Wed, 7 Jan 2015 17:22:57 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201501071722.t07HMvoQ001815@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Wed, 7 Jan 2015 17:22:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276780 - in head/sys: fs/nfs fs/nfsserver nfsserver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2015 17:22:58 -0000 Author: rwatson Date: Wed Jan 7 17:22:56 2015 New Revision: 276780 URL: https://svnweb.freebsd.org/changeset/base/276780 Log: Use M_SIZE() instead of hand-crafted (and mostly correct) NFSMSIZ() macro in the NFS server; garbage collect now-unused NFSMSIZ() and M_HASCL() macros. Also garbage collect now-unused versions in headers for the removed previous NFS client and server. Reviewed by: rmacklem Sponsored by: EMC / Isilon Storage Division Modified: head/sys/fs/nfs/nfsm_subs.h head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/nfsserver/nfsm_subs.h Modified: head/sys/fs/nfs/nfsm_subs.h ============================================================================== --- head/sys/fs/nfs/nfsm_subs.h Wed Jan 7 16:55:55 2015 (r276779) +++ head/sys/fs/nfs/nfsm_subs.h Wed Jan 7 17:22:56 2015 (r276780) @@ -46,9 +46,6 @@ /* * First define what the actual subs. return */ -#define M_HASCL(m) ((m)->m_flags & M_EXT) -#define NFSMSIZ(m) ((M_HASCL(m))?MCLBYTES: \ - (((m)->m_flags & M_PKTHDR)?MHLEN:MLEN)) #define NFSM_DATAP(m, s) (m)->m_data += (s) /* Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Wed Jan 7 16:55:55 2015 (r276779) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Wed Jan 7 17:22:56 2015 (r276780) @@ -575,7 +575,7 @@ nfsvno_readlink(struct vnode *vp, struct while (len < NFS_MAXPATHLEN) { NFSMGET(mp); MCLGET(mp, M_WAITOK); - mp->m_len = NFSMSIZ(mp); + mp->m_len = M_SIZE(mp); if (len == 0) { mp3 = mp2 = mp; } else { Modified: head/sys/nfsserver/nfsm_subs.h ============================================================================== --- head/sys/nfsserver/nfsm_subs.h Wed Jan 7 16:55:55 2015 (r276779) +++ head/sys/nfsserver/nfsm_subs.h Wed Jan 7 17:22:56 2015 (r276780) @@ -47,14 +47,6 @@ */ /* - * First define what the actual subs. return - */ - -#define M_HASCL(m) ((m)->m_flags & M_EXT) -#define NFSMSIZ(m) ((M_HASCL(m))?MCLBYTES: \ - (((m)->m_flags & M_PKTHDR)?MHLEN:MLEN)) - -/* * Now for the macros that do the simple stuff and call the functions * for the hard stuff. * These macros use several vars. declared in nfsm_reqhead and these