OpenVZ Forum


Home » General » Support » NFS-client patch
NFS-client patch [message #2985] Fri, 05 May 2006 05:04 Go to previous message
Groening is currently offline  Groening
Messages: 2
Registered: March 2006
Location: Russia, Khabarovsk
Junior Member
We have a patch by dev to make NFS-client work in VPS:
diff -r -u linux-2.6.16-ovz/arch/i386/kernel/process.c linux-2.6.16-ovz_with_nfs/arch/i386/kernel/process.c                                                   
--- linux-2.6.16-ovz/arch/i386/kernel/process.c 2006-04-14 12:53:49.000000000 +0000                                                                           
+++ linux-2.6.16-ovz_with_nfs/arch/i386/kernel/process.c        2006-04-14 13:01:23.000000000 +0000                                                           
@@ -341,13 +341,6 @@                                                                                                                                          
 {                                                                                                                                                            
        struct pt_regs regs;                                                                                                                                  
                                                                                                                                                              
-       /* Don't allow kernel_thread() inside VE */                                                                                                           
-       if (!ve_is_super(get_exec_env())) {                                                                                                                   
-               printk("kernel_thread call inside VE\n");                                                                                                     
-               dump_stack();                                                                                                                                 
-               return -EPERM;                                                                                                                                
-       }                                                                                                                                                     
-                                                                                                                                                             
        memset(&regs, 0, sizeof(regs));                                                                                                                       
                                                                                                                                                              
        regs.ebx = (unsigned long) fn;                                                                                                                        
diff -r -u linux-2.6.16-ovz/fs/nfs/inode.c linux-2.6.16-ovz_with_nfs/fs/nfs/inode.c                                                                           
--- linux-2.6.16-ovz/fs/nfs/inode.c     2006-04-14 12:53:17.000000000 +0000                                                                                   
+++ linux-2.6.16-ovz_with_nfs/fs/nfs/inode.c    2006-04-14 12:58:40.000000000 +0000                                                                           
@@ -1721,7 +1721,7 @@                                                                                                                                         
        .name           = "nfs",                                                                                                                              
        .get_sb         = nfs_get_sb,                                                                                                                         
        .kill_sb        = nfs_kill_super,                                                                                                                     
-       .fs_flags       = FS_ODD_RENAME|FS_REVAL_DOT|FS_BINARY_MOUNTDATA,                                                                                     
+       .fs_flags       = FS_ODD_RENAME|FS_REVAL_DOT|FS_BINARY_MOUNTDATA|FS_VIRTUALIZED,                                                                      
 };                                                                                                                                                           
                                                                                                                                                              
 #ifdef CONFIG_NFS_V4                                                                                                                                         
diff -r -u linux-2.6.16-ovz/kernel/exit.c linux-2.6.16-ovz_with_nfs/kernel/exit.c                                                                             
--- linux-2.6.16-ovz/kernel/exit.c      2006-04-14 12:53:49.000000000 +0000                                                                                   
+++ linux-2.6.16-ovz_with_nfs/kernel/exit.c     2006-04-14 13:00:32.000000000 +0000                                                                           
@@ -276,9 +276,6 @@                                                                                                                                           
 {                                                                                                                                                            
        struct task_struct *curr = current->group_leader;                                                                                                     
                                                                                                                                                              
-       WARN_ON(is_virtual_pid(pgrp));                                                                                                                        
-       WARN_ON(is_virtual_pid(session));                                                                                                                     
-                                                                                                                                                             
        if (curr->signal->session != session) {                                                                                                               
                detach_pid(curr, PIDTYPE_SID);                                                                                                                
                curr->signal->session = session;                                                                                                              
diff -r -u linux-2.6.16-ovz/net/sunrpc/rpc_pipe.c linux-2.6.16-ovz_with_nfs/net/sunrpc/rpc_pipe.c                                                             
--- linux-2.6.16-ovz/net/sunrpc/rpc_pipe.c      2006-04-14 12:53:20.000000000 +0000                                                                           
+++ linux-2.6.16-ovz_with_nfs/net/sunrpc/rpc_pipe.c     2006-04-14 12:59:46.000000000 +0000                                                                   
@@ -824,6 +824,7 @@                                                                                                                                           
        .name           = "rpc_pipefs",                                                                                                                       
        .get_sb         = rpc_get_sb,                                                                                                                         
        .kill_sb        = kill_litter_super,                                                                                                                  
+       .fs_flags       = FS_VIRTUALIZED,                                                                                                                     
 };                                                                                                                                                           
                                                                                                                                                              
 static void

and this work, but if we apply patch where will be removed piece:
diff -r -u linux-2.6.16-ovz/arch/i386/kernel/process.c linux-2.6.16-ovz_with_nfs/arch/i386/kernel/process.c                                                   
--- linux-2.6.16-ovz/arch/i386/kernel/process.c 2006-04-14 12:53:49.000000000 +0000                                                                           
+++ linux-2.6.16-ovz_with_nfs/arch/i386/kernel/process.c        2006-04-14 13:01:23.000000000 +0000                                                           
@@ -341,13 +341,6 @@                                                                                                                                          
 {                                                                                                                                                            
        struct pt_regs regs;                                                                                                                                  
                                                                                                                                                              
-       /* Don't allow kernel_thread() inside VE */                                                                                                           
-       if (!ve_is_super(get_exec_env())) {                                                                                                                   
-               printk("kernel_thread call inside
...

 
Read Message
Read Message
Previous Topic: *SOLVED* vzpkgcache and cache creation
Next Topic: split patches?
Goto Forum:
  


Current Time: Fri Sep 06 11:14:42 GMT 2024

Total time taken to generate the page: 0.10854 seconds