From: Christoph Hellwig <hch@lst.de>
To: akpm@osdl.org
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH 2/2] remove update_atime
Date: Fri, 4 Nov 2005 23:30:22 +0100 [thread overview]
Message-ID: <20051104223022.GB9608@lst.de> (raw)
all callers use touch_atime now which takes a vfsmount and allows us
to implement per-mount noatime.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/fs/inode.c
===================================================================
--- linux-2.6.orig/fs/inode.c 2005-10-31 14:29:29.000000000 +0100
+++ linux-2.6/fs/inode.c 2005-10-31 20:08:48.000000000 +0100
@@ -1176,17 +1176,20 @@
EXPORT_SYMBOL(bmap);
/**
- * update_atime - update the access time
+ * touch_atime - update the access time
+ * @mnt: mount the inode is accessed on
* @inode: inode accessed
*
* Update the accessed time on an inode and mark it for writeback.
* This function automatically handles read only file systems and media,
* as well as the "noatime" flag and inode specific "noatime" markers.
*/
-void update_atime(struct inode *inode)
+void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
{
+ struct inode *inode = dentry->d_inode;
struct timespec now;
+ /* per-mountpoint checks will go here */
if (IS_NOATIME(inode))
return;
if (IS_NODIRATIME(inode) && S_ISDIR(inode->i_mode))
@@ -1201,7 +1204,7 @@
}
}
-EXPORT_SYMBOL(update_atime);
+EXPORT_SYMBOL(touch_atime);
/**
* file_update_time - update mtime and ctime time
Index: linux-2.6/include/linux/fs.h
===================================================================
--- linux-2.6.orig/include/linux/fs.h 2005-10-31 19:25:47.000000000 +0100
+++ linux-2.6/include/linux/fs.h 2005-10-31 20:08:11.000000000 +0100
@@ -230,9 +230,6 @@
struct vm_area_struct;
struct vfsmount;
-/* Used to be a macro which just called the function, now just a function */
-extern void update_atime (struct inode *);
-
extern void __init inode_init(unsigned long);
extern void __init inode_init_early(void);
extern void __init mnt_init(unsigned long);
@@ -1075,12 +1072,7 @@
__mark_inode_dirty(inode, I_DIRTY_SYNC);
}
-static inline void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
-{
- /* per-mountpoint checks will go here */
- update_atime(dentry->d_inode);
-}
-
+extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry);
static inline void file_accessed(struct file *file)
{
if (!(file->f_flags & O_NOATIME))
next reply other threads:[~2005-11-04 22:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-04 22:30 Christoph Hellwig [this message]
2005-11-05 0:31 ` [PATCH 2/2] remove update_atime Andreas Dilger
2005-11-05 0:34 ` Christoph Hellwig
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=20051104223022.GB9608@lst.de \
--to=hch@lst.de \
--cc=akpm@osdl.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).