Hi Vlad. The attached patch contains the NFSRDMA backport for 2.6.29. It
passes Connectathon. Please apply to ofed_1_5/linux-2.6.git. Thanks.
-jeff
diff --git a/kernel_addons/backport/2.6.29/include/linux/fs.h b/kernel_addons/backport/2.6.29/include/linux/fs.h
new file mode 100644
index 0000000..6c88678
--- /dev/null
+++ b/kernel_addons/backport/2.6.29/include/linux/fs.h
@@ -0,0 +1,56 @@
+#ifndef BACKPORT_LINUX_FS_H
+#define BACKPORT_LINUX_FS_H
+
+#include_next <linux/fs.h>
+#include <linux/sched.h>
+#include <linux/fs_struct.h>
+
+static inline int current_umask(void)
+{
+ return current->fs->umask;
+}
+
+static inline void free_fs_struct(struct fs_struct *fs)
+{
+ struct task_struct *tsk;
+
+ tsk = kzalloc(sizeof(struct task_struct), GFP_KERNEL);
+ if (!tsk)
+ return;
+
+ spin_lock_init(&tsk->alloc_lock);
+ tsk->fs = fs;
+
+ exit_fs(tsk);
+ kfree(tsk);
+}
+
+static inline int unshare_fs_struct(void)
+{
+ struct fs_struct *fs = current->fs;
+ struct fs_struct *new_fs = copy_fs_struct(fs);
+ int kill;
+
+ if (!new_fs)
+ return -ENOMEM;
+
+ task_lock(current);
+ write_lock(&fs->lock);
+ kill = atomic_read(&fs->count) == 1;
+ current->fs = new_fs;
+ write_unlock(&fs->lock);
+ task_unlock(current);
+
+ if (kill)
+ free_fs_struct(fs);
+
+ return 0;
+}
+
+static inline void deactivate_locked_super(struct super_block *s)
+{
+ up_write(&s->s_umount);
+ deactivate_super(s);
+}
+
+#endif
diff --git a/kernel_addons/backport/2.6.29/include/linux/fscache.h b/kernel_addons/backport/2.6.29/include/linux/fscache.h
new file mode 100644
index 0000000..f758384
--- /dev/null
+++ b/kernel_addons/backport/2.6.29/include/linux/fscache.h
@@ -0,0 +1,4 @@
+#ifndef BACKPORT_LINUX_FSCACHE_H
+#define BACKPORT_LINUX_FSCACHE_H
+
+#endif
diff --git a/kernel_patches/backport/2.6.29/rnfs_fs.patch b/kernel_patches/backport/2.6.29/rnfs_fs.patch
new file mode 100644
index 0000000..5572f3a
--- /dev/null
+++ b/kernel_patches/backport/2.6.29/rnfs_fs.patch
@@ -0,0 +1,40 @@
+diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
+index b660435..cf09e1d 100644
+--- a/fs/nfsd/vfs.c
++++ b/fs/nfsd/vfs.c
+@@ -1005,9 +1005,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
+ if (!EX_ISSYNC(exp))
+ stable = 0;
+ if (stable && !EX_WGATHER(exp)) {
+- spin_lock(&file->f_lock);
+ file->f_flags |= O_SYNC;
+- spin_unlock(&file->f_lock);
+ }
+
+ /* Write the data. */
+diff --git a/fs/nfs/file.c b/fs/nfs/file.c
+index ec7e27d..0850bd8 100644
+--- a/fs/nfs/file.c
++++ b/fs/nfs/file.c
+@@ -484,9 +484,8 @@ const struct address_space_operations nfs_file_aops = {
+ * writable, implying that someone is about to modify the page through a
+ * shared-writable mapping
+ */
+-static int nfs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
++static int nfs_vm_page_mkwrite(struct vm_area_struct *vma, struct page *page)
+ {
+- struct page *page = vmf->page;
+ struct file *filp = vma->vm_file;
+ struct dentry *dentry = filp->f_path.dentry;
+ unsigned pagelen;
+@@ -517,9 +516,9 @@ static int nfs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
+
+ ret = nfs_updatepage(filp, page, 0, pagelen);
+ out_unlock:
++ unlock_page(page);
+ if (!ret)
+ return VM_FAULT_LOCKED;
+- unlock_page(page);
+ return VM_FAULT_SIGBUS;
+ }
+
_______________________________________________
ewg mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg