Red Hat Bugzilla – Bug 367691
RW loopback mount does not update file mod time
Last modified: 2007-11-30 17:12:21 EST
I have just noticed that a file whose content is modified under a VFAT loopback
mount does not end up with a revised modification time.
It may be that updating the mod time on the file whenever a block write occurs
is impractical for some reason, but it should surely be possible to update it at
unmount time if any write to the FS has occurred, or if writes are not tracked
then to modify it at unmount time on the presumption that something was
modified, even if it was only the last mount time.
Some followup. Poking at the loopback support code, it looks as if the mtime
ought to be getting back propagated, so there is definitely a bug here.
find a convenient dos floppy image
check the mod time with ls --full-time
mount -o loop FILRNAME /some/mnt/point
cat - > /some/mnt/point/foobar.txt
check mod time with ls --full-time, notice no change.
Following patch provided by mpm@selenic looks to fix the issue:
--- l.orig/drivers/block/loop.c 2007-11-05 17:50:07.000000000 -0600
+++ l/drivers/block/loop.c 2007-11-05 17:50:16.000000000 -0600
@@ -299,6 +299,7 @@ static int __do_lo_send_write(struct fil
bw = file->f_op->write(file, buf, len, &pos);
if (likely(bw == len))