From owner-freebsd-fs@FreeBSD.ORG Sun Dec 2 23:27:11 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 96FBBEC0 for ; Sun, 2 Dec 2012 23:27:11 +0000 (UTC) (envelope-from phil.stone@gmx.com) Received: from mailout-eu.gmx.com (mailout-eu.gmx.com [213.165.64.42]) by mx1.freebsd.org (Postfix) with SMTP id DB3538FC14 for ; Sun, 2 Dec 2012 23:27:10 +0000 (UTC) Received: (qmail 22558 invoked by uid 0); 2 Dec 2012 23:20:29 -0000 Received: from 82.122.18.30 by rms-eu006 with HTTP Content-Type: text/plain; charset="utf-8" Date: Mon, 03 Dec 2012 00:20:28 +0100 From: "Phil Stone" Message-ID: <20121202232028.292620@gmx.com> MIME-Version: 1.0 Subject: Birthtime handling in ZFS To: freebsd-fs@freebsd.org X-Authenticated: #67349898 X-Flags: 0001 X-Mailer: GMX.com Web Mailer x-registered: 0 Content-Transfer-Encoding: 8bit X-GMX-UID: a4fJcCoTeSEqJuvOaHAh7RR+IGRvb4B7 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Dec 2012 23:27:11 -0000 I'm using 8.3-RELEASE-p5 It seems that st_birthtime returned by lstat(2) on a zfs file always equals ctime instead of birthtime. Looking at /base/stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Function zfs_getattr() Line 2682 : SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CTIME(zfsvfs), NULL, &crtime, 16); Shouldn't it be : SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CRTIME(zfsvfs), NULL, &crtime, 16); instead ? Same in stable/9 and head. Thanks in advance for your help. Phil