[{"id":1765271,"web_url":"http://patchwork.ozlabs.org/comment/1765271/","msgid":"<20170908114547.GA12992@altlinux.org>","list_archive_url":null,"date":"2017-09-08T11:45:47","subject":"Re: Add Linux 4.13 constants to bits/fcntl-linux.h","submitter":{"id":16038,"url":"http://patchwork.ozlabs.org/api/people/16038/","name":"Dmitry V. Levin","email":"ldv@altlinux.org"},"content":"On Thu, Sep 07, 2017 at 09:06:18PM +0000, Joseph Myers wrote:\n> This patch, relative to a tree with\n> <https://sourceware.org/ml/libc-alpha/2017-09/msg00266.html> (pending\n> review) applied (but with only trivial dependence on that patch by\n> virtue of changing adjacent code), adds new interfaces (F_GET_RW_HINT\n> etc., and associated RW[FH]_WRITE_LIFE_*) from Linux 4.13 to\n> bits/fcntl-linux.h (conditional on __USE_GNU).\n> \n> Tested for x86_64.\n> \n> 2017-09-07  Joseph Myers  <joseph@codesourcery.com>\n> \n> \t* sysdeps/unix/sysv/linux/bits/fcntl-linux.h [__USE_GNU]\n> \t(F_GET_RW_HINT): New macro.\n> \t[__USE_GNU] (F_SET_RW_HINT): Likewise.\n> \t[__USE_GNU] (F_GET_FILE_RW_HINT): Likewise.\n> \t[__USE_GNU] (F_SET_FILE_RW_HINT): Likewise.\n> \t[__USE_GNU] (RWF_WRITE_LIFE_NOT_SET): Likewise.\n> \t[__USE_GNU] (RWH_WRITE_LIFE_NONE): Likewise.\n> \t[__USE_GNU] (RWH_WRITE_LIFE_SHORT): Likewise.\n> \t[__USE_GNU] (RWH_WRITE_LIFE_MEDIUM): Likewise.\n> \t[__USE_GNU] (RWH_WRITE_LIFE_LONG): Likewise.\n> \t[__USE_GNU] (RWH_WRITE_LIFE_EXTREME): Likewise.\n> \n> diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h\n> index fc65fc2..0c1a303 100644\n> --- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h\n> +++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h\n> @@ -204,6 +204,11 @@\n>  # define F_GETPIPE_SZ\t1032\t/* Set pipe page size array.  */\n>  # define F_ADD_SEALS\t1033\t/* Add seals to file.  */\n>  # define F_GET_SEALS\t1034\t/* Get seals for file.  */\n> +/* Set / get write life time hints.  */\n> +# define F_GET_RW_HINT\t1035\n> +# define F_SET_RW_HINT\t1036\n> +# define F_GET_FILE_RW_HINT\t1037\n> +# define F_SET_FILE_RW_HINT\t1038\n>  #endif\n>  #ifdef __USE_XOPEN2K8\n>  # define F_DUPFD_CLOEXEC 1030\t/* Duplicate file descriptor with\n> @@ -281,6 +286,16 @@ struct f_owner_ex\n>  # define F_SEAL_WRITE\t0x0008\t/* Prevent writes.  */\n>  #endif\n>  \n> +#ifdef __USE_GNU\n> +/* Hint values for F_{GET,SET}_RW_HINT.  */\n> +# define RWF_WRITE_LIFE_NOT_SET\t0\n> +# define RWH_WRITE_LIFE_NONE\t1\n> +# define RWH_WRITE_LIFE_SHORT\t2\n> +# define RWH_WRITE_LIFE_MEDIUM\t3\n> +# define RWH_WRITE_LIFE_LONG\t4\n> +# define RWH_WRITE_LIFE_EXTREME\t5\n> +#endif\n> +\n\nI bet these RWF/RWH names are going to be a source of confusion.  Said\nthat, if they are not going to be renamed in linux headers in the nearest\nfuture, then the patch is OK.","headers":{"Return-Path":"<libc-alpha-return-84379-incoming=patchwork.ozlabs.org@sourceware.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list libc-alpha@sourceware.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=sourceware.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=libc-alpha-return-84379-incoming=patchwork.ozlabs.org@sourceware.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tsecure) header.d=sourceware.org header.i=@sourceware.org\n\theader.b=\"RU2qwDml\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xpb9y2Gzbz9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 21:45:58 +1000 (AEST)","(qmail 80881 invoked by alias); 8 Sep 2017 11:45:51 -0000","(qmail 80871 invoked by uid 89); 8 Sep 2017 11:45:51 -0000"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:date:from:to:subject:message-id:references\n\t:mime-version:content-type:in-reply-to; q=dns; s=default; b=ajrA\n\t/ZGmGBL5YKiFllZfeVjc8s9h/L0UCMa02eKTpsQUeWRICuMOuiE/j2n0FbSPaZLa\n\tobUR2vGnYzkwORAmk8TMsb2wgpOWqYYbIht/FE+u2jbloMLpDAqnNuI75CmJTuMZ\n\tO7c80hBtJYMa9nLpzIceEp4tlXmESCoB/fNR9qE=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:date:from:to:subject:message-id:references\n\t:mime-version:content-type:in-reply-to; s=default; bh=f3LdVQx4t/\n\tyxtnPVdl9r89qxarU=; b=RU2qwDmlcrIGRliAIF/h1nb0k2egbiUKhDPkG3FyPx\n\tjiXHquW3s0Kxsz+XeX1C+MlwzgCQZt1vGAXQCtG8lJI/tpUY9Ktb/RHf2GSG7rdz\n\tPnUEIS7BX3G4KAALCtatm7JhsBHQI650GV2Db2sMN2+o00+TC9JmbSP1BdVi+APj\n\ts=","Mailing-List":"contact libc-alpha-help@sourceware.org; run by ezmlm","Precedence":"bulk","List-Id":"<libc-alpha.sourceware.org>","List-Unsubscribe":"<mailto:libc-alpha-unsubscribe-incoming=patchwork.ozlabs.org@sourceware.org>","List-Subscribe":"<mailto:libc-alpha-subscribe@sourceware.org>","List-Archive":"<http://sourceware.org/ml/libc-alpha/>","List-Post":"<mailto:libc-alpha@sourceware.org>","List-Help":"<mailto:libc-alpha-help@sourceware.org>,\n\t<http://sourceware.org/ml/#faqs>","Sender":"libc-alpha-owner@sourceware.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-24.8 required=5.0 tests=AWL, BAYES_00,\n\tGIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3,\n\tRP_MATCHES_RCVD, SPF_PASS,\n\tURIBL_RED autolearn=ham version=3.3.2 spammy=life, bet","X-HELO":"vmicros1.altlinux.org","Date":"Fri, 8 Sep 2017 14:45:47 +0300","From":"\"Dmitry V. Levin\" <ldv@altlinux.org>","To":"libc-alpha@sourceware.org","Subject":"Re: Add Linux 4.13 constants to bits/fcntl-linux.h","Message-ID":"<20170908114547.GA12992@altlinux.org>","Mail-Followup-To":"libc-alpha@sourceware.org","References":"<alpine.DEB.2.20.1709072105390.32296@digraph.polyomino.org.uk>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"OgqxwSJOaUobr8KG\"","Content-Disposition":"inline","In-Reply-To":"<alpine.DEB.2.20.1709072105390.32296@digraph.polyomino.org.uk>"}}]