From: Mark Borgerding <mark@borgerding.net>
To: linux-fsdevel@vger.kernel.org
Subject: tmpfs readdir does not update dir access time
Date: Sun, 11 Jan 2004 16:17:51 -0500 [thread overview]
Message-ID: <4001BD7F.5090301@borgerding.net> (raw)
I just submitted a bug and proposed a patch to fs/libfs.c (function ==
dcache_readdir ).
http://bugme.osdl.org/show_bug.cgi?id=1837
I wanted to say something on the fs-devel list to find out if any
filesystems depend on dcache_readdir NOT updating the access time (
calling update_atime ) during a readdir. This seems like its broken to
me. But I'm just a caveman who fell through some ice and was later
thawed by your scientists -- your world frightens and confuses me.
The danger is that this patch could break a fs that relies on the
existing (wrong?) behavior provided by dcache_readdir ( a.k.a
simple_dir_operations->readdir ), which never updates the atime of a dir
inode.
Note that this change will not affect inodes for which IS_NOATIME or
IS_NODIRATIME is true. Those will get ignored by the function
update_atime. e.g If the fs was mounted 'noatime', or the S_NOATIME bit
is set in i_flags.
I did a quick check in the 2.6.1 kernel tree to see what may be using
the dcache_readdir. Here's a list of possible candidiates:
$> find ./ -type f -name '*.c' |xargs grep -n -e simple_fill_super -e
simple_dir_operations -e dcache_readdir
./net/sunrpc/rpc_pipe.c:422: inode->i_fop =
&simple_dir_operations;
./drivers/isdn/capi/capifs.c:131: inode->i_fop =
&simple_dir_operations;
./drivers/usb/core/inode.c:174: inode->i_fop =
&simple_dir_operations;
./drivers/usb/gadget/inode.c:1800: 0,
&simple_dir_operations,
./drivers/oprofile/oprofilefs.c:266: inode->i_fop =
&simple_dir_operations;
./drivers/oprofile/oprofilefs.c:286: root_inode->i_fop =
&simple_dir_operations;
./arch/ia64/sn/io/hwgfs/ramfs.c:82: inode->i_fop =
&simple_dir_operations;
./fs/nfsd/nfsctl.c:414: return simple_fill_super(sb, 0x6e667364,
nfsd_files);
./fs/sysfs/dir.c:16: inode->i_fop = &simple_dir_operations;
./fs/sysfs/mount.c:39: inode->i_fop = &simple_dir_operations;
./fs/autofs4/root.c:34: .readdir = dcache_readdir,
./fs/autofs4/inode.c:314: inode->i_fop =
&simple_dir_operations;
./fs/autofs/inode.c:212: inode->i_fop = &simple_dir_operations;
./fs/devpts/inode.c:96: inode->i_fop = &simple_dir_operations;
./fs/hugetlbfs/inode.c:396: inode->i_fop =
&simple_dir_operations;
./fs/ramfs/inode.c:74: inode->i_fop =
&simple_dir_operations;
./fs/binfmt_misc.c:617: int err = simple_fill_super(sb, 0x42494e4d,
bm_files);
./security/selinux/selinuxfs.c:615: return simple_fill_super(sb,
SELINUX_MAGIC, selinux_files);
(I've omitted the hits from fs/fslib.c & mm/shmem.c since that was the
intended effect. )
Regards,
Mark Borgerding
next reply other threads:[~2004-01-11 21:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-11 21:17 Mark Borgerding [this message]
2004-01-12 19:28 ` tmpfs readdir does not update dir access time Greg KH
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=4001BD7F.5090301@borgerding.net \
--to=mark@borgerding.net \
--cc=linux-fsdevel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.