From owner-freebsd-fs@freebsd.org Sun Aug 16 21:46:19 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 E473C9BBB0E; Sun, 16 Aug 2015 21:46:19 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A3D8D1181; Sun, 16 Aug 2015 21:46:19 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id BECE4B8074; Sun, 16 Aug 2015 23:46:16 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id AF7DC28494; Sun, 16 Aug 2015 23:46:16 +0200 (CEST) Date: Sun, 16 Aug 2015 23:46:16 +0200 From: Jilles Tjoelker To: Julian Elischer Cc: John Baldwin , freebsd-current@freebsd.org, "freebsd-fs@freebsd.org" Subject: Re: futimens and utimensat vs birthtime Message-ID: <20150816214616.GA38422@stack.nl> References: <55CDFF32.7050601@freebsd.org> <2405496.WdPSxGzEuT@ralph.baldwin.cx> <55D09D8D.7010206@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55D09D8D.7010206@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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 21:46:20 -0000 On Sun, Aug 16, 2015 at 10:26:21PM +0800, 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. Using AT_* flags for things unrelated to pathnames is not without precedent: AT_REMOVEDIR for unlinkat() and AT_EACCESS for faccessat(). This isn't suitable for a large number of flags, though. > 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... This could be indicated by yet another flag. I'm a bit disappointed that setting birthtimes apparently wasn't needed when I added futimens and utimensat. However, they are not part of any release yet, so it may be possible to remove them at some point. -- Jilles Tjoelker