Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Oct 2019 15:21:50 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 241373] [UFS] Rename should update the ctime of a multiply-linked destination
Message-ID:  <bug-241373-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D241373

            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@FreeBSD.org
          Reporter: asomers@FreeBSD.org
 Attachment #208465 text/plain
         mime type:

Created attachment 208465
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D208465&action=
=3Dedit
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 progr=
am
(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=20
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=20=20=20=20
somers@fbsd-head.lauralan.noip.me:/usr/obj/usr/home/somers/freebsd/base/hea=
d/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)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-241373-227>