2 * Directory operations for SnapFS filesystem
5 #define DEBUG_SUBSYSTEM S_SNAP
7 #include <linux/module.h>
8 #include <linux/kernel.h>
9 #include <linux/string.h>
10 #include <linux/slab.h>
11 #include <linux/stat.h>
12 #include <linux/unistd.h>
13 #include <linux/jbd.h>
14 #include <linux/ext3_fs.h>
15 #include <linux/snap.h>
17 #include "snapfs_internal.h"
20 /* called when a cache lookup succeeds */
22 /* XXX PJB: the intent here is to make sure that inodes which are
23 currently primary inodes under .snap directories are dropped when
24 they are COWED. It seems hard to me to get semantics that are equally
25 good as for mounted snap_clone file systems, but we should try to get
28 static int currentfs_dentry_revalidate(struct dentry *de, int flag)
30 // struct inode *inode = de->d_inode;
33 /* unless an ancestor is a .snap directory there is nothing to do */
35 if ( !currentfs_is_under_dotsnap(dentry) ) {
39 /* XXX PJB get this to work guys! */
40 if ( de->d_parent == "dotsnap inode" &&
41 inode_is_newer_than(find_time_by_name(de->d_parent->d_name.name))){
43 2. make sure the VFS does a new lookup
44 3. probably all you need to do is
52 struct dentry_operations currentfs_dentry_ops =
54 d_revalidate: currentfs_dentry_revalidate