[DragonFlyBSD - Bug #3251] (New) file ctime not updated as documented on chmod(), link()

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Sun Oct 25 18:08:38 PDT 2020

Issue #3251 has been reported by tonyc.

Bug #3251: file ctime not updated as documented on chmod(), link()

* Author: tonyc
* Status: New
* Priority: Normal
* Assignee: 
* Category: VFS subsystem
* Target version: 
The stat(2) man page claims:

     st_ctim       Time when file status was last changed (inode data
                   modification).  Changed by the chmod(2), chown(2), link(2),
                   mknod(2), rename(2), unlink(2), utimes(2) and write(2)
                   system calls.

but neither link() nor chmod() update ctim.tv_sec:

  $ pwd
  $ cc -olink_ctime link_ctime.c
  $ ./link_ctime
  FAIL: chmod didn't update ctime
  FAIL: link didn't update ctime
  $ mount
  serno/VB6e53d937-50b8dc58.s1d on / (hammer2, local)
  devfs on /dev (devfs, nosymfollow, local)
  /dev/serno/VB6e53d937-50b8dc58.s1a on /boot (ufs, local)
  /build/usr.obj on /usr/obj (null)
  /build/var.crash on /var/crash (null)
  /build/var.cache on /var/cache (null)
  /build/var.spool on /var/spool (null)
  /build/var.log on /var/log (null)
  /build/var.tmp on /var/tmp (null)
  tmpfs on /tmp (tmpfs, local)
  procfs on /proc (procfs, local)
  tmpfs on /var/run/shm (tmpfs, local)
  $ uname -a
  DragonFly  5.8-RELEASE DragonFly v5.8.3-RELEASE #10: Thu Sep 24 19:19:45 EDT 2020     root at www.shiningsilence.com:/usr/obj/home/justin/release/5_8/sys/X86_64_GENERIC  x86_64

link_ctime.c is attached.

link_ctime.c (1.12 KB)

You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account

More information about the Bugs mailing list