From owner-freebsd-current@freebsd.org Fri Aug 14 18:26:01 2015 Return-Path: Delivered-To: freebsd-current@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 ADAF39B92E1; Fri, 14 Aug 2015 18:26:01 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C72117D2; Fri, 14 Aug 2015 18:26:01 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (75-48-78-19.lightspeed.cncrca.sbcglobal.net [75.48.78.19]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 483F3B97B; Fri, 14 Aug 2015 14:26:00 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Cc: Julian Elischer , "freebsd-fs@freebsd.org" , 'Jilles Tjoelker' Subject: Re: futimens and utimensat vs birthtime Date: Fri, 14 Aug 2015 10:39:41 -0700 Message-ID: <2405496.WdPSxGzEuT@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) In-Reply-To: <55CDFF32.7050601@freebsd.org> References: <55CDFF32.7050601@freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 14 Aug 2015 14:26:00 -0400 (EDT) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2015 18:26:01 -0000 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 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). -- John Baldwin