>Number:         174067
>Category:       kern
>Synopsis:       [patch][zfs] the birthtime is always set for st_ctime when 
>getting a file's attributes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 02 23:50:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Garrett Cooper
>Release:        9-STABLE
>Organization:
EMC Isilon
>Environment:
FreeBSD bayonetta.local 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #0 r240836M: Sat 
Sep 22 12:30:11 PDT 2012     
gcooper@bayonetta.local:/usr/obj/store/freebsd/stable/9/sys/BAYONETTA  amd64
>Description:
As noted by the submitter [1], the crtime attribute is always being incorrectly 
set to the CTIME (changetime) value.

This regression was committed in the ZFS v28 import [2].

The attached patch fixes the issue.

1. http://lists.freebsd.org/pipermail/freebsd-fs/2012-December/015860.html
2. http://svnweb.freebsd.org/base?view=revision&revision=219089
>How-To-Repeat:
- Create a file.
- Change the file.

Note that the birth time changes for the file.
>Fix:


Patch attached with submission follows:

Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
===================================================================
--- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c  (revision 
243557)
+++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c  (working copy)
@@ -2669,7 +2669,7 @@
 
        SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_MTIME(zfsvfs), NULL, &mtime, 16);
        SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CTIME(zfsvfs), NULL, &ctime, 16);
-       SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CTIME(zfsvfs), NULL, &crtime, 16);
+       SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CRTIME(zfsvfs), NULL, &crtime, 16);
        if (vp->v_type == VBLK || vp->v_type == VCHR)
                SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_RDEV(zfsvfs), NULL,
                    &rdev, 8);


>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to