From owner-freebsd-fs@freebsd.org Sun Aug 16 14:26:34 2015 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 855E39BABE0; Sun, 16 Aug 2015 14:26:34 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F82B1DF2; Sun, 16 Aug 2015 14:26:33 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-240-35.lns20.per4.internode.on.net [121.45.240.35]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id t7GEQR6d023531 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 16 Aug 2015 07:26:31 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: futimens and utimensat vs birthtime To: John Baldwin , freebsd-current@freebsd.org References: <55CDFF32.7050601@freebsd.org> <2405496.WdPSxGzEuT@ralph.baldwin.cx> Cc: "freebsd-fs@freebsd.org" , "'Jilles Tjoelker'" From: Julian Elischer Message-ID: <55D09D8D.7010206@freebsd.org> Date: Sun, 16 Aug 2015 22:26:21 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <2405496.WdPSxGzEuT@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Aug 2015 14:26:34 -0000 On 8/15/15 1:39 AM, John Baldwin wrote: > On Friday, August 14, 2015 10:46:10 PM Julian Elischer wrote: >> I would like to implement this call. but would like input as to it's >> nature. >> The code inside the system would already appear to support handling >> three elements, though it needs some scrutiny, >> so all that is needed is a system call with the ability to set the >> birthtime directly. >> >> Whether it should take the form of the existing calls but expecting >> three items is up for discussion. >> Maybe teh addition of a flags argument to specify which items are >> present and which to set. >> >> ideas? > I believe these should be new calls. Only utimensat() provides a flag > argument, but it is reserved for AT_* flags. I wasn't suggesting we keep the old ones and silently make them take 3 args :-) I was thining of suplementing them wth new syscalls and the obvious names are those you suggested. however I do wonder if there will ever be a need for a 4th... > I would be fine with > something like futimens3() and utimensat3() (where 3 means "three > timespecs"). Jilles implemented futimens() and utimensat(), so he > might have ideas as well. I would probably stick the birth time in > the third (final) timespec slot to make it easier to update new code > (you can use an #ifdef just around ts[2] without having to #ifdef the > entire block). >