ext3-extents-in-ea-exports-symbol-2.6.7.patch
ext3-mds-num-2.6.10-fc3.patch
ext3-fid-2.6.7.patch
+ext3-raw-lookup-2.6.10.patch
esac # $BACKINGFS
])
+# check lookup_raw
+AC_DEFUN([LC_CONFIG_LOOKUP_RAW],
+[AC_MSG_CHECKING([whether to have raw lookup patch])
+HAVE_LOOKUP_RAW="`grep -c -s 'raw-lookup' $LUSTRE/kernel_patches/series/ldiskfs-$LDISKFS_SERIES`"
+
+if test x$HAVE_LOOKUP_RAW = "x1" ; then
+ AC_DEFINE(HAVE_LOOKUP_RAW, 1,
+ [kernel have lookup raw patch])
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+])
+
#
# LC_CONFIG_PINGER
#
AC_DEFUN([LC_PROG_LINUX],
[if test x$enable_server = xyes ; then
LC_CONFIG_BACKINGFS
+ LC_CONFIG_LOOKUP_RAW
fi
LC_CONFIG_PINGER
LC_CONFIG_GSS
--- /dev/null
+Index: linux-2.6.10/fs/ext3/namei.c
+===================================================================
+--- linux-2.6.10.orig/fs/ext3/namei.c 2005-05-31 22:20:10.000000000 +0800
++++ linux-2.6.10/fs/ext3/namei.c 2005-05-31 22:20:10.000000000 +0800
+@@ -1178,6 +1178,36 @@
+ return iopen_connect_dentry(dentry, inode, 1);
+ }
+
++static int ext3_lookup_raw(struct inode *dir, const char *name,
++ int len, ino_t *data)
++{
++ struct ext3_dir_entry_2 *de;
++ struct buffer_head *bh;
++ struct dentry parent;
++ struct dentry dentry;
++ void *lock = NULL;
++
++ if (len > EXT3_NAME_LEN)
++ return -ENAMETOOLONG;
++
++ parent.d_inode = dir;
++ dentry.d_parent = &parent;
++ dentry.d_name.name = name;
++ dentry.d_name.len = len;
++
++ bh = ext3_find_entry(&dentry, &de, 0, &lock);
++ if (bh) {
++ unsigned long ino = le32_to_cpu(de->inode);
++ ext3_unlock_htree(dir, lock);
++ brelse (bh);
++ if (data)
++ *data = ino;
++ return 0; /* found name */
++ }
++
++ return -ENOENT;
++}
++
+
+ struct dentry *ext3_get_parent(struct dentry *child)
+ {
+@@ -2854,6 +2884,7 @@
+ struct inode_operations ext3_dir_inode_operations = {
+ .create = ext3_create,
+ .lookup = ext3_lookup,
++ .lookup_raw = ext3_lookup_raw,
+ .link = ext3_link,
+ .unlink = ext3_unlink,
+ .symlink = ext3_symlink,
Index: linux-2.6.10/fs/namei.c
===================================================================
---- linux-2.6.10.orig/fs/namei.c 2005-03-31 17:43:42.417809208 +0800
-+++ linux-2.6.10/fs/namei.c 2005-03-31 17:47:14.292599344 +0800
+--- linux-2.6.10.orig/fs/namei.c 2005-05-18 11:50:10.000000000 +0800
++++ linux-2.6.10/fs/namei.c 2005-05-18 11:50:11.000000000 +0800
@@ -474,6 +474,7 @@
intent_init(&nd->intent.open, it.op);
nd->intent.open.flags = it.flags;
if (newnd.last_type != LAST_NORM)
Index: linux-2.6.10/include/linux/fs.h
===================================================================
---- linux-2.6.10.orig/include/linux/fs.h 2005-03-31 17:03:37.000000000 +0800
-+++ linux-2.6.10/include/linux/fs.h 2005-03-31 17:46:35.715463960 +0800
-@@ -956,6 +956,7 @@
+--- linux-2.6.10.orig/include/linux/fs.h 2005-05-18 11:50:10.000000000 +0800
++++ linux-2.6.10/include/linux/fs.h 2005-05-31 22:22:38.000000000 +0800
+@@ -943,6 +943,7 @@
+ int (*mkdir) (struct inode *,struct dentry *,int);
+ int (*rmdir) (struct inode *,struct dentry *);
+ int (*mknod) (struct inode *,struct dentry *,int,dev_t);
++ int (*lookup_raw) (struct inode *, const char *, int, ino_t *);
+ int (*rename) (struct inode *, struct dentry *,
+ struct inode *, struct dentry *);
+ int (*readlink) (struct dentry *, char __user *,int);
+@@ -956,6 +957,7 @@
ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
ssize_t (*listxattr) (struct dentry *, char *, size_t);
int (*removexattr) (struct dentry *, const char *);
struct seq_file;
Index: linux-2.6.10/include/linux/namei.h
===================================================================
---- linux-2.6.10.orig/include/linux/namei.h 2005-03-31 17:43:42.472800848 +0800
-+++ linux-2.6.10/include/linux/namei.h 2005-03-31 17:50:12.533502608 +0800
+--- linux-2.6.10.orig/include/linux/namei.h 2005-05-18 11:50:10.000000000 +0800
++++ linux-2.6.10/include/linux/namei.h 2005-05-18 11:50:11.000000000 +0800
@@ -15,8 +15,19 @@
#define IT_UNLINK (1<<5)
#define IT_TRUNC (1<<6)
ext3-extents-in-ea-exports-symbol-2.6.7.patch
ext3-mds-num-2.6.10-fc3.patch
ext3-fid-2.6.7.patch
+ext3-raw-lookup-2.6.10.patch
LASSERT(lustre_msg_get_flags(req->rq_reqmsg) & MSG_RESENT);
resent_req = 1;
}
-#if 0
#if HAVE_LOOKUP_RAW
if (body->valid == OBD_MD_FLID) {
struct mds_body *mds_reply;
rc = PTR_ERR(dparent);
GOTO(cleanup, rc);
}
-
/*
* the user requested ONLY the inode number, so do a raw lookup.
*/
GOTO(cleanup, rc);
}
#endif
-#endif
if (resent_req == 0) {
LASSERT(id_fid(&body->id1) != 0);
if (name) {
RETURN(rdentry);
}
+static int smfs_lookup_raw(struct inode *dir, const char *name,
+ int len, ino_t *data)
+{
+ struct inode *cache_dir = I2CI(dir);
+ int rc = 0;
+
+ if (!cache_dir)
+ RETURN(-ENOENT);
+
+ if (cache_dir->i_op->lookup_raw) {
+ rc = cache_dir->i_op->lookup_raw(cache_dir, name, len, data);
+ } else {
+ CWARN("do not have raw lookup ops in bottom fs\n");
+ }
+
+ RETURN(rc);
+}
+
static int smfs_link(struct dentry *old_dentry,
struct inode *dir, struct dentry *dentry)
{
struct inode_operations smfs_dir_iops = {
create: smfs_create,
lookup: smfs_lookup,
+ lookup_raw: smfs_lookup_raw,
link: smfs_link, /* BKL held */
unlink: smfs_unlink, /* BKL held */
symlink: smfs_symlink, /* BKL held */