Whamcloud - gitweb
b=19860
authorgreen <green>
Thu, 23 Jul 2009 19:19:48 +0000 (19:19 +0000)
committergreen <green>
Thu, 23 Jul 2009 19:19:48 +0000 (19:19 +0000)
r=adilger,shadow

get rid of ptlrpc_daemonize
remove unneeded exports

13 files changed:
lustre/kernel_patches/patches/export_symbols-2.6.18-vanilla.patch [deleted file]
lustre/kernel_patches/series/2.6-rhel5.series
lustre/kernel_patches/series/2.6-sles10.series
lustre/ldlm/ldlm_pool.c
lustre/mds/mds_lov.c
lustre/mgc/mgc_request.c
lustre/ptlrpc/import.c
lustre/ptlrpc/pinger.c
lustre/ptlrpc/ptlrpc_module.c
lustre/ptlrpc/service.c
lustre/quota/quota_check.c
lustre/quota/quota_context.c
lustre/quota/quota_master.c

diff --git a/lustre/kernel_patches/patches/export_symbols-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/export_symbols-2.6.18-vanilla.patch
deleted file mode 100644 (file)
index 18a9815..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-Index: linux-2.6/fs/filesystems.c
-===================================================================
---- linux-2.6.orig/fs/filesystems.c    2006-07-15 16:08:35.000000000 +0800
-+++ linux-2.6/fs/filesystems.c 2006-07-15 16:14:19.000000000 +0800
-@@ -29,7 +29,9 @@
-  */
- static struct file_system_type *file_systems;
--static DEFINE_RWLOCK(file_systems_lock);
-+DEFINE_RWLOCK(file_systems_lock);
-+
-+EXPORT_SYMBOL(file_systems_lock);
- /* WARNING: This can be used only if we _already_ own a reference */
- void get_filesystem(struct file_system_type *fs)
-Index: linux-2.6/include/linux/fs.h
-===================================================================
---- linux-2.6.orig/include/linux/fs.h  2006-07-15 16:10:37.000000000 +0800
-+++ linux-2.6/include/linux/fs.h       2006-07-15 16:14:19.000000000 +0800
-@@ -1768,6 +1768,7 @@ static inline ssize_t blockdev_direct_IO
- extern const struct file_operations generic_ro_fops;
-+extern rwlock_t file_systems_lock;
- #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m))
- extern int vfs_readlink(struct dentry *, char __user *, int, const char *);
-Index: linux-2.6/fs/namespace.c
-===================================================================
---- linux-2.6.orig/fs/namespace.c      2006-07-15 16:10:33.000000000 +0800
-+++ linux-2.6/fs/namespace.c   2006-07-15 16:14:19.000000000 +0800
-@@ -1641,6 +1641,7 @@ void set_fs_pwd(struct fs_struct *fs, st
-               mntput(old_pwdmnt);
-       }
- }
-+EXPORT_SYMBOL(set_fs_pwd);
- static void chroot_fs_refs(struct nameidata *old_nd, struct nameidata *new_nd)
- {
-Index: linux-2.6/kernel/exit.c
-===================================================================
---- linux-2.6.orig/kernel/exit.c       2006-07-15 16:08:34.000000000 +0800
-+++ linux-2.6/kernel/exit.c    2006-07-15 16:14:19.000000000 +0800
-@@ -305,6 +305,8 @@ static void reparent_to_init(void)
-       switch_uid(INIT_USER);
- }
-+EXPORT_SYMBOL(reparent_to_init);
-+
- void __set_special_pids(pid_t session, pid_t pgrp)
- {
-       struct task_struct *curr = current->group_leader;
-Index: linux-2.6/fs/dcache.c
-===================================================================
---- linux-2.6.orig/fs/dcache.c 2006-07-15 16:14:00.000000000 +0800
-+++ linux-2.6/fs/dcache.c      2006-07-15 16:14:19.000000000 +0800
-@@ -1628,6 +1628,7 @@ int is_subdir(struct dentry * new_dentry
-       return result;
- }
-+EXPORT_SYMBOL(is_subdir);
- void d_genocide(struct dentry *root)
- {
index 41f55fc..7a625f5 100644 (file)
@@ -4,7 +4,7 @@ i_filter_data.patch
 jbd-jcberr-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
+export-2.6.12.patch
 export-show_task-2.6.18-vanilla.patch
 sd_iostats-2.6-rhel5.patch
 export_symbol_numa-2.6-fc5.patch
index 7003a52..d39895a 100644 (file)
@@ -1,7 +1,7 @@
 lustre_version.patch
 jbd-2.6.10-jcberr.patch
 iopen-misc-2.6.12.patch
-export_symbols-2.6.12.patch 
+export_symbols-2.6.12.patch
 dev_read_only-2.6-fc5.patch 
 export-2.6-fc5.patch 
 export-show_task-2.6-fc5.patch 
index 6779be5..fbe9641 100644 (file)
@@ -1308,7 +1308,7 @@ static int ldlm_pools_thread_start(void)
 
         /*
          * CLONE_VM and CLONE_FILES just avoid a needless copy, because we
-         * just drop the VM and FILES in ptlrpc_daemonize() right away.
+         * just drop the VM and FILES in cfs_daemonize() right away.
          */
         rc = cfs_kernel_thread(ldlm_pools_thread_main, ldlm_pools_thread,
                                CLONE_VM | CLONE_FILES);
index c3875b5..58c15cb 100644 (file)
@@ -1057,7 +1057,7 @@ int mds_lov_synchronize(void *data)
         char name[20];
 
         snprintf(name, sizeof(name), "ll_sync_%02u", mlsi->mlsi_index);
-        ptlrpc_daemonize(name);
+        cfs_daemonize_ctxt(name);
 
         RETURN(__mds_lov_synchronize(data));
 }
index 0c5a0af..680a1d5 100644 (file)
@@ -277,7 +277,7 @@ static int mgc_requeue_thread(void *data)
         int rc = 0;
         ENTRY;
 
-        ptlrpc_daemonize(name);
+        cfs_daemonize(name);
 
         CDEBUG(D_MGC, "Starting requeue thread\n");
 
index cb1eaea..8ea8799 100644 (file)
@@ -1220,7 +1220,7 @@ static int ptlrpc_invalidate_import_thread(void *data)
 
         ENTRY;
 
-        ptlrpc_daemonize("ll_imp_inval");
+        cfs_daemonize_ctxt("ll_imp_inval");
 
         CDEBUG(D_HA, "thread invalidate import %s to %s@%s\n",
                imp->imp_obd->obd_name, obd2cli_tgt(imp->imp_obd),
index 931775b..a69e4e8 100644 (file)
@@ -331,7 +331,7 @@ int ptlrpc_start_pinger(void)
         d.thread = pinger_thread;
 
         /* CLONE_VM and CLONE_FILES just avoid a needless copy, because we
-         * just drop the VM and FILES in ptlrpc_daemonize() right away. */
+         * just drop the VM and FILES in cfs_daemonize_ctxt() right away. */
         rc = cfs_kernel_thread(ptlrpc_pinger_main, &d, CLONE_VM | CLONE_FILES);
         if (rc < 0) {
                 CERROR("cannot start thread: %d\n", rc);
@@ -584,7 +584,7 @@ static int ping_evictor_main(void *arg)
         time_t expire_time;
         ENTRY;
 
-        ptlrpc_daemonize("ll_evictor");
+        cfs_daemonize_ctxt("ll_evictor");
 
         CDEBUG(D_HA, "Starting Ping Evictor\n");
         pet_exp = NULL;
index b33d69d..57f0b81 100644 (file)
@@ -200,7 +200,6 @@ EXPORT_SYMBOL(ptlrpc_stop_all_threads);
 EXPORT_SYMBOL(ptlrpc_start_threads);
 EXPORT_SYMBOL(ptlrpc_start_thread);
 EXPORT_SYMBOL(ptlrpc_unregister_service);
-EXPORT_SYMBOL(ptlrpc_daemonize);
 EXPORT_SYMBOL(ptlrpc_service_health_check);
 EXPORT_SYMBOL(ptlrpc_hpreq_reorder);
 
index 0fd0b42..0b1c7b5 100644 (file)
@@ -1542,18 +1542,6 @@ liblustre_check_services (void *arg)
 
 #else /* __KERNEL__ */
 
-/* Don't use daemonize, it removes fs struct from new thread (bug 418) */
-void ptlrpc_daemonize(char *name)
-{
-        struct fs_struct *fs = current->fs;
-
-        atomic_inc(&fs->count);
-        cfs_daemonize(name);
-        exit_fs(cfs_current());
-        current->fs = fs;
-        ll_set_fs_pwd(current->fs, cfs_fs_mnt(init_task.fs), cfs_fs_pwd(init_task.fs));
-}
-
 static void
 ptlrpc_check_rqbd_pool(struct ptlrpc_service *svc)
 {
@@ -1598,7 +1586,7 @@ static int ptlrpc_main(void *arg)
         int counter = 0, rc = 0;
         ENTRY;
 
-        ptlrpc_daemonize(data->name);
+        cfs_daemonize_ctxt(data->name);
 
 #if defined(HAVE_NODE_TO_CPUMASK) && defined(CONFIG_NUMA)
         /* we need to do this before any per-thread allocation is done so that
@@ -1853,7 +1841,7 @@ int ptlrpc_start_thread(struct obd_device *dev, struct ptlrpc_service *svc)
         CDEBUG(D_RPCTRACE, "starting thread '%s'\n", name);
 
         /* CLONE_VM and CLONE_FILES just avoid a needless copy, because we
-         * just drop the VM and FILES in ptlrpc_daemonize() right away.
+         * just drop the VM and FILES in cfs_daemonize_ctxt() right away.
          */
         rc = cfs_kernel_thread(ptlrpc_main, &d, CLONE_VM | CLONE_FILES);
         if (rc < 0) {
index 74669ff..4368db4 100644 (file)
@@ -96,7 +96,7 @@ static int target_quotacheck_thread(void *data)
         struct lvfs_run_ctxt saved;
         int rc;
 
-        ptlrpc_daemonize("quotacheck");
+        cfs_daemonize_ctxt("quotacheck");
 
         exp = qta->qta_exp;
         obd = exp->exp_obd;
index 423629b..4bd3381 100644 (file)
@@ -1330,7 +1330,7 @@ static int qslave_recovery_main(void *arg)
         int rc = 0;
         ENTRY;
 
-        ptlrpc_daemonize("qslave_recovd");
+        cfs_daemonize_ctxt("qslave_recovd");
 
         complete(&data->comp);
 
index 0d88025..6c19d3e 100644 (file)
@@ -1655,7 +1655,7 @@ static int qmaster_recovery_main(void *arg)
         unsigned short type;
         ENTRY;
 
-        ptlrpc_daemonize("qmaster_recovd");
+        cfs_daemonize_ctxt("qmaster_recovd");
 
         class_incref(obd);
         complete(&data->comp);