Details
Description
# llmount.sh ... # lctl set_param debug=+inode debug=+inode # cd /mnt/lustre # mkdir d0 # lfs path2fid d0 [0x200000400:0x1:0x0] # date +%s 1432234095 # date +%s --date='May 31 2015' # 10 days from now 1433048400 # touch --date=@1433048400 d0/f0 # stat d0/f0 File: `d0/f0' Size: 0 Blocks: 0 IO Block: 4194304 regular empty file Device: 2c54f966h/743766374d Inode: 144115205255725058 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2015-05-31 00:00:00.000000000 -0500 Modify: 2015-05-31 00:00:00.000000000 -0500 Change: 2015-05-21 13:48:34.000000000 -0500 # lctl clear # rm d0/f0 # lctl dk | grep ll_update_times 00000080:00000002:2.0:1432234174.052418:0:16832:0:(namei.c:902:ll_update_times()) setting fid [0x200000400:0x1:0x0] mtime from 1432234114 to 1433048400
Noe that the FID is that of the parent directory and the timestamp is 10 days from now.
When we stat the directory we get the right timestamps:
# stat d0 File: `d0' Size: 4096 Blocks: 8 IO Block: 4096 directory Device: 2c54f966h/743766374d Inode: 144115205255725057 Links: 2 Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2015-05-21 13:47:31.000000000 -0500 Modify: 2015-05-21 13:49:34.000000000 -0500 Change: 2015-05-21 13:49:34.000000000 -0500
It appears the every use of ll_update_times() is incorrect. The attributes returned in the response body are for the child but are applied to the parent.
OTOH It's not clear why this function exists at all.