From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 01:08:55 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC5EB106566C; Sun, 1 Nov 2009 01:08:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 9D0BB8FC0A; Sun, 1 Nov 2009 01:08:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id nA113cub047894; Sat, 31 Oct 2009 19:03:38 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 31 Oct 2009 19:03:53 -0600 (MDT) Message-Id: <20091031.190353.-332187386.imp@bsdimp.com> To: ed@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <200910311035.n9VAZfIb082932@svn.freebsd.org> References: <200910311035.n9VAZfIb082932@svn.freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r198706 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2009 01:08:56 -0000 In message: <200910311035.n9VAZfIb082932@svn.freebsd.org> Ed Schouten writes: : Author: ed : Date: Sat Oct 31 10:35:41 2009 : New Revision: 198706 : URL: http://svn.freebsd.org/changeset/base/198706 : : Log: : Turn unused structure fields of cdevsw into spares. : : d_uid, d_gid and d_mode are unused, because permissions are stored in : cdevpriv nowadays. d_kind doesn't seem to be used at all. We no longer : keep a list of cdevsw's, so d_list is also unused. : : uid_t and gid_t are 32 bits, but mode_t is 16 bits, Because of alignment : constraints of d_kind, we can safely turn it into three 32-bit integers. : d_kind and d_list is equal in size to three pointers. : : Discussed with: kib Don't we need a D_VERSION bump for this? Warner : Modified: : head/sys/sys/conf.h : : Modified: head/sys/sys/conf.h : ============================================================================== : --- head/sys/sys/conf.h Sat Oct 31 09:03:48 2009 (r198705) : +++ head/sys/sys/conf.h Sat Oct 31 10:35:41 2009 (r198706) : @@ -210,15 +210,13 @@ struct cdevsw { : d_kqfilter_t *d_kqfilter; : d_purge_t *d_purge; : d_mmap_single_t *d_mmap_single; : - uid_t d_uid; : - gid_t d_gid; : - mode_t d_mode; : - const char *d_kind; : + : + int32_t d_spare0[3]; : + void *d_spare1[3]; : : /* These fields should not be messed with by drivers */ : - LIST_ENTRY(cdevsw) d_list; : LIST_HEAD(, cdev) d_devs; : - int d_spare3; : + int d_spare2; : union { : struct cdevsw *gianttrick; : SLIST_ENTRY(cdevsw) postfree_list; :