> It would be interesting to change the clock on the MDS and OSS to be wildly out of sync with the client and each other, and then run sanity and sanityN (it is still running on a single node, with two mountpoints) to see what fails. That would make it much more obvious where the bad timestamps are coming from.
I have 4 VMs each set to a different day of the week.
Here is what I ran on t3 (the client).
(
pdsh -Rssh -w "root@t[0-3]" umount -a -t ldiskfs
(export CONFIG=/root/local.sh; source $CONFIG; sh $LUSTRE/tests/llmount.sh) &> /dev/null
echo BEFORE
pdsh -Rssh -w "root@t[0-3]" date | sort
lfs mkdir -c4 /mnt/lustre/d0
echo AFTER
stat /mnt/lustre/d0
pdsh -Rssh -w "root@t[0-3]" date | sort
(export CONFIG=/root/local.sh; source $CONFIG; sh $LUSTRE/tests/llmountcleanup.sh) &> /dev/null
ssh t0 insmod /root/lustre-release/ldiskfs/ldiskfs.ko
ssh t1 insmod /root/lustre-release/ldiskfs/ldiskfs.ko
ssh t0 mkdir -p /tmp/mdt1
ssh t1 mkdir -p /tmp/mdt{2,3,4}
ssh t0 mount /tmp/lustre-mdt1 /tmp/mdt1 -o loop,ro -t ldiskfs
ssh t1 mount /tmp/lustre-mdt2 /tmp/mdt2 -o loop,ro -t ldiskfs
ssh t1 mount /tmp/lustre-mdt3 /tmp/mdt3 -o loop,ro -t ldiskfs
ssh t1 mount /tmp/lustre-mdt4 /tmp/mdt4 -o loop,ro -t ldiskfs
ssh t0 stat /tmp/mdt1/ROOT/d0 /tmp/mdt1/ROOT/d0/*
ssh t1 stat /tmp/mdt{2,3,4}/REMOTE_PARENT_DIR/*
) 2>&1 | tee mkdir.out
Here is the edited output. As you would expect after a create, for each inode stated the a,c,m times were equal. So I only show one timestamp per inode.
Here is the full output:
So we are wrongly using a server timestamp for the stripe 0 agent inode which is affecting the client visible timestamps.
Patch landed to Master.