From owner-freebsd-fs@FreeBSD.ORG Fri Mar 25 13:43:06 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 470A6106566B; Fri, 25 Mar 2011 13:43:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id BF6C78FC1D; Fri, 25 Mar 2011 13:43:05 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p2PDh1Gd055599 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 25 Mar 2011 15:43:01 +0200 (EET) (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.4/8.14.4) with ESMTP id p2PDh1eO041844; Fri, 25 Mar 2011 15:43:01 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p2PDh1HG041843; Fri, 25 Mar 2011 15:43:01 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 25 Mar 2011 15:43:01 +0200 From: Kostik Belousov To: John Baldwin Message-ID: <20110325134301.GM78089@deviant.kiev.zoral.com.ua> References: <20110325005923.GI78089@deviant.kiev.zoral.com.ua> <201103250814.47903.jhb@freebsd.org> <20110325123422.GK78089@deviant.kiev.zoral.com.ua> <201103250936.56512.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3azwYLLVmtMtZFH5" Content-Disposition: inline In-Reply-To: <201103250936.56512.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-fs@freebsd.org Subject: Re: O_CLOEXEC X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 13:43:06 -0000 --3azwYLLVmtMtZFH5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 25, 2011 at 09:36:56AM -0400, John Baldwin wrote: > On Friday, March 25, 2011 8:34:22 am Kostik Belousov wrote: > > On Fri, Mar 25, 2011 at 08:14:47AM -0400, John Baldwin wrote: > > > On Thursday, March 24, 2011 8:59:24 pm Kostik Belousov wrote: > > > > Hi, > > > > below is the implementation of O_CLOEXEC flag for open(2). I also > > > > handle the fhopen(2), since the man page states that fhopen(2) takes > > > > the same flags as open(2), and it is more logical to change code > > > > then man page. > > > >=20 > > > > It is somewhat curious that SUSv4 did not specified O_CLOEXEC behav= iour > > > > for posix_openpt(). I left it out, but it probably makes sense to > > > > allow O_CLOEXEC there ? > > > >=20 > > > > The falloc() KPI is left as is because the function is often used > > > > in the kernel and probably in the third-party modules. fdallocf() > > > > takes additional flag argument to set close-on-exec before any other > > > > thread might see new file descriptor. > > >=20 > > > Hmm, I don't actually expect falloc() to be used in 3rd party modules= and=20 > > > would be fine with just adding a new flags parameter to it. > >=20 > > The calls to falloc() appear in such modules as cryptodev(4). > > I do not mind changing falloc interface, but I also intend to merge > > O_CLOEXEC to stable/8. Are you fine with merging your suggestion to > > stable branch, while falloc() is called from cryptodev, zlib, > > linux (later is not a big issue if I bump __FreeBSD_version) ? >=20 > Hmmm, there are a few ways, but perhaps the simplest is to commit the > current approach (and MFC it), but to do a followup commit to HEAD to > remove fallocf() and add the flags argument to falloc(). That changes > the KPI for 9+, but avoids growing the future KPI. I will do this, thanks. --3azwYLLVmtMtZFH5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk2Mm+UACgkQC3+MBN1Mb4iSxgCfWL/xnze3fi8GDtAjYrji7GXD vg0AniEHyvVJVlGL7WOEL2jG3JCe8mo6 =zP3o -----END PGP SIGNATURE----- --3azwYLLVmtMtZFH5--