From 17704ab116785c91c64ad74b58ab1cf0358654d1 Mon Sep 17 00:00:00 2001 From: ericm Date: Wed, 6 Sep 2006 04:12:54 +0000 Subject: [PATCH] branch: b1_8 update from b1_5 (20060905_2150) --- .../patches/nfs-cifs-intent-2.6.18-vanilla.patch | 120 --------- .../patches/vfs_intent-2.6.18-vanilla.patch | 287 +++++++-------------- lustre/kernel_patches/series/2.6.18-vanilla.series | 5 +- lustre/mgc/libmgc.c | 5 +- lustre/ptlrpc/wiretest.c | 19 +- 5 files changed, 106 insertions(+), 330 deletions(-) delete mode 100644 lustre/kernel_patches/patches/nfs-cifs-intent-2.6.18-vanilla.patch diff --git a/lustre/kernel_patches/patches/nfs-cifs-intent-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/nfs-cifs-intent-2.6.18-vanilla.patch deleted file mode 100644 index 5639fe4..0000000 --- a/lustre/kernel_patches/patches/nfs-cifs-intent-2.6.18-vanilla.patch +++ /dev/null @@ -1,120 +0,0 @@ -Index: linux-2.6/fs/cifs/dir.c -=================================================================== ---- linux-2.6.orig/fs/cifs/dir.c 2006-07-15 21:04:01.000000000 +0800 -+++ linux-2.6/fs/cifs/dir.c 2006-07-15 21:04:47.000000000 +0800 -@@ -146,7 +146,7 @@ cifs_create(struct inode *inode, struct - } - - if(nd && (nd->flags & LOOKUP_OPEN)) { -- int oflags = nd->intent.open.flags; -+ int oflags = nd->intent.flags; - - desiredAccess = 0; - if (oflags & FMODE_READ) -Index: linux-2.6/fs/nfs/dir.c -=================================================================== ---- linux-2.6.orig/fs/nfs/dir.c 2006-07-15 21:04:01.000000000 +0800 -+++ linux-2.6/fs/nfs/dir.c 2006-07-15 21:04:47.000000000 +0800 -@@ -867,7 +867,7 @@ int nfs_is_exclusive_create(struct inode - return 0; - if (nd == NULL || nfs_lookup_check_intent(nd, LOOKUP_CREATE) == 0) - return 0; -- return (nd->intent.open.flags & O_EXCL) != 0; -+ return (nd->intent.it_flags & O_EXCL) != 0; - } - - static inline int nfs_reval_fsid(struct inode *dir, -@@ -955,7 +955,7 @@ static int is_atomic_open(struct inode * - if (nd->flags & LOOKUP_DIRECTORY) - return 0; - /* Are we trying to write to a read only partition? */ -- if (IS_RDONLY(dir) && (nd->intent.open.flags & (O_CREAT|O_TRUNC|FMODE_WRITE))) -+ if (IS_RDONLY(dir) && (nd->intent.it_flags & (O_CREAT|O_TRUNC|FMODE_WRITE))) - return 0; - return 1; - } -@@ -979,7 +979,7 @@ static struct dentry *nfs_atomic_lookup( - dentry->d_op = NFS_PROTO(dir)->dentry_ops; - - /* Let vfs_create() deal with O_EXCL */ -- if (nd->intent.open.flags & O_EXCL) { -+ if (nd->intent.it_flags & O_EXCL) { - d_add(dentry, NULL); - goto out; - } -@@ -994,7 +994,7 @@ static struct dentry *nfs_atomic_lookup( - goto out; - } - -- if (nd->intent.open.flags & O_CREAT) { -+ if (nd->intent.it_flags & O_CREAT) { - nfs_begin_data_update(dir); - res = nfs4_atomic_open(dir, dentry, nd); - nfs_end_data_update(dir); -@@ -1013,7 +1013,7 @@ static struct dentry *nfs_atomic_lookup( - case -ENOTDIR: - goto no_open; - case -ELOOP: -- if (!(nd->intent.open.flags & O_NOFOLLOW)) -+ if (!(nd->intent.it_flags & O_NOFOLLOW)) - goto no_open; - /* case -EINVAL: */ - default: -@@ -1049,7 +1049,7 @@ static int nfs_open_revalidate(struct de - /* NFS only supports OPEN on regular files */ - if (!S_ISREG(inode->i_mode)) - goto no_open; -- openflags = nd->intent.open.flags; -+ openflags = nd->intent.it_flags; - /* We cannot do exclusive creation on a positive dentry */ - if ((openflags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL)) - goto no_open; -@@ -1182,7 +1182,7 @@ static int nfs_create(struct inode *dir, - attr.ia_valid = ATTR_MODE; - - if (nd && (nd->flags & LOOKUP_CREATE)) -- open_flags = nd->intent.open.flags; -+ open_flags = nd->intent.it_flags; - - lock_kernel(); - nfs_begin_data_update(dir); -Index: linux-2.6/fs/nfs/nfs4proc.c -=================================================================== ---- linux-2.6.orig/fs/nfs/nfs4proc.c 2006-07-15 21:04:01.000000000 +0800 -+++ linux-2.6/fs/nfs/nfs4proc.c 2006-07-15 21:09:29.000000000 +0800 -@@ -1246,7 +1246,7 @@ static int nfs4_intent_set_file(struct n - ctx->state = state; - return 0; - } -- nfs4_close_state(state, nd->intent.open.flags); -+ nfs4_close_state(state, nd->intent.flags); - return PTR_ERR(filp); - } - -@@ -1259,22 +1259,22 @@ nfs4_atomic_open(struct inode *dir, stru - struct dentry *res; - - if (nd->flags & LOOKUP_CREATE) { -- attr.ia_mode = nd->intent.open.create_mode; -+ attr.ia_mode = nd->intent.create_mode; - attr.ia_valid = ATTR_MODE; - if (!IS_POSIXACL(dir)) - attr.ia_mode &= ~current->fs->umask; - } else { - attr.ia_valid = 0; -- BUG_ON(nd->intent.open.flags & O_CREAT); -+ BUG_ON(nd->intent.flags & O_CREAT); - } - - cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0); - if (IS_ERR(cred)) - return (struct dentry *)cred; -- state = nfs4_do_open(dir, dentry, nd->intent.open.flags, &attr, cred); -+ state = nfs4_do_open(dir, dentry, nd->intent.flags, &attr, cred); - put_rpccred(cred); - if (IS_ERR(state)) { -- if (PTR_ERR(state) == -ENOENT) -+ ose_statef (PTR_ERR(state) == -ENOENT); - d_add(dentry, NULL); - return (struct dentry *)state; - } diff --git a/lustre/kernel_patches/patches/vfs_intent-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/vfs_intent-2.6.18-vanilla.patch index 6e86bde..1344b59 100644 --- a/lustre/kernel_patches/patches/vfs_intent-2.6.18-vanilla.patch +++ b/lustre/kernel_patches/patches/vfs_intent-2.6.18-vanilla.patch @@ -1,7 +1,7 @@ Index: linux-2.6/fs/inode.c =================================================================== ---- linux-2.6.orig/fs/inode.c 2006-07-15 21:04:02.000000000 +0800 -+++ linux-2.6/fs/inode.c 2006-07-15 21:04:08.000000000 +0800 +--- linux-2.6.orig/fs/inode.c 2006-08-31 11:17:39.000000000 +0800 ++++ linux-2.6/fs/inode.c 2006-08-31 11:23:48.000000000 +0800 @@ -234,6 +234,7 @@ void __iget(struct inode * inode) inodes_stat.nr_unused--; } @@ -12,14 +12,13 @@ Index: linux-2.6/fs/inode.c * @inode: inode to clear Index: linux-2.6/fs/open.c =================================================================== ---- linux-2.6.orig/fs/open.c 2006-07-15 21:04:02.000000000 +0800 -+++ linux-2.6/fs/open.c 2006-07-15 21:04:08.000000000 +0800 -@@ -225,12 +225,12 @@ static long do_sys_truncate(const char _ - struct nameidata nd; +--- linux-2.6.orig/fs/open.c 2006-08-31 11:17:39.000000000 +0800 ++++ linux-2.6/fs/open.c 2006-08-31 11:59:09.000000000 +0800 +@@ -226,11 +226,12 @@ static long do_sys_truncate(const char _ struct inode * inode; int error; -- -+ intent_init(&nd.intent, IT_GETATTR); + ++ intent_init(&nd.intent.open, IT_GETATTR); error = -EINVAL; if (length < 0) /* sorry, but loff_t says... */ goto out; @@ -29,15 +28,15 @@ Index: linux-2.6/fs/open.c if (error) goto out; inode = nd.dentry->d_inode; -@@ -495,6 +495,7 @@ asmlinkage long sys_faccessat(int dfd, c +@@ -495,6 +496,7 @@ asmlinkage long sys_faccessat(int dfd, c int old_fsuid, old_fsgid; kernel_cap_t old_cap; int res; -+ intent_init(&nd.intent, IT_GETATTR); ++ intent_init(&nd.intent.open, IT_GETATTR); if (mode & ~S_IRWXO) /* where's F_OK, X_OK, W_OK, R_OK? */ return -EINVAL; -@@ -519,7 +520,7 @@ asmlinkage long sys_faccessat(int dfd, c +@@ -519,7 +521,7 @@ asmlinkage long sys_faccessat(int dfd, c else current->cap_effective = current->cap_permitted; @@ -46,29 +45,29 @@ Index: linux-2.6/fs/open.c if (!res) { res = vfs_permission(&nd, mode); /* SuS v2 requires we report a read only fs too */ -@@ -545,8 +546,9 @@ asmlinkage long sys_chdir(const char __u +@@ -545,8 +547,9 @@ asmlinkage long sys_chdir(const char __u { struct nameidata nd; int error; -+ intent_init(&nd.intent, IT_GETATTR); ++ intent_init(&nd.intent.open, IT_GETATTR); - error = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd); + error = __user_walk_it(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd); if (error) goto out; -@@ -596,8 +598,9 @@ asmlinkage long sys_chroot(const char __ +@@ -596,8 +599,9 @@ asmlinkage long sys_chroot(const char __ { struct nameidata nd; int error; -+ intent_init(&nd.intent, IT_GETATTR); ++ intent_init(&nd.intent.open, IT_GETATTR); - error = __user_walk(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd); + error = __user_walk_it(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd); if (error) goto out; -@@ -823,6 +826,7 @@ static struct file *__dentry_open(struct +@@ -823,6 +827,7 @@ static struct file *__dentry_open(struct error = open(inode, f); if (error) goto cleanup_all; @@ -76,7 +75,7 @@ Index: linux-2.6/fs/open.c } f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC); -@@ -849,6 +853,7 @@ cleanup_all: +@@ -849,6 +854,7 @@ cleanup_all: f->f_dentry = NULL; f->f_vfsmnt = NULL; cleanup_file: @@ -84,67 +83,39 @@ Index: linux-2.6/fs/open.c put_filp(f); dput(dentry); mntput(mnt); -@@ -874,6 +879,7 @@ static struct file *do_filp_open(int dfd +@@ -874,6 +880,7 @@ static struct file *do_filp_open(int dfd { int namei_flags, error; struct nameidata nd; -+ intent_init(&nd.intent, IT_OPEN); ++ intent_init(&nd.intent.open, IT_OPEN); namei_flags = flags; if ((namei_flags+1) & O_ACCMODE) -@@ -914,19 +920,19 @@ EXPORT_SYMBOL(filp_open); - struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry, - int (*open)(struct inode *, struct file *)) - { -- if (IS_ERR(nd->intent.open.file)) -+ if (IS_ERR(nd->intent.file)) - goto out; - if (IS_ERR(dentry)) - goto out_err; -- nd->intent.open.file = __dentry_open(dget(dentry), mntget(nd->mnt), -- nd->intent.open.flags - 1, -- nd->intent.open.file, -+ nd->intent.file = __dentry_open(dget(dentry), mntget(nd->mnt), -+ nd->intent.flags - 1, -+ nd->intent.file, - open); - out: -- return nd->intent.open.file; -+ return nd->intent.file; - out_err: - release_open_intent(nd); -- nd->intent.open.file = (struct file *)dentry; -+ nd->intent.file = (struct file *)dentry; - goto out; - } - EXPORT_SYMBOL_GPL(lookup_instantiate_filp); -@@ -943,7 +949,8 @@ struct file *nameidata_to_filp(struct na - struct file *filp; +@@ -944,6 +951,7 @@ struct file *nameidata_to_filp(struct na /* Pick up the filp from the open intent */ -- filp = nd->intent.open.file; -+ filp = nd->intent.file; -+ filp->f_it = &nd->intent; + filp = nd->intent.open.file; ++ filp->f_it = &nd->intent.open; /* Has the filesystem initialised the file for us? */ if (filp->f_dentry == NULL) filp = __dentry_open(nd->dentry, nd->mnt, flags, filp, NULL); Index: linux-2.6/fs/nfsctl.c =================================================================== ---- linux-2.6.orig/fs/nfsctl.c 2006-07-15 21:04:02.000000000 +0800 -+++ linux-2.6/fs/nfsctl.c 2006-07-15 21:04:08.000000000 +0800 +--- linux-2.6.orig/fs/nfsctl.c 2006-08-31 11:17:39.000000000 +0800 ++++ linux-2.6/fs/nfsctl.c 2006-08-31 11:23:48.000000000 +0800 @@ -25,6 +25,7 @@ static struct file *do_open(char *name, struct nameidata nd; int error; -+ intent_init(&nd.intent, IT_OPEN); ++ intent_init(&nd.intent.open, IT_OPEN); nd.mnt = do_kern_mount("nfsd", 0, "nfsd", NULL); if (IS_ERR(nd.mnt)) Index: linux-2.6/fs/namei.c =================================================================== ---- linux-2.6.orig/fs/namei.c 2006-07-15 21:04:02.000000000 +0800 -+++ linux-2.6/fs/namei.c 2006-07-15 21:04:36.000000000 +0800 -@@ -337,8 +337,19 @@ int deny_write_access(struct file * file +--- linux-2.6.orig/fs/namei.c 2006-08-31 11:17:39.000000000 +0800 ++++ linux-2.6/fs/namei.c 2006-08-31 11:59:09.000000000 +0800 +@@ -344,8 +344,19 @@ int deny_write_access(struct file * file return 0; } @@ -164,21 +135,7 @@ Index: linux-2.6/fs/namei.c dput(nd->dentry); mntput(nd->mnt); } -@@ -359,10 +370,10 @@ void path_release_on_umount(struct namei - */ - void release_open_intent(struct nameidata *nd) - { -- if (nd->intent.open.file->f_dentry == NULL) -- put_filp(nd->intent.open.file); -+ if (nd->intent.file->f_dentry == NULL) -+ put_filp(nd->intent.file); - else -- fput(nd->intent.open.file); -+ fput(nd->intent.file); - } - - /* -@@ -440,8 +451,12 @@ static struct dentry * real_lookup(struc +@@ -447,8 +458,12 @@ static struct dentry * real_lookup(struc { struct dentry * result; struct inode *dir = parent->d_inode; @@ -191,7 +148,7 @@ Index: linux-2.6/fs/namei.c /* * First re-do the cached lookup just in case it was created * while we waited for the directory semaphore.. -@@ -475,13 +490,16 @@ static struct dentry * real_lookup(struc +@@ -482,13 +497,16 @@ static struct dentry * real_lookup(struc * Uhhuh! Nasty case: the cache was re-populated while * we waited on the semaphore. Need to revalidate. */ @@ -210,28 +167,28 @@ Index: linux-2.6/fs/namei.c return result; } -@@ -509,7 +527,9 @@ walk_init_root(const char *name, struct +@@ -516,7 +534,9 @@ walk_init_root(const char *name, struct static __always_inline int __vfs_follow_link(struct nameidata *nd, const char *link) { int res = 0; -+ struct lookup_intent it = nd->intent; ++ struct lookup_intent it = nd->intent.open; char *name; + if (IS_ERR(link)) goto fail; -@@ -519,6 +539,10 @@ static __always_inline int __vfs_follow_ +@@ -526,6 +546,10 @@ static __always_inline int __vfs_follow_ /* weird __emul_prefix() stuff did it */ goto out; } -+ intent_init(&nd->intent, it.it_op); -+ nd->intent.it_flags = it.it_flags; -+ nd->intent.it_create_mode = it.it_create_mode; -+ nd->intent.file = it.file; ++ intent_init(&nd->intent.open, it.it_op); ++ nd->intent.open.it_flags = it.it_flags; ++ nd->intent.open.it_create_mode = it.it_create_mode; ++ nd->intent.open.file = it.file; res = link_path_walk(link, nd); out: if (nd->depth || res || nd->last_type!=LAST_NORM) -@@ -771,6 +795,33 @@ fail: +@@ -778,6 +802,33 @@ fail: return PTR_ERR(dentry); } @@ -265,7 +222,7 @@ Index: linux-2.6/fs/namei.c /* * Name resolution. * This is the basic name resolution function, turning a pathname into -@@ -867,7 +918,11 @@ static fastcall int __link_path_walk(con +@@ -874,7 +925,11 @@ static fastcall int __link_path_walk(con goto out_dput; if (inode->i_op->follow_link) { @@ -277,7 +234,7 @@ Index: linux-2.6/fs/namei.c if (err) goto return_err; err = -ENOENT; -@@ -902,6 +957,23 @@ last_component: +@@ -909,6 +964,23 @@ last_component: inode = nd->dentry->d_inode; /* fallthrough */ case 1: @@ -301,7 +258,7 @@ Index: linux-2.6/fs/namei.c goto return_reval; } if (nd->dentry->d_op && nd->dentry->d_op->d_hash) { -@@ -909,7 +981,9 @@ last_component: +@@ -916,7 +988,9 @@ last_component: if (err < 0) break; } @@ -311,26 +268,7 @@ Index: linux-2.6/fs/namei.c if (err) break; inode = next.dentry->d_inode; -@@ -1152,13 +1226,13 @@ static int __path_lookup_intent_open(int - - if (filp == NULL) - return -ENFILE; -- nd->intent.open.file = filp; -- nd->intent.open.flags = open_flags; -- nd->intent.open.create_mode = create_mode; -+ nd->intent.file = filp; -+ nd->intent.flags = open_flags; -+ nd->intent.create_mode = create_mode; - err = do_path_lookup(dfd, name, lookup_flags|LOOKUP_OPEN, nd); -- if (IS_ERR(nd->intent.open.file)) { -+ if (IS_ERR(nd->intent.file)) { - if (err == 0) { -- err = PTR_ERR(nd->intent.open.file); -+ err = PTR_ERR(nd->intent.file); - path_release(nd); - } - } else if (err != 0) -@@ -1261,7 +1335,7 @@ static struct dentry *lookup_hash(struct +@@ -1268,7 +1342,7 @@ static struct dentry *lookup_hash(struct } /* SMP-safe */ @@ -339,7 +277,7 @@ Index: linux-2.6/fs/namei.c { unsigned long hash; struct qstr this; -@@ -1281,11 +1355,17 @@ struct dentry * lookup_one_len(const cha +@@ -1288,11 +1362,17 @@ struct dentry * lookup_one_len(const cha } this.hash = end_name_hash(hash); @@ -358,7 +296,7 @@ Index: linux-2.6/fs/namei.c /* * namei() * -@@ -1297,8 +1377,9 @@ access: +@@ -1304,8 +1384,9 @@ access: * that namei follows links, while lnamei does not. * SMP-safe */ @@ -370,14 +308,14 @@ Index: linux-2.6/fs/namei.c { char *tmp = getname(name); int err = PTR_ERR(tmp); -@@ -1310,9 +1391,22 @@ int fastcall __user_walk_fd(int dfd, con +@@ -1317,9 +1398,22 @@ int fastcall __user_walk_fd(int dfd, con return err; } +int fastcall __user_walk_fd(int dfd, const char __user *name, unsigned flags, + struct nameidata *nd) +{ -+ intent_init(&nd->intent, IT_LOOKUP); ++ intent_init(&nd->intent.open, IT_LOOKUP); + return __user_walk_fd_it(dfd, name, flags, nd); +} + @@ -389,29 +327,29 @@ Index: linux-2.6/fs/namei.c int fastcall __user_walk(const char __user *name, unsigned flags, struct nameidata *nd) { - return __user_walk_fd(AT_FDCWD, name, flags, nd); -+ intent_init(&nd->intent, IT_LOOKUP); ++ intent_init(&nd->intent.open, IT_LOOKUP); + return __user_walk_it(name, flags, nd); } /* -@@ -1593,6 +1687,8 @@ int open_namei(int dfd, const char *path +@@ -1600,6 +1694,8 @@ int open_namei(int dfd, const char *path if (flag & O_APPEND) acc_mode |= MAY_APPEND; -+ nd->intent.it_flags = flag; -+ nd->intent.it_create_mode = mode; ++ nd->intent.open.it_flags = flag; ++ nd->intent.open.it_create_mode = mode; /* * The simplest case - just a plain lookup. */ -@@ -1607,6 +1703,7 @@ int open_namei(int dfd, const char *path +@@ -1614,6 +1710,7 @@ int open_namei(int dfd, const char *path /* * Create - we need to know the parent. */ -+ nd->intent.it_op |= IT_CREAT; ++ nd->intent.open.it_op |= IT_CREAT; error = path_lookup_create(dfd,pathname,LOOKUP_PARENT,nd,flag,mode); if (error) return error; -@@ -1623,7 +1720,9 @@ int open_namei(int dfd, const char *path +@@ -1630,7 +1727,9 @@ int open_namei(int dfd, const char *path dir = nd->dentry; nd->flags &= ~LOOKUP_PARENT; mutex_lock(&dir->d_inode->i_mutex); @@ -421,28 +359,7 @@ Index: linux-2.6/fs/namei.c path.mnt = nd->mnt; do_last: -@@ -1633,9 +1732,9 @@ do_last: - goto exit; - } - -- if (IS_ERR(nd->intent.open.file)) { -+ if (IS_ERR(nd->intent.file)) { - mutex_unlock(&dir->d_inode->i_mutex); -- error = PTR_ERR(nd->intent.open.file); -+ error = PTR_ERR(nd->intent.file); - goto exit_dput; - } - -@@ -1688,7 +1787,7 @@ ok: - exit_dput: - dput_path(&path, nd); - exit: -- if (!IS_ERR(nd->intent.open.file)) -+ if (!IS_ERR(nd->intent.file)) - release_open_intent(nd); - path_release(nd); - return error; -@@ -1731,7 +1830,9 @@ do_link: +@@ -1746,7 +1845,9 @@ do_link: } dir = nd->dentry; mutex_lock(&dir->d_inode->i_mutex); @@ -452,17 +369,17 @@ Index: linux-2.6/fs/namei.c path.mnt = nd->mnt; __putname(nd->last.name); goto do_last; -@@ -2243,6 +2344,9 @@ asmlinkage long sys_linkat(int olddfd, c +@@ -2260,6 +2361,9 @@ asmlinkage long sys_linkat(int olddfd, c int error; char * to; -+ intent_init(&nd.intent, IT_LOOKUP); -+ intent_init(&old_nd.intent, IT_LOOKUP); ++ intent_init(&nd.intent.open, IT_LOOKUP); ++ intent_init(&old_nd.intent.open, IT_LOOKUP); + if ((flags & ~AT_SYMLINK_FOLLOW) != 0) return -EINVAL; -@@ -2250,7 +2354,7 @@ asmlinkage long sys_linkat(int olddfd, c +@@ -2267,7 +2371,7 @@ asmlinkage long sys_linkat(int olddfd, c if (IS_ERR(to)) return PTR_ERR(to); @@ -473,8 +390,8 @@ Index: linux-2.6/fs/namei.c if (error) Index: linux-2.6/fs/stat.c =================================================================== ---- linux-2.6.orig/fs/stat.c 2006-07-15 21:04:02.000000000 +0800 -+++ linux-2.6/fs/stat.c 2006-07-15 21:04:08.000000000 +0800 +--- linux-2.6.orig/fs/stat.c 2006-08-31 11:17:39.000000000 +0800 ++++ linux-2.6/fs/stat.c 2006-08-31 11:23:48.000000000 +0800 @@ -37,7 +37,7 @@ void generic_fillattr(struct inode *inod EXPORT_SYMBOL(generic_fillattr); @@ -510,11 +427,11 @@ Index: linux-2.6/fs/stat.c int error; - error = __user_walk_fd(dfd, name, LOOKUP_FOLLOW, &nd); -+ intent_init(&nd.intent, IT_GETATTR); ++ intent_init(&nd.intent.open, IT_GETATTR); + error = __user_walk_fd_it(dfd, name, LOOKUP_FOLLOW, &nd); if (!error) { - error = vfs_getattr(nd.mnt, nd.dentry, stat); -+ error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat); ++ error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent.open, stat); path_release(&nd); } return error; @@ -523,11 +440,11 @@ Index: linux-2.6/fs/stat.c int error; - error = __user_walk_fd(dfd, name, 0, &nd); -+ intent_init(&nd.intent, IT_GETATTR); ++ intent_init(&nd.intent.open, IT_GETATTR); + error = __user_walk_fd_it(dfd, name, 0, &nd); if (!error) { - error = vfs_getattr(nd.mnt, nd.dentry, stat); -+ error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat); ++ error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent.open, stat); path_release(&nd); } return error; @@ -536,19 +453,19 @@ Index: linux-2.6/fs/stat.c struct file *f = fget(fd); int error = -EBADF; + struct nameidata nd; -+ intent_init(&nd.intent, IT_GETATTR); ++ intent_init(&nd.intent.open, IT_GETATTR); if (f) { - error = vfs_getattr(f->f_vfsmnt, f->f_dentry, stat); -+ error = vfs_getattr_it(f->f_vfsmnt, f->f_dentry, &nd.intent, stat); -+ intent_release(&nd.intent); ++ error = vfs_getattr_it(f->f_vfsmnt, f->f_dentry, &nd.intent.open, stat); ++ intent_release(&nd.intent.open); fput(f); } return error; Index: linux-2.6/fs/namespace.c =================================================================== ---- linux-2.6.orig/fs/namespace.c 2006-07-15 21:04:02.000000000 +0800 -+++ linux-2.6/fs/namespace.c 2006-07-15 21:04:08.000000000 +0800 +--- linux-2.6.orig/fs/namespace.c 2006-08-31 11:17:39.000000000 +0800 ++++ linux-2.6/fs/namespace.c 2006-08-31 11:59:07.000000000 +0800 @@ -73,6 +73,7 @@ struct vfsmount *alloc_vfsmnt(const char INIT_LIST_HEAD(&mnt->mnt_share); INIT_LIST_HEAD(&mnt->mnt_slave_list); @@ -588,7 +505,7 @@ Index: linux-2.6/fs/namespace.c return err; if (!old_name || !*old_name) return -EINVAL; -+ intent_init(&old_nd.intent, IT_LOOKUP); ++ intent_init(&old_nd.intent.open, IT_LOOKUP); err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd); if (err) return err; @@ -596,7 +513,7 @@ Index: linux-2.6/fs/namespace.c return -EPERM; if (!old_name || !*old_name) return -EINVAL; -+ intent_init(&old_nd.intent, IT_LOOKUP); ++ intent_init(&old_nd.intent.open, IT_LOOKUP); err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd); if (err) return err; @@ -604,19 +521,19 @@ Index: linux-2.6/fs/namespace.c int retval = 0; int mnt_flags = 0; -+ intent_init(&nd.intent, IT_LOOKUP); ++ intent_init(&nd.intent.open, IT_LOOKUP); /* Discard magic */ if ((flags & MS_MGC_MSK) == MS_MGC_VAL) flags &= ~MS_MGC_MSK; Index: linux-2.6/fs/exec.c =================================================================== ---- linux-2.6.orig/fs/exec.c 2006-07-15 21:04:02.000000000 +0800 -+++ linux-2.6/fs/exec.c 2006-07-15 21:04:08.000000000 +0800 +--- linux-2.6.orig/fs/exec.c 2006-08-31 11:17:39.000000000 +0800 ++++ linux-2.6/fs/exec.c 2006-08-31 11:59:09.000000000 +0800 @@ -127,6 +127,7 @@ asmlinkage long sys_uselib(const char __ struct nameidata nd; int error; -+ intent_init(&nd.intent, IT_OPEN); ++ intent_init(&nd.intent.open, IT_OPEN); error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, FMODE_READ|FMODE_EXEC); if (error) goto out; @@ -624,26 +541,19 @@ Index: linux-2.6/fs/exec.c int err; struct file *file; -+ intent_init(&nd.intent, IT_OPEN); ++ intent_init(&nd.intent.open, IT_OPEN); err = path_lookup_open(AT_FDCWD, name, LOOKUP_FOLLOW, &nd, FMODE_READ|FMODE_EXEC); file = ERR_PTR(err); Index: linux-2.6/include/linux/dcache.h =================================================================== ---- linux-2.6.orig/include/linux/dcache.h 2006-07-15 21:04:02.000000000 +0800 -+++ linux-2.6/include/linux/dcache.h 2006-07-15 21:04:08.000000000 +0800 -@@ -4,6 +4,7 @@ - #ifdef __KERNEL__ - - #include -+#include - #include - #include - #include -@@ -36,6 +37,8 @@ struct qstr { +--- linux-2.6.orig/include/linux/dcache.h 2006-08-31 11:17:39.000000000 +0800 ++++ linux-2.6/include/linux/dcache.h 2006-08-31 12:00:07.000000000 +0800 +@@ -36,6 +36,9 @@ struct qstr { const unsigned char *name; }; ++struct inode; +#include + struct dentry_stat_t { @@ -651,8 +561,8 @@ Index: linux-2.6/include/linux/dcache.h int nr_unused; Index: linux-2.6/include/linux/fs.h =================================================================== ---- linux-2.6.orig/include/linux/fs.h 2006-07-15 21:04:02.000000000 +0800 -+++ linux-2.6/include/linux/fs.h 2006-07-15 21:04:08.000000000 +0800 +--- linux-2.6.orig/include/linux/fs.h 2006-08-31 11:17:39.000000000 +0800 ++++ linux-2.6/include/linux/fs.h 2006-08-31 11:59:09.000000000 +0800 @@ -280,6 +280,8 @@ typedef void (dio_iodone_t)(struct kiocb #define ATTR_KILL_SUID 2048 #define ATTR_KILL_SGID 4096 @@ -670,7 +580,7 @@ Index: linux-2.6/include/linux/fs.h __u32 i_generation; -@@ -699,6 +702,7 @@ struct file { +@@ -700,6 +703,7 @@ struct file { spinlock_t f_ep_lock; #endif /* #ifdef CONFIG_EPOLL */ struct address_space *f_mapping; @@ -678,7 +588,7 @@ Index: linux-2.6/include/linux/fs.h }; extern spinlock_t files_lock; #define file_list_lock() spin_lock(&files_lock); -@@ -1099,7 +1103,9 @@ struct inode_operations { +@@ -1100,7 +1104,9 @@ struct inode_operations { void (*truncate) (struct inode *); int (*permission) (struct inode *, int, struct nameidata *); int (*setattr) (struct dentry *, struct iattr *); @@ -688,7 +598,7 @@ Index: linux-2.6/include/linux/fs.h int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); ssize_t (*listxattr) (struct dentry *, char *, size_t); -@@ -1140,6 +1146,7 @@ struct super_operations { +@@ -1141,6 +1147,7 @@ struct super_operations { int (*remount_fs) (struct super_block *, int *, char *); void (*clear_inode) (struct inode *); void (*umount_begin) (struct vfsmount *, int); @@ -696,7 +606,7 @@ Index: linux-2.6/include/linux/fs.h int (*show_options)(struct seq_file *, struct vfsmount *); int (*show_stats)(struct seq_file *, struct vfsmount *); -@@ -1362,6 +1369,7 @@ extern int may_umount_tree(struct vfsmou +@@ -1363,6 +1370,7 @@ extern int may_umount_tree(struct vfsmou extern int may_umount(struct vfsmount *); extern void umount_tree(struct vfsmount *, int, struct list_head *); extern void release_mounts(struct list_head *); @@ -704,7 +614,7 @@ Index: linux-2.6/include/linux/fs.h extern long do_mount(char *, char *, char *, unsigned long, void *); extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int); extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *, -@@ -1423,6 +1431,7 @@ extern long do_sys_open(int fdf, const c +@@ -1424,6 +1432,7 @@ extern long do_sys_open(int fdf, const c int mode); extern struct file *filp_open(const char *, int, int); extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); @@ -714,8 +624,8 @@ Index: linux-2.6/include/linux/fs.h Index: linux-2.6/include/linux/namei.h =================================================================== ---- linux-2.6.orig/include/linux/namei.h 2006-07-15 21:04:02.000000000 +0800 -+++ linux-2.6/include/linux/namei.h 2006-07-15 21:04:08.000000000 +0800 +--- linux-2.6.orig/include/linux/namei.h 2006-08-31 11:17:39.000000000 +0800 ++++ linux-2.6/include/linux/namei.h 2006-08-31 11:23:48.000000000 +0800 @@ -5,10 +5,39 @@ struct vfsmount; @@ -758,16 +668,9 @@ Index: linux-2.6/include/linux/namei.h + } d; }; - enum { MAX_NESTED_LINKS = 5 }; -@@ -22,12 +51,16 @@ struct nameidata { - unsigned depth; - char *saved_names[MAX_NESTED_LINKS + 1]; - -- /* Intent data */ -- union { -- struct open_intent open; -- } intent; -+ struct lookup_intent intent; + enum { MAX_NESTED_LINKS = 8 }; +@@ -28,6 +57,13 @@ struct nameidata { + } intent; }; +static inline void intent_init(struct lookup_intent *it, int op) @@ -780,7 +683,7 @@ Index: linux-2.6/include/linux/namei.h /* * Type of the last component on LOOKUP_PARENT */ -@@ -48,6 +81,8 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LA +@@ -48,6 +84,8 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LA #define LOOKUP_PARENT 16 #define LOOKUP_NOALT 32 #define LOOKUP_REVAL 64 @@ -789,7 +692,7 @@ Index: linux-2.6/include/linux/namei.h /* * Intent data */ -@@ -57,10 +92,19 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LA +@@ -57,10 +95,19 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LA extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *)); extern int FASTCALL(__user_walk_fd(int dfd, const char __user *, unsigned, struct nameidata *)); @@ -811,8 +714,8 @@ Index: linux-2.6/include/linux/namei.h extern int FASTCALL(link_path_walk(const char *, struct nameidata *)); Index: linux-2.6/include/linux/mount.h =================================================================== ---- linux-2.6.orig/include/linux/mount.h 2006-07-15 21:04:02.000000000 +0800 -+++ linux-2.6/include/linux/mount.h 2006-07-15 21:04:08.000000000 +0800 +--- linux-2.6.orig/include/linux/mount.h 2006-08-31 11:17:40.000000000 +0800 ++++ linux-2.6/include/linux/mount.h 2006-08-31 11:23:48.000000000 +0800 @@ -53,6 +53,8 @@ struct vfsmount { struct list_head mnt_slave; /* slave list entry */ struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ diff --git a/lustre/kernel_patches/series/2.6.18-vanilla.series b/lustre/kernel_patches/series/2.6.18-vanilla.series index 0ac21df..64a1e82 100644 --- a/lustre/kernel_patches/series/2.6.18-vanilla.series +++ b/lustre/kernel_patches/series/2.6.18-vanilla.series @@ -4,17 +4,16 @@ vfs_nointent-2.6.18-vanilla.patch vfs_races-2.6.18-vanilla.patch ext3-wantedi-misc-2.6.18-vanilla.patch jbd-jcberr-2.6.18-vanilla.patch -nfs-cifs-intent-2.6.18-vanilla.patch iopen-misc-2.6.18-vanilla.patch export-truncate-2.6.18-vanilla.patch export_symbols-2.6.18-vanilla.patch dev_read_only-2.6.18-vanilla.patch export-2.6.18-vanilla.patch -lookup_bdev_init_intent.patch +lookup_bdev_init_intent-2.6.18-vanilla.patch 8kstack-2.6.12.patch remove-suid-2.6-suse.patch export-show_task-2.6.18-vanilla.patch sd_iostats-2.6-rhel4.patch export_symbol_numa-2.6-fc5.patch tcp-zero-copy-2.6.18-vanilla.patch -vfs_intent-2.6-fc5-fix.patch +export-do_kern_mount.patch diff --git a/lustre/mgc/libmgc.c b/lustre/mgc/libmgc.c index cccdde6..4a10fee 100644 --- a/lustre/mgc/libmgc.c +++ b/lustre/mgc/libmgc.c @@ -64,7 +64,7 @@ static int mgc_setup(struct obd_device *obd, obd_count len, void *buf) if (rc) GOTO(err_decref, rc); - rc = obd_llog_init(obd, obd, 0, NULL); + rc = obd_llog_init(obd, obd, 0, NULL, NULL); if (rc) { CERROR("failed to setup llogging subsystems\n"); GOTO(err_cleanup, rc); @@ -80,7 +80,8 @@ err_decref: } static int mgc_llog_init(struct obd_device *obd, struct obd_device *tgt, - int count, struct llog_catid *logid) + int count, struct llog_catid *logid, + struct obd_uuid *uuid) { struct llog_ctxt *ctxt; int rc; diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index 8a8059d..3bc709d 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -69,10 +69,6 @@ void lustre_assert_wire_constants(void) (long long)OST_CLOSE); LASSERTF(OST_STATFS == 13, " found %lld\n", (long long)OST_STATFS); - LASSERTF(OST_SAN_READ == 14, " found %lld\n", - (long long)OST_SAN_READ); - LASSERTF(OST_SAN_WRITE == 15, " found %lld\n", - (long long)OST_SAN_WRITE); LASSERTF(OST_SYNC == 16, " found %lld\n", (long long)OST_SYNC); LASSERTF(OST_QUOTACHECK == 18, " found %lld\n", @@ -429,6 +425,7 @@ void lustre_assert_wire_constants(void) CLASSERT(OBD_CONNECT_LCL_CLIENT == 0x10000ULL); CLASSERT(OBD_CONNECT_RMT_CLIENT == 0x20000ULL); CLASSERT(OBD_CONNECT_BRW_SIZE == 0x40000ULL); + CLASSERT(OBD_CONNECT_QUOTA64 == 0x80000ULL); /* Checks for struct obdo */ LASSERTF((int)sizeof(struct obdo) == 208, " found %lld\n", @@ -1938,18 +1935,14 @@ void lustre_assert_wire_constants(void) (long long)(int)offsetof(struct qunit_data, qd_id)); LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_id) == 4, " found %lld\n", (long long)(int)sizeof(((struct qunit_data *)0)->qd_id)); - LASSERTF((int)offsetof(struct qunit_data, qd_type) == 4, " found %lld\n", - (long long)(int)offsetof(struct qunit_data, qd_type)); - LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_type) == 4, " found %lld\n", - (long long)(int)sizeof(((struct qunit_data *)0)->qd_type)); + LASSERTF((int)offsetof(struct qunit_data, qd_flags) == 4, " found %lld\n", + (long long)(int)offsetof(struct qunit_data, qd_flags)); + LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_flags) == 4, " found %lld\n", + (long long)(int)sizeof(((struct qunit_data *)0)->qd_flags)); LASSERTF((int)offsetof(struct qunit_data, qd_count) == 8, " found %lld\n", (long long)(int)offsetof(struct qunit_data, qd_count)); - LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_count) == 4, " found %lld\n", + LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_count) == 8, " found %lld\n", (long long)(int)sizeof(((struct qunit_data *)0)->qd_count)); - LASSERTF((int)offsetof(struct qunit_data, qd_isblk) == 12, " found %lld\n", - (long long)(int)offsetof(struct qunit_data, qd_isblk)); - LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_isblk) == 4, " found %lld\n", - (long long)(int)sizeof(((struct qunit_data *)0)->qd_isblk)); /* Checks for struct mgs_target_info */ LASSERTF((int)sizeof(struct mgs_target_info) == 2496, " found %lld\n", -- 1.8.3.1