* [Bug 1837] New: tmpfs readdir does not update dir access time
@ 2004-01-11 20:20 Martin J. Bligh
0 siblings, 0 replies; only message in thread
From: Martin J. Bligh @ 2004-01-11 20:20 UTC (permalink / raw)
To: linux-kernel; +Cc: mark
http://bugme.osdl.org/show_bug.cgi?id=1837
Summary: tmpfs readdir does not update dir access time
Kernel Version: 2.6.0
Status: NEW
Severity: normal
Owner: fs_other@kernel-bugs.osdl.org
Submitter: mark@borgerding.net
Distribution: various
Hardware Environment: i386 (Athlons & various intel 32bit)
Software Environment: kernel 2.4.18 to 2.6.0 (at least)
Problem Description: access times of tmpfs dirs do not get updated on readdir
Impact: This can cause empty dirs to get tmpwatch'd too early, b/c atime never
changes even though the dir is in use.
Steps to reproduce:
cd /dev/shm
mkdir mydir
ls -u --full-time mydir
ls mydir; sleep 1
ls -u --full-time mydir
Access time should be changed by 2nd ls.
FIX: add update_atime call to dcache_readdir function in fs/libfs.c
--- fs/libfs.c.orig Wed Dec 17 21:58:04 2003
+++ fs/libfs.c Sun Jan 11 13:22:37 2004
@@ -155,6 +155,7 @@
}
spin_unlock(&dcache_lock);
}
+ update_atime(dentry->d_inode);
return 0;
}
Note that other fs use dcache_readdir as well. Hopefully none rely on this
(broken?) behavior. I found direct or indirect use of dcache_readdir ,
simple_dir_operations, or simple_fill_super in various places. I was not
familiar enough with most fs to evaluate the impact.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-01-11 20:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-11 20:20 [Bug 1837] New: tmpfs readdir does not update dir access time Martin J. Bligh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®