From owner-freebsd-fs@FreeBSD.ORG Tue Jul 22 11:41:17 2008 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FCEF106568D for ; Tue, 22 Jul 2008 11:41:17 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id E33C08FC0C for ; Tue, 22 Jul 2008 11:41:16 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.64.3]) by phk.freebsd.dk (Postfix) with ESMTP id 2AD2B170E5; Tue, 22 Jul 2008 11:16:59 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.2/8.14.2) with ESMTP id m6MBGvwd037899; Tue, 22 Jul 2008 11:16:58 GMT (envelope-from phk@critter.freebsd.dk) To: Jaakko Heinonen From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 22 Jul 2008 10:57:19 +0300." <20080722075718.GA1881@a91-153-120-204.elisa-laajakaista.fi> Date: Tue, 22 Jul 2008 11:16:57 +0000 Message-ID: <37898.1216725417@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: freebsd-fs@freebsd.org, ighighi@gmail.com Subject: Re: birthtime initialization X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2008 11:41:17 -0000 In message <20080722075718.GA1881@a91-153-120-204.elisa-laajakaista.fi>, Jaakko Heinonen writes: >On 2008-06-02, Bruce Evans wrote: >[about patch for ext2fs in PR kern/122047] >> % + vap->va_birthtime.tv_sec = 0; >> % + vap->va_birthtime.tv_nsec = 0; >> >> This is unrelated and should be handled centrally. Almost all file >> systems get this wrong. Most fail to set va_birthtime, so stat() >> returns kernel stack garbage for st_birthtime. ffs1 does the same >> as the above. msdosfs does the above correctly, by setting tv_sec to >> (time_t)-1 in unsupported cases. > >How about this patch? Looks like something Kirk forgot to me. We want to macroize the NOVAL for timespec instead of spreading -1 casts all over. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.