Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

tmpfs: touch does not update ctime



Hi!

While testing coreutils 9.12 on -current we noticed that 'touch'
doesn't change the ctime on tmpfs, but does change it on ffs.

The script:

#!/bin/sh
touch a || fail=1
btime=$(stat -f %B a) || fail=1
atime=$(stat -f %a a) || fail=1
ctime=$(stat -f %c a) || fail=1
mtime=$(stat -f %m a) || fail=1
echo $btime $atime $ctime $mtime

Running this twice on tmpfs gives:

# ~/nbtest.sh
1790414618 1790414618 1790414618 1790414618
# ~/nbtest.sh
1790414618 1790414620 1790414618 1790414620

Same ctime.

It's different on ffs:

# ./nbtest.sh
1790414514 1790414604 1790414604 1790414604
# ./nbtest.sh
1790414514 1790414611 1790414611 1790414611

Different ctime.

Is this a bug in tmpfs?
 Thomas


Home | Main Index | Thread Index | Old Index