Hi Team, I'm writing to bring to your attention an issue we have encountered with the "mtime" (modification time) behavior for directories in the Ceph filesystem. Upon observation, we have noticed that when the mtime of a directory (let's say: dir1) is explicitly changed in CephFS, subsequent additions of files or directories within 'dir1' fail to update the directory's mtime as expected. This behavior appears to be specific to CephFS - we have reproduced this issue on both Quincy and Pacific. Similar steps work as expected in the ext4 filesystem amongst others. Reproduction steps: 1. Create a directory - mkdir dir1 2. Modify mtime using the touch command - touch dir1 3. Create a file or directory inside of 'dir1' - mkdir dir1/dir2 Expected result: mtime for dir1 should change to the time the file or directory was created in step 3 Actual result: there was no change to the mtime for 'dir1' Note : For more detail, kindly find the attached logs. Our queries are : 1. Is this expected behavior for CephFS? 2. If so, can you explain why the directory behavior is inconsistent depending on whether the mtime for the directory has previously been manually updated. Best Regards, Sandip Divekar Component QA Lead SDET.
CEPHFS =========================================================================== root@sds-ceph:/mnt/cephfs/volumes/_nogroup/test1/d5052b71-39ec-4d0a-9b0b-2091e1723538# mkdir dir1 root@sds-ceph:/mnt/cephfs/volumes/_nogroup/test1/d5052b71-39ec-4d0a-9b0b-2091e1723538# stat dir1 File: dir1 Size: 0 Blocks: 0 IO Block: 65536 directory Device: 28h/40d Inode: 1099511714911 Links: 2 Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2023-05-24 11:09:25.260851345 +0530 Modify: 2023-05-24 11:09:25.260851345 +0530 Change: 2023-05-24 11:09:25.260851345 +0530 Birth: 2023-05-24 11:09:25.260851345 +0530 root@sds-ceph:/mnt/cephfs/volumes/_nogroup/test1/d5052b71-39ec-4d0a-9b0b-2091e1723538# touch -m -d '26 Aug 1982 22:00' dir1 root@sds-ceph:/mnt/cephfs/volumes/_nogroup/test1/d5052b71-39ec-4d0a-9b0b-2091e1723538# stat dir1/ File: dir1/ Size: 0 Blocks: 0 IO Block: 65536 directory Device: 28h/40d Inode: 1099511714911 Links: 2 Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2023-05-24 11:09:25.260851345 +0530 Modify: 1982-08-26 22:00:00.000000000 +0530 Change: 2023-05-24 11:10:04.881454967 +0530 Birth: 2023-05-24 11:09:25.260851345 +0530 root@sds-ceph:/mnt/cephfs/volumes/_nogroup/test1/d5052b71-39ec-4d0a-9b0b-2091e1723538# mkdir dir1/dir2 root@sds-ceph:/mnt/cephfs/volumes/_nogroup/test1/d5052b71-39ec-4d0a-9b0b-2091e1723538# stat dir1/ File: dir1/ Size: 1 Blocks: 0 IO Block: 65536 directory Device: 28h/40d Inode: 1099511714911 Links: 3 Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2023-05-24 11:09:25.260851345 +0530 Modify: 1982-08-26 22:00:00.000000000 +0530 Change: 2023-05-24 11:10:19.141672220 +0530 Birth: 2023-05-24 11:09:25.260851345 +0530 root@sds-ceph:/mnt/cephfs/volumes/_nogroup/test1/d5052b71-39ec-4d0a-9b0b-2091e1723538# LINUX FS =============================================================== root@sds-ceph:~# mkdir dir1 root@sds-ceph:~# stat dir1 File: dir1 Size: 4096 Blocks: 8 IO Block: 4096 directory Device: fe00h/65024d Inode: 419381 Links: 2 Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2023-05-24 11:12:06.027300465 +0530 Modify: 2023-05-24 11:12:06.027300465 +0530 Change: 2023-05-24 11:12:06.027300465 +0530 Birth: 2023-05-24 11:12:06.027300465 +0530 root@sds-ceph:~# touch -m -d '26 Aug 1982 22:00' dir1 root@sds-ceph:~# stat dir1 File: dir1 Size: 4096 Blocks: 8 IO Block: 4096 directory Device: fe00h/65024d Inode: 419381 Links: 2 Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2023-05-24 11:12:06.027300465 +0530 Modify: 1982-08-26 22:00:00.000000000 +0530 Change: 2023-05-24 11:12:13.463413735 +0530 Birth: 2023-05-24 11:12:06.027300465 +0530 root@sds-ceph:~# mkdir dir1/dir2 root@sds-ceph:~# stat dir1 File: dir1 Size: 4096 Blocks: 8 IO Block: 4096 directory Device: fe00h/65024d Inode: 419381 Links: 3 Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2023-05-24 11:12:06.027300465 +0530 Modify: 2023-05-24 11:12:22.231547292 +0530 Change: 2023-05-24 11:12:22.231547292 +0530 Birth: 2023-05-24 11:12:06.027300465 +0530 root@sds-ceph:~#
_______________________________________________ ceph-users mailing list -- ceph-users@xxxxxxx To unsubscribe send an email to ceph-users-leave@xxxxxxx