From owner-svn-src-all@freebsd.org Fri Jun 21 08:24:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D31F715D45BC; Fri, 21 Jun 2019 08:24:52 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 4AF4F8635A; Fri, 21 Jun 2019 08:24:52 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 4D89D14A175; Fri, 21 Jun 2019 18:24:49 +1000 (AEST) Date: Fri, 21 Jun 2019 18:24:47 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh cc: Bruce Evans , Alan Somers , Ian Lepore , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r349233 - head/sys/sys In-Reply-To: Message-ID: <20190621181031.X814@besplex.bde.org> References: <201906201435.x5KEZTqH021513@repo.freebsd.org> <54f3bc97cbb485cdcc44b81c82c149ac9e46d42f.camel@freebsd.org> <20190621013236.N5105@besplex.bde.org> <20190621033049.D5823@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=D+Q3ErZj c=1 sm=1 tr=0 cx=a_idp_d a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=Y7VpVtdrFqipLqLOIW4A:9 a=CjuIK1q_8ugA:10 X-Rspamd-Queue-Id: 4AF4F8635A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.92 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.92)[-0.919,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 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: Fri, 21 Jun 2019 08:24:53 -0000 On Thu, 20 Jun 2019, Warner Losh wrote: > On Thu, Jun 20, 2019, 11:44 AM Bruce Evans wrote: > >> On Thu, 20 Jun 2019, Alan Somers wrote: >> >>> On Thu, Jun 20, 2019 at 10:43 AM Bruce Evans >> wrote: >>>> Summary: and the headers that it includes should declare >>>> minimal types to compile (so __int64_t is enough). Most uses of this >>>> header require including domain-specific headers which declare the >>>> relevant data structures. >>> >>> Bruce, would you be satisfied by switching from to >>> and from int64_t to __int64_t? >> >> Not quite. The kernel block number type is daddr_t, and [__]int64_t is >> a hard coding of that. Hard-coding of typedefs is good for reducing >> namespace pollution, but it is not done for the nearby use of off_t. >> >> Unfortunately, daddr_t is only declared in . >> >> [... related type/units errors in ffs and ext2fs] >> Using a generic int64_t type in all interfaces would avoid some of these >> bugs, so I don't mind using it for the API. Just add a note that it must >> be large enough to represent all useful values of daddr_t. > > Maybe we should add a __daddr_t define to sys/_types.h? And the usual > reshuffling. That would also fix the namespace pollution. OK. ABI's should use only fixed-width types to be stable, and APIs should use only basic types to be stable, but avoiding typedefs (except to fixed- width types) would be a larger project, with few existing examples. Bruce