From owner-freebsd-fs@freebsd.org Mon Aug 17 22:29:55 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 137A29BBFD1; Mon, 17 Aug 2015 22:29:55 +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 E202511DB; Mon, 17 Aug 2015 22:29:54 +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 284D0B939; Mon, 17 Aug 2015 18:29:53 -0400 (EDT) From: John Baldwin To: Adrian Chadd Cc: Julian Elischer , freebsd-current , "freebsd-fs@freebsd.org" , Jilles Tjoelker Subject: Re: futimens and utimensat vs birthtime Date: Mon, 17 Aug 2015 15:28:45 -0700 Message-ID: <6270978.RcR1JVbHrR@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) In-Reply-To: References: <55CDFF32.7050601@freebsd.org> <55D09D8D.7010206@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); Mon, 17 Aug 2015 18:29:53 -0400 (EDT) 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: Mon, 17 Aug 2015 22:29:55 -0000 On Sunday, August 16, 2015 12:05:07 PM Adrian Chadd wrote: > .. then make it take a struct and a type flag. :P > > Then you can extend it however you'd like. I think that might be a bit much (making it a struct), but one option could be to add an argument that says how many timespecs are in the array. Any "missing" timespecs could be treated as if they were set to UTIME_OMIT. This would in theory mean you could support additional timestamps in the future without needing new calls. I'm just not sure if there are any conceivable timestamps such that this flexibility is warranted? > -adrian > > On 16 August 2015 at 07:26, Julian Elischer wrote: > > 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). > >> > > > > _______________________________________________ > > freebsd-current@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-current > > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" -- John Baldwin