Bug 2274186 - Removing a hardlink (reducing link count) does not update ctime on btrfs
Summary: Removing a hardlink (reducing link count) does not update ctime on btrfs
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 41
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: fedora-kernel-btrfs
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-04-09 15:38 UTC by marek+fedora
Modified: 2025-12-16 17:07 UTC (History)
17 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-12-16 17:07:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description marek+fedora 2024-04-09 15:38:36 UTC
1. Please describe the problem:

When creating a hardlink, the ctime of the inode is updated, yet when deleting the hardlink again, the ctime stays the same.

2. What is the Version-Release number of the kernel:

kernel-6.8.4-200.fc39

3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :

Yes, it did work before. It seems to work on 6.6.3 (other person's machine) but it did not work on 6.7.9. It also doesn't work on 6.8.4 both on Fedora and Arch Linux.

4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:

$ touch created
$ ls -lc --time-style=+%N created
$ ln created hardlinked
$ ls -lc --time-style=+%N created
$ rm hardlinked
$ ls -lc --time-style=+%N created

The last `ls` reports the same timestamp as the previous one, but only on btrfs. On tmpfs the ctime is updated.

5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:


6. Are you running any modules that not shipped with directly Fedora's kernel?:

No.

7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.

Reproducible: Always

Comment 1 Chris Murphy 2024-09-17 16:33:20 UTC
kernel 6.11.0-0.rc7.56.fc41.x86_64

$ touch created
$ ls -lc --time-style=+%N created
-rw-r--r--. 1 chris chris 0 910135001 created
$ ln created hardlinked
$ ls -lc --time-style=+%N created
-rw-r--r--. 2 chris chris 0 624001513 created
$ rm hardlinked
$ ls -lc --time-style=+%N created
-rw-r--r--. 1 chris chris 0 302389811 created

Comment 2 Chris Murphy 2024-09-17 16:37:41 UTC
It's an old article, but I'm not aware of a consensus on how ctime should be handled.
https://lwn.net/Articles/397442/

Comment 3 Adam Williamson 2025-12-02 01:14:36 UTC
This message is a reminder that Fedora Linux 41 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 41 on 2025-12-15.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '41'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 41 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 4 Samyak Jain (RedHat) 2025-12-16 17:07:32 UTC
Fedora Linux 41 entered end-of-life (EOL) status on 2025-12-15.

Fedora Linux 41 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.