Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Dec 2012 15:56:34 -0800
From:      Garrett Cooper <yanegomi@gmail.com>
To:        Phil Stone <phil.stone@gmx.com>
Cc:        freebsd-fs@freebsd.org, Xin LI <delphij@delphij.net>
Subject:   Re: Birthtime handling in ZFS
Message-ID:  <CAGH67wTamvDiWmf6k_3NzbL6yk2%2BajqfWRG0=mjiw00%2BvfO=cQ@mail.gmail.com>
In-Reply-To: <20121202232028.292620@gmx.com>
References:  <20121202232028.292620@gmx.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Dec 2, 2012 at 3:20 PM, Phil Stone <phil.stone@gmx.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGH67wTamvDiWmf6k_3NzbL6yk2%2BajqfWRG0=mjiw00%2BvfO=cQ>