diff -ru linux-2.6.3-10mdk/fs/attr.c /usr/src/linux/fs/attr.c --- linux-2.6.3-10mdk/fs/attr.c 2004-02-18 04:57:16.000000000 +0100 +++ /usr/src/linux/fs/attr.c 2004-05-31 13:26:40.000000000 +0200 @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -184,8 +185,10 @@ } if (!error) { unsigned long dn_mask = setattr_mask(ia_valid); - if (dn_mask) + if (dn_mask) { dnotify_parent(dentry, dn_mask); + } + nonotify_parent(dentry); } return error; } diff -ru linux-2.6.3-10mdk/fs/inode.c /usr/src/linux/fs/inode.c --- linux-2.6.3-10mdk/fs/inode.c 2004-04-19 18:54:32.000000000 +0200 +++ /usr/src/linux/fs/inode.c 2004-05-31 13:31:21.000000000 +0200 @@ -151,6 +151,9 @@ mapping->backing_dev_info = sb->s_bdev->bd_inode->i_mapping->backing_dev_info; memset(&inode->u, 0, sizeof(inode->u)); inode->i_mapping = mapping; + + /* Nonotify: Initially set dcontents_mtime to the current time. Why? When the inode object gets lost and reallocated, "clients" should reread the directory. */ + inode->i_dcontents_mtime = current_kernel_time(); } return inode; } diff -ru linux-2.6.3-10mdk/fs/Makefile /usr/src/linux/fs/Makefile --- linux-2.6.3-10mdk/fs/Makefile 2004-04-19 18:54:32.000000000 +0200 +++ /usr/src/linux/fs/Makefile 2004-05-31 13:29:46.000000000 +0200 @@ -10,7 +10,7 @@ namei.o fcntl.o ioctl.o readdir.o select.o fifo.o locks.o \ dcache.o inode.o attr.o bad_inode.o file.o dnotify.o \ filesystems.o namespace.o seq_file.o xattr.o libfs.o \ - fs-writeback.o mpage.o direct-io.o aio.o + fs-writeback.o mpage.o direct-io.o aio.o nonotify.o obj-$(CONFIG_EPOLL) += eventpoll.o obj-$(CONFIG_COMPAT) += compat.o diff -ru linux-2.6.3-10mdk/fs/read_write.c /usr/src/linux/fs/read_write.c --- linux-2.6.3-10mdk/fs/read_write.c 2004-02-18 04:58:33.000000000 +0100 +++ /usr/src/linux/fs/read_write.c 2004-05-31 13:11:20.000000000 +0200 @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -257,8 +258,10 @@ ret = file->f_op->write(file, buf, count, pos); else ret = do_sync_write(file, buf, count, pos); - if (ret > 0) + if (ret > 0) { dnotify_parent(file->f_dentry, DN_MODIFY); + nonotify_parent(file->f_dentry); + } } } @@ -471,9 +474,11 @@ out: if (iov != iovstack) kfree(iov); - if ((ret + (type == READ)) > 0) + if ((ret + (type == READ)) > 0) { dnotify_parent(file->f_dentry, (type == READ) ? DN_ACCESS : DN_MODIFY); + if (DN_MODIFY) nonotify_parent(file->f_dentry); + } return ret; } diff -ru linux-2.6.3-10mdk/fs/stat.c /usr/src/linux/fs/stat.c --- linux-2.6.3-10mdk/fs/stat.c 2004-02-18 04:57:17.000000000 +0100 +++ /usr/src/linux/fs/stat.c 2004-05-31 13:16:08.000000000 +0200 @@ -32,6 +32,7 @@ stat->size = i_size_read(inode); stat->blocks = inode->i_blocks; stat->blksize = inode->i_blksize; + stat->contents_mtime = inode->i_dcontents_mtime; /* Nonotify */ } EXPORT_SYMBOL(generic_fillattr); @@ -222,6 +223,17 @@ #endif tmp.st_blocks = stat->blocks; tmp.st_blksize = stat->blksize; + + /* Nonotify hack: use unused structure members for contents_mtime + This is just for testing - We will need an extra system-call for + reading contents_mtime! + */ + + tmp.__unused4 = stat->contents_mtime.tv_sec; + tmp.__unused5 = stat->contents_mtime.tv_nsec; + + /* end hack */ + return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; } diff -ru linux-2.6.3-10mdk/include/linux/fs.h /usr/src/linux/include/linux/fs.h --- linux-2.6.3-10mdk/include/linux/fs.h 2004-04-19 18:54:32.000000000 +0200 +++ /usr/src/linux/include/linux/fs.h 2004-05-31 12:39:48.000000000 +0200 @@ -415,6 +415,8 @@ unsigned long i_dnotify_mask; /* Directory notify events */ struct dnotify_struct *i_dnotify; /* for directory notifications */ + struct timespec i_dcontents_mtime; /* Nonotify: Time of last modification of a file in this directory or time this inode object has been allocated */ + unsigned long i_state; unsigned int i_flags; diff -ru linux-2.6.3-10mdk/include/linux/stat.h /usr/src/linux/include/linux/stat.h --- linux-2.6.3-10mdk/include/linux/stat.h 2004-02-18 04:57:24.000000000 +0100 +++ /usr/src/linux/include/linux/stat.h 2004-05-26 23:23:23.000000000 +0200 @@ -70,6 +70,7 @@ struct timespec ctime; unsigned long blksize; unsigned long blocks; + struct timespec contents_mtime; }; #endif