Bug 2417851 - NFS: failed to update ctime when calling futimens without UTIME_OMIT for the mtime entry
Summary: NFS: failed to update ctime when calling futimens without UTIME_OMIT for the ...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Justin M. Forbes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-11-30 05:49 UTC by Yongcheng Yang
Modified: 2025-11-30 05:49 UTC (History)
14 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Yongcheng Yang 2025-11-30 05:49:24 UTC
1. Please describe the problem:
The xfstests over nfsv4.2 generic/221 always fail on the fedora rawhide since kernel version v6.17.

This can be easily reproduced on the nfs mountpoint:

[root@dell-per660-23 ~]# cat t_futimens.c
// SPDX-License-Identifier: GPL-2.0+
/*
 * Check ctime updates when calling futimens without UTIME_OMIT for the
 * mtime entry.
 * Copyright (c) 2009 Eric Blake <ebb9>
 */
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/stat.h>

int
main(int argc, char **argv)
{
        int fd = creat ("file", 0600);
        struct stat st1, st2;
        struct timespec t[2] = { { 1000000000, 0 }, { 0, UTIME_OMIT } };

        fstat(fd, &st1);
        sleep(1);
        futimens(fd, t);
        fstat(fd, &st2);

        if (st1.st_ctime == st2.st_ctime)
                printf("failed to update ctime!\n");
        return 0;
}
[root@dell-per660-23 ~]#
[root@dell-per660-23 ~]# gcc t_futimens.c
[root@dell-per660-23 ~]# nfsstat -m
[root@dell-per660-23 ~]# mount localhost:/export_test /mnt_test/
[root@dell-per660-23 ~]# nfsstat -m
/mnt_test from localhost:/export_test
 Flags: rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,fatal_neterrors=none,proto=tcp6,timeo=600,retrans=2,sec=sys,clientaddr=::1,local_lock=none,addr=::1

[root@dell-per660-23 ~]# cd /mnt_test/
[root@dell-per660-23 mnt_test]# /root/a.out
failed to update ctime!                       <<<<<<<<<<<<<<<<<<<<<
[root@dell-per660-23 mnt_test]# cd
[root@dell-per660-23 ~]# uname -r
6.18.0-0.rc7.251128ge538109ac71d.62.fc44.x86_64


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


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 :


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


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?:


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


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