From owner-freebsd-fs@FreeBSD.ORG Sun Dec 2 23:56:35 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 CCCE4511; Sun, 2 Dec 2012 23:56:35 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6D3148FC12; Sun, 2 Dec 2012 23:56:35 +0000 (UTC) Received: by mail-oa0-f54.google.com with SMTP id n9so2790778oag.13 for ; Sun, 02 Dec 2012 15:56:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=VYCuh6pdrkuLULCSTRx/wEW7bv8lW0xiUWq63zcs5ng=; b=ngjUK7z5x++NkDMtDLIRTiCXgc0n0hFhZWrlodWObuxcCZHIo4IYOtl0MVLAHo/ODL fU3VDQ/oiNdNssf/Alh+R4Ehn8vpYyiRhL3GV4oxlqiyW05CAyrIlEwxJEEln2A8jtKk pGXA/5vEvDlhNaBRL1IjMkmQAgdqcStIHPMlOeD9nPsWJtuqbxv5hbEadDVCa67S7xkE Mv3IQRKiZ3HSxDEZHGp01WHvYkTvPag9JdHsZtauXRFM93qIynVcY/fRyAANQPVU8roG 14fDBwq+MFKP2LvnSSuxncc5MBo8reHX9DbLbFXNPez2SKiuSMQV7sN1JGG6/WpRyV0n ahoA== MIME-Version: 1.0 Received: by 10.182.194.2 with SMTP id hs2mr2991903obc.97.1354492594732; Sun, 02 Dec 2012 15:56:34 -0800 (PST) Received: by 10.76.143.33 with HTTP; Sun, 2 Dec 2012 15:56:34 -0800 (PST) In-Reply-To: <20121202232028.292620@gmx.com> References: <20121202232028.292620@gmx.com> Date: Sun, 2 Dec 2012 15:56:34 -0800 Message-ID: Subject: Re: Birthtime handling in ZFS From: Garrett Cooper To: Phil Stone Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-fs@freebsd.org, Xin LI 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:56:36 -0000 On Sun, Dec 2, 2012 at 3:20 PM, Phil Stone wrote: > 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. Yup, it's a regression introduced with the ZFS v28 import as I noted in the PR [1]. The patch attached ot the PR will apply to stable/9 and HEAD and should apply to stable/8. Thanks! -Garrett 1. http://www.freebsd.org/cgi/query-pr.cgi?pr=174067