From owner-freebsd-fs@freebsd.org Fri Aug 14 21:22:27 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 45AD79B936D for ; Fri, 14 Aug 2015 21:22:27 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (chez.mckusick.com [IPv6:2001:5a8:4:7e72:d250:99ff:fe57:4030]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22D6919F7; Fri, 14 Aug 2015 21:22:27 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (localhost [IPv6:::1]) by chez.mckusick.com (8.14.9/8.14.9) with ESMTP id t7ELMPjR002452; Fri, 14 Aug 2015 14:22:25 -0700 (PDT) (envelope-from mckusick@chez.mckusick.com) Message-Id: <201508142122.t7ELMPjR002452@chez.mckusick.com> From: Kirk McKusick To: Julian Elischer cc: "freebsd-fs@freebsd.org" , "'Jilles Tjoelker'" , John Baldwin Subject: Re: futimens and utimensat vs birthtime In-reply-to: <2405496.WdPSxGzEuT@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2450.1439587345.1@chez.mckusick.com> Date: Fri, 14 Aug 2015 14:22:25 -0700 X-Spam-Status: No, score=0.1 required=5.0 tests=MISSING_MID, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on chez.mckusick.com 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: Fri, 14 Aug 2015 21:22:27 -0000 > From: John Baldwin > To: freebsd-current@freebsd.org > Subject: Re: futimens and utimensat vs birthtime > Date: Fri, 14 Aug 2015 10:39:41 -0700 > Cc: "freebsd-fs@freebsd.org" , > "'Jilles Tjoelker'" > > 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 I concur with John's suggestion. Add a new system call with three argument set of times specifying birthtime as the last one. I proposed doing this when I added birthtime, but did not as the sentiment at the time was that it would gratuitously make FreeBSD written applications less portable if they used this new non-standard system call. Kirk McKusick