From owner-freebsd-arch@FreeBSD.ORG Mon May 19 15:38:26 2008 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 737821065670; Mon, 19 May 2008 15:38:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from anti-4.kiev.sovam.com (anti-4.kiev.sovam.com [62.64.120.202]) by mx1.freebsd.org (Postfix) with ESMTP id 062C78FC20; Mon, 19 May 2008 15:38:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from [212.82.216.226] (helo=skuns.kiev.zoral.com.ua) by anti-4.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1Jy7RP-000Lhm-GN; Mon, 19 May 2008 18:38:24 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by skuns.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m4JFcDHG046117 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 19 May 2008 18:38:13 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m4JFcBIw063997; Mon, 19 May 2008 18:38:12 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m4JFcBok063963; Mon, 19 May 2008 18:38:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 19 May 2008 18:38:11 +0300 From: Kostik Belousov To: John Baldwin Message-ID: <20080519153811.GF18958@deviant.kiev.zoral.com.ua> References: <20080504171002.GN18958@deviant.kiev.zoral.com.ua> <200805150730.08418.jhb@freebsd.org> <20080515123055.GY18958@deviant.kiev.zoral.com.ua> <200805191015.35212.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cFNKpmRZAEW/8NI5" Content-Disposition: inline In-Reply-To: <200805191015.35212.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on skuns.kiev.zoral.com.ua X-Scanner-Signature: 1e0f9aa0c43ce3c3744db576a35a93a3 X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 2844 [May 13 2008] X-SpamTest-Info: helo_type=3 X-SpamTest-Method: none X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release Cc: freebsd-arch@freebsd.org Subject: Re: Per-open file private data for the cdevs X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2008 15:38:26 -0000 --cFNKpmRZAEW/8NI5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 19, 2008 at 10:15:34AM -0400, John Baldwin wrote: > On Thursday 15 May 2008 08:30:55 am Kostik Belousov wrote: > > On Thu, May 15, 2008 at 07:30:07AM -0400, John Baldwin wrote: > > > On Wednesday 14 May 2008 05:32:23 am Kostik Belousov wrote: > > > > So, I cannot implement overlay of the cdevpriv over the seqaccess d= ata > > > > without some additional flag. On the other hand, use of 2 bytes for= the > > > > f_type is overkill when the range of the types is [1,8]. I divided = it > > > > to two one-byte fields, and new field is used for filetype-specific > > > > flags. > > > > > > > > http://people.freebsd.org/~kib/misc/fdpriv.4.patch > > > > shall give the same size of the struct file while not causing > > > > unconditional acquire of the cdevpriv_mtx on the last file close. > > > > > > > > Jeff, do you agree with the proposed vivisection of the f_type ? I = will > > > > ask Peter to retest the patch then. > > > > > > I would rather add the new pointer to struct file and avoid breaking = the > > > ABI of fstat. That is, I would like this patch to be MFCable, but you > > > can't MFC this w/o breaking the ABI of struct file since fstat(1) wil= l be > > > reading the full short to get the DTYPE. > > > > Oh, I thought that fstat uses struct xfile, at least for live systems. > > > > I considered to introduce new f_type value for devfs files; the > > DTYPE_VNODE is not a complete truth due to custom f_ops. But DTYPE_VNODE > > is special-cased in enough locations to make this much less preferrable > > then another pointer. >=20 > fstat always uses libkvm and direct access unfortunately. Also, I greatl= y=20 > care about fstat on crash dumps as well. :) So, what is the conclusion ? Does anybody have any further objections against committing http://people.freebsd.org/~kib/misc/fdpriv.3.patch I plan to do it this week. --cFNKpmRZAEW/8NI5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkgxnuIACgkQC3+MBN1Mb4h2lQCdFGNSaMyPkb0cmQoAzTcVpOIy LO4AoIChArjNOp/hkW/7j87/sZ28jh3n =B4L0 -----END PGP SIGNATURE----- --cFNKpmRZAEW/8NI5--