From: "Martin J. Bligh" <mbligh@aracnet.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: mark@borgerding.net
Subject: [Bug 1837] New: tmpfs readdir does not update dir access time
Date: Sun, 11 Jan 2004 12:20:40 -0800 [thread overview]
Message-ID: <28710000.1073852440@[10.10.2.4]> (raw)
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.
reply other threads:[~2004-01-11 20:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='28710000.1073852440@[10.10.2.4]' \
--to=mbligh@aracnet.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark@borgerding.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®