Date: Thu, 15 May 2008 15:30:55 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: John Baldwin <jhb@freebsd.org> Cc: freebsd-arch@freebsd.org Subject: Re: Per-open file private data for the cdevs Message-ID: <20080515123055.GY18958@deviant.kiev.zoral.com.ua> In-Reply-To: <200805150730.08418.jhb@freebsd.org> References: <20080504171002.GN18958@deviant.kiev.zoral.com.ua> <20080513093734.GF18958@deviant.kiev.zoral.com.ua> <20080514093223.GN18958@deviant.kiev.zoral.com.ua> <200805150730.08418.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--8L/iE/qKZ3QnHSPo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 data= =20 > > 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. > >=20 > > http://people.freebsd.org/~kib/misc/fdpriv.4.patch > > shall give the same size of the struct file while not causing unconditi= onal > > acquire of the cdevpriv_mtx on the last file close. > >=20 > > Jeff, do you agree with the proposed vivisection of the f_type ? I will > > ask Peter to retest the patch then. >=20 > I would rather add the new pointer to struct file and avoid breaking the = ABI=20 > of fstat. That is, I would like this patch to be MFCable, but you can't = MFC=20 > this w/o breaking the ABI of struct file since fstat(1) will be reading t= he=20 > 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. --8L/iE/qKZ3QnHSPo Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkgsLP4ACgkQC3+MBN1Mb4g/lwCdGrz0F3zj0/usD4Fotd+u648k ysEAnjOqweaWFZFNBqpBiBXDPcKLdf6e =LG2H -----END PGP SIGNATURE----- --8L/iE/qKZ3QnHSPo--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080515123055.GY18958>