[Bug 241373] [UFS] Rename should update the ctime of a multiply-linked destination
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Oct 20 15:21:51 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241373
Bug ID: 241373
Summary: [UFS] Rename should update the ctime of a
multiply-linked destination
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Many People
Priority: ---
Component: kern
Assignee: bugs at FreeBSD.org
Reporter: asomers at FreeBSD.org
Attachment #208465 text/plain
mime type:
Created attachment 208465
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=208465&action=edit
Regression test
ctime should be updated whenever a file's link count changes. If its
destination is multiply-linked, rename(2) will decrease its link count, and
therefore should update its ctime. ZFS complies, but as of r353698 UFS does
not. I have two test cases demonstrating the problem: a standalone C program
(attached), and a pjdfstest test case
(https://github.com/pjd/pjdfstest/pull/37).
Standalone test's output on UFS:
$ /tmp/rename_ctime_link
nlink: 2 -> 1 ctime 1571584801.941284000 -> 1571584801.941284000
Renamed failed to update destination's ctime.
And on ZFS:
$ /tmp/rename_ctime_link
nlink: 2 -> 1 ctime 1571584883.332680000 -> 1571584884.384654000
Everything ok!
$ uname -a
FreeBSD fbsd-head.lauralan.noip.me 13.0-CURRENT FreeBSD 13.0-CURRENT #50
r353698: Thu Oct 17 15:17:38 MDT 2019
somers at fbsd-head.lauralan.noip.me:/usr/obj/usr/home/somers/freebsd/base/head/amd64.amd64/sys/GENERIC
amd64
$ mount
/dev/vtbd0p2 on / (ufs, local, journaled soft-updates)
devfs on /dev (devfs)
192.168.0.2:/home on /usr/home (nfs, nfsv4acls)
tank on /tank (zfs, local, nfsv4acls)
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list