I just noticed a peculiar effect while building some bootable
images for some CD's. I have the boot image mounted over the loopback
file system and copy some files to the image and unmount the image.
I noticed that the modification time on the boot image was not changed
even though the file was!
Example:
] chaos:/u/cdrom/build# ls -l boot.cd
] -r--r--r-- 1 root root 2949120 Mar 12 13:26 boot.cd
] chaos:/u/cdrom/build# sum boot.cd
] 61897 2880
] chaos:/u/cdrom/build# mount boot.cd /mnt/cdrom -t msdos -o loop=/dev/loop1
(btw: the `=/dev/loop1' is usually superfluous)
] chaos:/u/cdrom/build# gzip -9 < initrd.img > /mnt/cdrom/initrd.img
] chaos:/u/cdrom/build# umount /mnt/cdrom/
] chaos:/u/cdrom/build# sum boot.cd
] 28152 2880
] chaos:/u/cdrom/build# ls -l boot.cd
] -r--r--r-- 1 root root 2949120 Mar 12 13:26 boot.cd
Shouldn't the timestamp have been updated?
No, this is precisely as expected.
[After the loop mount, boot.cd is comparable to /dev/hda1.
We do not keep track of the date and time of the last change
to a filesystem. It would be a reasonable thing to do,
but usually wasted effort since there is no place to store it.
{ext2 already maintains the last time the superblock was written}
Maybe later.]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/