From owner-freebsd-hackers Sun Dec 15 5:56:42 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D93F37B404 for ; Sun, 15 Dec 2002 05:56:41 -0800 (PST) Received: from smtp.inode.at (goliath.inode.at [195.58.161.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCE7643EC2 for ; Sun, 15 Dec 2002 05:56:39 -0800 (PST) (envelope-from mranner@inode.at) Received: from line-c-209.adsl-dynamic.inode.at ([62.99.151.209] helo=dwarf.jawa.at) by smtp.inode.at with esmtp (Exim 3.34 #1) id 18NZFw-0004kU-00 for freebsd-hackers@freebsd.org; Sun, 15 Dec 2002 14:56:32 +0100 Content-Type: text/plain; charset="iso-8859-1" From: Michael Ranner To: freebsd-hackers@freebsd.org Subject: Re: setattr() syscall as proposed by phk Date: Sun, 15 Dec 2002 14:56:25 +0100 User-Agent: KMail/1.4.3 References: <200212141624.46162.mranner@inode.at> In-Reply-To: <200212141624.46162.mranner@inode.at> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200212151455.35023.mranner@inode.at> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Am Samstag, 14. Dezember 2002 16:24 schrieb Michael Ranner: > Hi there! > > I have implemented the setattr(), lsetattr() and fsetattr() syscalls for > 4.7 and 5.0. You can review my code on > http://www.ranner.jawa.at/freebsd.php. > In between I have modfied 5.0 restore to use setattr(). Because of the new UFS2 birth time attribute, I have to call utimes() before setattr(). Struct stat has no member for the file birth time. Any suggestions to improve setattr() in respect of the new UFS2. The systime of 5.0 restore decreases around 9%. from man utimes For filesystems that support file birth (creation) times (such as UFS2) the birth time will be set to the value of the second element if the second element is older than the currently set birth time. To set both a birth time and a modification time, two calls are required; the first to set the birth time and the second to set the (presumably newer) modification time. Ideally a new system call will be added that allows the setting of all three times at once. I'm also willing to implement the proposed new syscall, any suggestions for name and type of arguments (probably an array of struct timespec). The kernel code already supports an array with all three time stamps. Regards, /\/\ichael Ranner mranner@jawa.at - mranner@bitonline.cc - webmaster@mariazell.at ---------------------------------------------------------------------- JAWA Management Software GmbH - http://www.jawa.at/ Liebenauer Hauptstrasse 2oo - A-8041 Graz Tel +43 316 403274 21 - Fax +43 316 403274 10 ---------------------------------------------------------------------- Mariazell Online - http://www.mariazell.at/ ---------------------------------------------------------------------- -----BEGIN GEEK CODE BLOCK----- GIT/CS/AT dx(-) s+:(++:) a- C++ UBLVS++++$ P++>+++$ L-(+)$ E--- W+++$ N+(++) o-- K- w--()$ O-(--) M@ V-(--) PS+>++ PE(-) Y+ PGP(-) t+ 5+ X+++(++++) R* tv++ b+(++) DI++ D-(--) G- e h--(*) r++ y? ------END GEEK CODE BLOCK------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message