#include <afsconfig.h>
#include "afs/param.h"
+#if defined(HAVE_LINUX_KTHREAD_RUN) && !defined(UKERNEL)
+# include "h/kthread.h"
+#endif
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
#include "afs/afs_stats.h"
#include "rx/rx_globals.h"
-#if !defined(UKERNEL) && !defined(AFS_LINUX20_ENV)
-#include "net/if.h"
-#ifdef AFS_SGI62_ENV
-#include "h/hashing.h"
-#endif
-#if !defined(AFS_HPUX110_ENV) && !defined(AFS_DARWIN_ENV)
-#include "netinet/in_var.h"
-#endif
+#if !defined(UKERNEL)
+# if !defined(AFS_LINUX20_ENV)
+# include "net/if.h"
+# ifdef AFS_SGI62_ENV
+# include "h/hashing.h"
+# endif
+# if !defined(AFS_HPUX110_ENV) && !defined(AFS_DARWIN_ENV)
+# include "netinet/in_var.h"
+# endif
+# endif
#endif /* !defined(UKERNEL) */
#ifdef AFS_SUN510_ENV
#include "h/ksynch.h"
afs_int32 afs_numcachefiles = -1;
afs_int32 afs_numfilesperdir = -1;
char afs_cachebasedir[1024];
+afs_int32 afs_rmtsys_enable = 0;
afs_int32 afs_rx_deadtime = AFS_RXDEADTIME;
afs_int32 afs_rx_harddead = AFS_HARDDEADTIME;
# ifdef SYS_SETPRIORITY_EXPORTED
int (*sys_setpriority) (int, int, int) = sys_call_table[__NR_setpriority];
# endif
-# if defined(AFS_LINUX26_ENV)
+# if !defined(HAVE_LINUX_KTHREAD_RUN)
+# if defined(AFS_LINUX26_ENV)
daemonize("afsd");
-# else
+# else
daemonize();
-# endif
+# endif
+# endif /* !HAVE_LINUX_KTHREAD_RUN */
/* doesn't do much, since we were forked from keventd, but
* does call mm_release, which wakes up our parent (since it
* used CLONE_VFORK) */
struct afsd_thread_info *rock = container_of(work, struct afsd_thread_info, tq);
# endif
+# if defined(HAVE_LINUX_KTHREAD_RUN)
+ if (IS_ERR(kthread_run(afsd_thread, (void *)rock, "afsd"))) {
+ afs_warn("kthread_run failed; afs startup will not complete\n");
+ }
+# else /* !HAVE_LINUX_KTHREAD_RUN */
if (!kernel_thread(afsd_thread, (void *)rock, CLONE_VFORK | SIGCHLD))
afs_warn("kernel_thread failed. afs startup will not complete\n");
+# endif /* !HAVE_LINUX_KTHREAD_RUN */
}
void
rx_MyMaxSendSize = rx_maxReceiveSizeUser = rx_maxReceiveSize = parm2;
} else if (parm == AFSOP_SET_RXMAXFRAGS) {
rxi_nSendFrags = rxi_nRecvFrags = parm2;
+ } else if (parm == AFSOP_SET_RMTSYS_FLAG) {
+ afs_rmtsys_enable = parm2;
+ code = 0;
} else {
code = EINVAL;
}