X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fkernel_patches%2Fpatches%2Fvfs_intent-2.4.22-rh.patch;h=0a66e49f6221d44872d064b1568b53766c2a5336;hb=dee729bd881e14ae619e8220cd3032bca59cbdf5;hp=b51ff06c5218a3c1b9c328589f21139beae38e73;hpb=2dc9c16e770415d56839e1996015fec5fab93f29;p=fs%2Flustre-release.git diff --git a/lustre/kernel_patches/patches/vfs_intent-2.4.22-rh.patch b/lustre/kernel_patches/patches/vfs_intent-2.4.22-rh.patch index b51ff06..0a66e49 100644 --- a/lustre/kernel_patches/patches/vfs_intent-2.4.22-rh.patch +++ b/lustre/kernel_patches/patches/vfs_intent-2.4.22-rh.patch @@ -141,7 +141,7 @@ struct dentry * dentry = d_lookup(parent, name); + if (dentry && dentry->d_op && dentry->d_op->d_revalidate_it) { -+ if (!dentry->d_op->d_revalidate_it(dentry, flags, it) && ++ if (!dentry->d_op->d_revalidate_it(dentry, flags, NULL, it) && + !d_invalidate(dentry)) { + dput(dentry); + dentry = NULL; @@ -173,7 +173,7 @@ if (dentry) { lock_kernel(); + if (dir->i_op->lookup_it) -+ result = dir->i_op->lookup_it(dir, dentry, it, flags); ++ result = dir->i_op->lookup_it(dir, dentry, NULL, it, flags); + else result = dir->i_op->lookup(dir, dentry); unlock_kernel(); @@ -183,7 +183,7 @@ result = ERR_PTR(-ENOENT); } + } else if (result->d_op && result->d_op->d_revalidate_it) { -+ if (!result->d_op->d_revalidate_it(result, flags, it) && ++ if (!result->d_op->d_revalidate_it(result, flags, NULL, it) && + !d_invalidate(result)) { + dput(result); + if (counter > 10) @@ -294,7 +294,7 @@ dentry = nd->dentry; + if (dentry && dentry->d_op && dentry->d_op->d_revalidate_it) { + err = -ESTALE; -+ if (!dentry->d_op->d_revalidate_it(dentry, 0, it)) { ++ if (!dentry->d_op->d_revalidate_it(dentry, 0, NULL, it)) { + struct dentry *new; + err = permission(dentry->d_parent->d_inode, + MAY_EXEC); @@ -393,7 +393,7 @@ goto out; lock_kernel(); + if (inode->i_op->lookup_it) -+ dentry = inode->i_op->lookup_it(inode, new, it, 0); ++ dentry = inode->i_op->lookup_it(inode, new, NULL, it, 0); + else dentry = inode->i_op->lookup(inode, new); unlock_kernel(); @@ -593,7 +593,7 @@ + /* SMP-safe */ -static struct dentry *lookup_create(struct nameidata *nd, int is_dir) -+static struct dentry *lookup_create(struct nameidata *nd, int is_dir, ++struct dentry *lookup_create(struct nameidata *nd, int is_dir, + struct lookup_intent *it) { struct dentry *dentry; @@ -878,6 +878,15 @@ list_add(&mnt->mnt_hash, mount_hashtable+hash(nd->mnt, nd->dentry)); list_add(&mnt->mnt_child, &nd->mnt->mnt_mounts); nd->dentry->d_mounted++; +@@ -286,7 +293,7 @@ + } + } + +-static int do_umount(struct vfsmount *mnt, int flags) ++int do_umount(struct vfsmount *mnt, int flags) + { + struct super_block * sb = mnt->mnt_sb; + int retval = 0; @@ -488,14 +490,17 @@ static int do_loopback(struct nameidata { struct nameidata old_nd; @@ -1535,7 +1544,7 @@ fput(f); --- linux-2.4.22-ac1/include/linux/dcache.h~vfs_intent-2.4.22-rh 2003-09-25 14:16:28.000000000 +0400 +++ linux-2.4.22-ac1-alexey/include/linux/dcache.h 2003-09-25 14:42:46.000000000 +0400 -@@ -6,6 +6,51 @@ +@@ -6,6 +6,52 @@ #include #include #include @@ -1550,6 +1559,7 @@ +#define IT_GETXATTR 0x0040 +#define IT_EXEC 0x0080 +#define IT_PIN 0x0100 ++#define IT_CHDIR 0x0200 + +#define IT_FL_LOCKED 0x0001 +#define IT_FL_FOLLOWED 0x0002 /* set by vfs_follow_link */ @@ -1587,11 +1597,20 @@ /* * linux/include/linux/dcache.h +@@ -84,6 +130,8 @@ + unsigned char d_iname[DNAME_INLINE_LEN]; /* small names */ + }; + ++struct nameidata; ++ + struct dentry_operations { + int (*d_revalidate)(struct dentry *, int); + int (*d_hash) (struct dentry *, struct qstr *); @@ -95,8 +140,22 @@ struct dentry_operations { int (*d_delete)(struct dentry *); void (*d_release)(struct dentry *); void (*d_iput)(struct dentry *, struct inode *); -+ int (*d_revalidate_it)(struct dentry *, int, struct lookup_intent *); ++ int (*d_revalidate_it)(struct dentry *, int, struct nameidata *, struct lookup_intent *); + void (*d_pin)(struct dentry *, struct vfsmount * , int); + void (*d_unpin)(struct dentry *, struct vfsmount *, int); }; @@ -1678,7 +1697,7 @@ int (*create) (struct inode *,struct dentry *,int); + int (*create_it) (struct inode *,struct dentry *,int, struct lookup_intent *); struct dentry * (*lookup) (struct inode *,struct dentry *); -+ struct dentry * (*lookup_it) (struct inode *,struct dentry *, struct lookup_intent *, int flags); ++ struct dentry * (*lookup_it) (struct inode *,struct dentry *, struct nameidata *, struct lookup_intent *, int flags); int (*link) (struct dentry *,struct inode *,struct dentry *); + int (*link_raw) (struct nameidata *,struct nameidata *); int (*unlink) (struct inode *,struct dentry *); @@ -1705,12 +1724,22 @@ int (*getattr) (struct dentry *, struct iattr *); int (*setxattr) (struct dentry *, const char *, void *, size_t, int); ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); -@@ -1094,10 +1113,14 @@ static inline int get_lease(struct inode +@@ -938,6 +957,7 @@ + int (*remount_fs) (struct super_block *, int *, char *); + void (*clear_inode) (struct inode *); + void (*umount_begin) (struct super_block *); ++ void (*umount_lustre) (struct super_block *); + + /* Following are for knfsd to interact with "interesting" filesystems + * Currently just reiserfs, but possibly FAT and others later +@@ -1094,10 +1113,16 @@ static inline int get_lease(struct inode asmlinkage long sys_open(const char *, int, int); asmlinkage long sys_close(unsigned int); /* yes, it's really unsigned */ -extern int do_truncate(struct dentry *, loff_t start); +extern int do_truncate(struct dentry *, loff_t start, int called_from_open); ++struct dentry *lookup_create(struct nameidata *nd, int is_dir, ++ struct lookup_intent *it); extern struct file *filp_open(const char *, int, int); extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); @@ -1810,13 +1839,35 @@ } else { --- linux-2.4.22-ac1/kernel/ksyms.c~vfs_intent-2.4.22-rh 2003-09-25 14:39:02.000000000 +0400 +++ linux-2.4.22-ac1-alexey/kernel/ksyms.c 2003-09-25 14:42:46.000000000 +0400 -@@ -295,6 +295,7 @@ EXPORT_SYMBOL(read_cache_page); +@@ -295,6 +295,9 @@ EXPORT_SYMBOL(read_cache_page); EXPORT_SYMBOL(set_page_dirty); EXPORT_SYMBOL(vfs_readlink); EXPORT_SYMBOL(vfs_follow_link); +EXPORT_SYMBOL(vfs_follow_link_it); ++EXPORT_SYMBOL(do_umount); ++EXPORT_SYMBOL(lookup_create); EXPORT_SYMBOL(page_readlink); EXPORT_SYMBOL(page_follow_link); EXPORT_SYMBOL(page_symlink_inode_operations); -_ +Index: linux-2.4.24/include/linux/mount.h +=================================================================== +--- linux-2.4.22-ac1/include/linux/mount.h 2004-05-03 19:56:48.182871712 +0300 ++++ linux-2.4.22-ac1-alexey/include/linux/mount.h 2004-05-03 20:00:02.831280656 +0300 +@@ -29,6 +29,8 @@ + int mnt_flags; + char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ + struct list_head mnt_list; ++ struct list_head mnt_lustre_list; /* GNS mount list */ ++ unsigned long mnt_last_used; /* for GNS auto-umount (jiffies) */ + }; + + static inline struct vfsmount *mntget(struct vfsmount *mnt) +@@ -39,6 +41,7 @@ + } + + extern void __mntput(struct vfsmount *mnt); ++extern int do_umount(struct vfsmount *mnt, int flags); + + static inline void mntput(struct vfsmount *mnt) + {