Skip to contentSkip to conversation

Lustre VFS patches for 2.6

PATCH In review Oleg Drokin 1 participant 1 message Jul 7, 2004 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 2/9 Lustre VFS patches for 2.6

%diffstat

 fs/dcache.c            |    7 +++++++
 include/linux/dcache.h |    1 +
 2 files changed, 8 insertions(+)

%patch

fs/dcache.c +7 -0
Index: linux-2.6.6/fs/dcache.c
===================================================================
@@ -217,6 +217,13 @@ int d_invalidate(struct dentry * dentry)
 		spin_unlock(&dcache_lock);
 		return 0;
 	}
+
+	/* network invalidation by Lustre */
+	if (dentry->d_flags & DCACHE_LUSTRE_INVALID) {
+		spin_unlock(&dcache_lock);
+		return 0;
+	}
+
 	/*
 	 * Check whether to do a partial shrink_dcache
 	 * to get rid of unused child entries.
include/linux/dcache.h +1 -0
Index: linux-2.6.6/include/linux/dcache.h
===================================================================
@@ -153,6 +153,7 @@ d_iput:		no		no		yes
 
 #define DCACHE_REFERENCED	0x0008  /* Recently used, don't discard. */
 #define DCACHE_UNHASHED		0x0010	
+#define DCACHE_LUSTRE_INVALID	0x0020	/* invalidated by Lustre */
 
 extern spinlock_t dcache_lock;