From 063b009f71b9ab15e25b1e63d95a7e65b0122ff8 Mon Sep 17 00:00:00 2001 From: Alexander Viro Date: Thu, 14 Mar 2002 23:06:06 -0800 Subject: [PATCH] nfsd as filesystem * introduces a new filesystem - nfsd. No, it's not a typo. It's a small tree with fixed topology defined by nfsd and IO on its files does what we used to do by hand in nfsctl.c. * turns sys_nfsservctl() into a sequence of open()/write()/read()/close() It works as it used to - we don't need nfsd to be mounted anywhere, etc. * nfsd_linkage ugliness is gone. * getfs and getfh demonstrate (rather trivial) example of "descriptor as transaction descriptor" behaviour. * we are fairly close to the situation when driver-defined filesystems can be done with practically zero code overhead. We are still not there, but it's a matter of adding a couple of helpers for populating the tree. One thing we get immediately is a cleanup of sys_nfsservctl() - it got _much_ better. Moreover, we get an alternative interface that uses normal file IO and can be used without magic syscalls. --- include/linux/nfsd/interface.h | 13 ------------- include/linux/nfsd/syscall.h | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) (limited to 'include/linux') diff --git a/include/linux/nfsd/interface.h b/include/linux/nfsd/interface.h index 80c65165778d..af0979704afb 100644 --- a/include/linux/nfsd/interface.h +++ b/include/linux/nfsd/interface.h @@ -10,17 +10,4 @@ #ifndef LINUX_NFSD_INTERFACE_H #define LINUX_NFSD_INTERFACE_H -#include - -#ifndef CONFIG_NFSD -#ifdef CONFIG_MODULES - -extern struct nfsd_linkage { - long (*do_nfsservctl)(int cmd, void *argp, void *resp); - struct module *owner; -} * nfsd_linkage; - -#endif -#endif - #endif /* LINUX_NFSD_INTERFACE_H */ diff --git a/include/linux/nfsd/syscall.h b/include/linux/nfsd/syscall.h index e98c9fa8ae21..b68a0d63f901 100644 --- a/include/linux/nfsd/syscall.h +++ b/include/linux/nfsd/syscall.h @@ -133,7 +133,7 @@ union nfsctl_res { * Kernel syscall implementation. */ #if defined(CONFIG_NFSD) || defined(CONFIG_NFSD_MODULE) -extern asmlinkage long sys_nfsservctl(int, void *, void *); +extern asmlinkage long sys_nfsservctl(int, struct nfsctl_arg *, void *); #else #define sys_nfsservctl sys_ni_syscall #endif -- cgit v1.2.3