aboutsummaryrefslogtreecommitdiff
path: root/fs/nfsd/nfsctl.c
AgeCommit message (Collapse)AuthorFilesLines
2009-04-28NFSD: Refactor portlist socket closing into a helperChuck Lever1-12/+24
Clean up: Refactor the socket closing logic out of __write_ports() to make it easier to understand and maintain. Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2009-04-28NFSD: Refactor transport addition out of __write_ports()Chuck Lever1-23/+33
Clean up: Refactor transport addition out of __write_ports() to make it easier to understand and maintain. Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2009-04-28NFSD: Refactor transport removal out of __write_ports()Chuck Lever1-24/+29
Clean up: Refactor transport removal out of __write_ports() to make it easier to understand and maintain. Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2009-04-06Merge branch 'for-2.6.30' of git://linux-nfs.org/~bfields/linuxLinus Torvalds1-3/+35
* 'for-2.6.30' of git://linux-nfs.org/~bfields/linux: (81 commits) nfsd41: define nfsd4_set_statp as noop for !CONFIG_NFSD_V4 nfsd41: define NFSD_DRC_SIZE_SHIFT in set_max_drc nfsd41: Documentation/filesystems/nfs41-server.txt nfsd41: CREATE_EXCLUSIVE4_1 nfsd41: SUPPATTR_EXCLCREAT attribute nfsd41: support for 3-word long attribute bitmask nfsd: dynamically skip encoded fattr bitmap in _nfsd4_verify nfsd41: pass writable attrs mask to nfsd4_decode_fattr nfsd41: provide support for minor version 1 at rpc level nfsd41: control nfsv4.1 svc via /proc/fs/nfsd/versions nfsd41: add OPEN4_SHARE_ACCESS_WANT nfs4_stateid bmap nfsd41: access_valid nfsd41: clientid handling nfsd41: check encode size for sessions maxresponse cached nfsd41: stateid handling nfsd: pass nfsd4_compound_state* to nfs4_preprocess_{state,seq}id_op nfsd41: destroy_session operation nfsd41: non-page DRC for solo sequence responses nfsd41: Add a create session replay cache nfsd41: create_session operation ...
2009-04-03nfsd41: control nfsv4.1 svc via /proc/fs/nfsd/versionsBenny Halevy1-3/+23
Support enabling and disabling nfsv4.1 via /proc/fs/nfsd/versions by writing the strings "+4.1" or "-4.1" correspondingly. Use user mode nfs-utils (rpc.nfsd option) to enable. This will allow us to get rid of CONFIG_NFSD_V4_1 [nfsd41: disable support for minorversion by default] Signed-off-by: Benny Halevy <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2009-03-28SUNRPC: Change svc_create_xprt() to take a @family argumentChuck Lever1-1/+1
The sv_family field is going away. Pass a protocol family argument to svc_create_xprt() instead of extracting the family from the passed-in svc_serv struct. Again, as this is a listener socket and not an address, we make this new argument an "int" protocol family, instead of an "sa_family_t." Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2009-03-28NFSD: If port value written to /proc/fs/nfsd/portlist is invalid, return EINVALChuck Lever1-1/+3
Make sure port value read from user space by write_ports is valid before passing it to svc_find_xprt(). If it wasn't, the writer would get ENOENT instead of EINVAL. Noticed-by: J. Bruce Fields <[email protected]> Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2009-03-18knfsd: add file to export stats about nfsd poolsGreg Banks1-0/+12
Add /proc/fs/nfsd/pool_stats to export to userspace various statistics about the operation of rpc server thread pools. This patch is based on a forward-ported version of knfsd-add-pool-thread-stats which has been shipping in the SGI "Enhanced NFS" product since 2006 and which was previously posted: http://article.gmane.org/gmane.linux.nfs/10375 It has also been updated thus: * moved EXPORT_SYMBOL() to near the function it exports * made the new struct struct seq_operations const * used SEQ_START_TOKEN instead of ((void *)1) * merged fix from SGI PV 990526 "sunrpc: use dprintk instead of printk in svc_pool_stats_*()" by Harshula Jayasuriya. * merged fix from SGI PV 964001 "Crash reading pool_stats before nfsds are started". Signed-off-by: Greg Banks <[email protected]> Signed-off-by: Harshula Jayasuriya <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2009-01-06NFSD: Add documenting comments for nfsctl interfaceChuck Lever1-16/+437
Document the NFSD sysctl interface laid out in fs/nfsd/nfsctl.c. Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2009-01-06NFSD: Replace open-coded integer with macroChuck Lever1-2/+2
Clean up: Instead of open-coding 2049, use the NFS_PORT macro. Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2009-01-06NFSD: Fix a handful of coding style issues in write_filehandle()Chuck Lever1-3/+6
Clean up: follow kernel coding style. Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2009-01-06NFSD: clean up failover sysctl function namingChuck Lever1-7/+6
Clean up: Rename recently-added failover functions to match the naming convention in fs/nfsd/nfsctl.c. Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-10-31fs: replace NIPQUAD()Harvey Harrison1-1/+1
Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u can be replaced with %pI4 Signed-off-by: Harvey Harrison <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-10-23[PATCH] switch nfsd to kern_path()Al Viro1-4/+4
Signed-off-by: Al Viro <[email protected]>
2008-10-04NLM: Remove unused argument from svc_addsock() functionChuck Lever1-1/+1
Clean up: The svc_addsock() function no longer uses its "proto" argument, so remove it. Signed-off-by: Chuck Lever <[email protected]> Cc: Neil Brown <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-10-04NLM: Remove "proto" argument from lockd_up()Chuck Lever1-3/+2
Clean up: Now that lockd_up() starts listeners for both transports, the "proto" argument is no longer needed. Signed-off-by: Chuck Lever <[email protected]> Cc: Neil Brown <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-07-26[PATCH] get rid of indirect users of namei.hAl Viro1-0/+1
fs.h needs path.h, not namei.h; nfs_fs.h doesn't need it at all. Several places in the tree needed direct include. Signed-off-by: Al Viro <[email protected]>
2008-07-15lockd: Pass "struct sockaddr *" to new failover-by-IP functionChuck Lever1-5/+10
Pass a more generic socket address type to nlmsvc_unlock_all_by_ip() to allow for future support of IPv6. Also provide additional sanity checking in failover_unlock_ip() when constructing the server's IP address. As an added bonus, provide clean kerneldoc comments on related NLM interfaces which were recently added. Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-06-23knfsd: clean up nfsd filesystem interfacesJeff Layton1-13/+53
Several of the nfsd filesystem interfaces allow changes to parameters that don't have any effect on a running nfsd service. They are only ever checked when nfsd is started. This patch fixes it so that changes to those procfiles return -EBUSY if nfsd is already running to make it clear that changes on the fly don't work. The patch should also close some relatively harmless races between changing the info in those interfaces and starting nfsd, since these variables are being moved under the protection of the nfsd_mutex. Finally, the nfsv4recoverydir file always returns -EINVAL if read. This patch fixes it to return the recoverydir path as expected. Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-06-23knfsd: Replace lock_kernel with a mutex for nfsd thread startup/shutdown ↵Neil Brown1-14/+23
locking. This removes the BKL from the RPC service creation codepath. The BKL really isn't adequate for this job since some of this info needs protection across sleeps. Also, add some comments to try and clarify how the locking should work and to make it clear that the BKL isn't necessary as long as there is adequate locking between tasks when touching the svc_serv fields. Signed-off-by: Neil Brown <[email protected]> Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-04-29nfsd: use proc_create to setup de->proc_fopsDenis V. Lunev1-2/+2
Use proc_create() to make sure that ->proc_fops be setup before gluing PDE to main tree. Signed-off-by: Denis V. Lunev <[email protected]> Cc: Neil Brown <[email protected]> Cc: "J. Bruce Fields" <[email protected]> Cc: Alexey Dobriyan <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-04-25lockd: unlock lockd locks held for a certain filesystemWendy Cheng1-0/+32
Add /proc/fs/nfsd/unlock_filesystem, which allows e.g.: shell> echo /mnt/sfs1 > /proc/fs/nfsd/unlock_filesystem so that a filesystem can be unmounted before allowing a peer nfsd to take over nfs service for the filesystem. Signed-off-by: S. Wendy Cheng <[email protected]> Cc: Lon Hohberger <[email protected]> Cc: Christoph Hellwig <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]> fs/lockd/svcsubs.c | 66 +++++++++++++++++++++++++++++++++++++++----- fs/nfsd/nfsctl.c | 65 +++++++++++++++++++++++++++++++++++++++++++ include/linux/lockd/lockd.h | 7 ++++ 3 files changed, 131 insertions(+), 7 deletions(-)
2008-04-25lockd: unlock lockd locks associated with a given server ipWendy Cheng1-0/+33
For high-availability NFS service, we generally need to be able to drop file locks held on the exported filesystem before moving clients to a new server. Currently the only way to do that is by shutting down lockd entirely, which is often undesireable (for example, if you want to continue exporting other filesystems). This patch allows the administrator to release all locks held by clients accessing the client through a given server ip address, by echoing that address to a new file, /proc/fs/nfsd/unlock_ip, as in: shell> echo 10.1.1.2 > /proc/fs/nfsd/unlock_ip The expected sequence of events can be: 1. Tear down the IP address 2. Unexport the path 3. Write IP to /proc/fs/nfsd/unlock_ip to unlock files 4. Signal peer to begin take-over. For now we only support IPv4 addresses and NFSv2/v3 (NFSv4 locks are not affected). Also, if unmounting the filesystem is required, we assume at step 3 that clients using the given server ip are the only clients holding locks on the given filesystem; otherwise, an additional patch is required to allow revoking all locks held by lockd on a given filesystem. Signed-off-by: S. Wendy Cheng <[email protected]> Cc: Lon Hohberger <[email protected]> Cc: Christoph Hellwig <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]> fs/lockd/svcsubs.c | 66 +++++++++++++++++++++++++++++++++++++++----- fs/nfsd/nfsctl.c | 65 +++++++++++++++++++++++++++++++++++++++++++ include/linux/lockd/lockd.h | 7 ++++ 3 files changed, 131 insertions(+), 7 deletions(-)
2008-04-23nfsd: fix sparse warningsHarvey Harrison1-7/+0
Add extern to nfsd/nfsd.h fs/nfsd/nfssvc.c:146:5: warning: symbol 'nfsd_nrthreads' was not declared. Should it be static? fs/nfsd/nfssvc.c:261:5: warning: symbol 'nfsd_nrpools' was not declared. Should it be static? fs/nfsd/nfssvc.c:269:5: warning: symbol 'nfsd_get_nrthreads' was not declared. Should it be static? fs/nfsd/nfssvc.c:281:5: warning: symbol 'nfsd_set_nrthreads' was not declared. Should it be static? fs/nfsd/export.c:1534:23: warning: symbol 'nfs_exports_op' was not declared. Should it be static? Add include of auth.h fs/nfsd/auth.c:27:5: warning: symbol 'nfsd_setuser' was not declared. Should it be static? Make static, move forward declaration closer to where it's needed. fs/nfsd/nfs4state.c:1877:1: warning: symbol 'laundromat_main' was not declared. Should it be static? Make static, forward declaration was already marked static. fs/nfsd/nfs4idmap.c:206:1: warning: symbol 'idtoname_parse' was not declared. Should it be static? fs/nfsd/vfs.c:1156:1: warning: symbol 'nfsd_create_setattr' was not declared. Should it be static? Signed-off-by: Harvey Harrison <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-04-23IPv6 support for NFS server export cachesAurélien Charbon1-2/+13
This adds IPv6 support to the interfaces that are used to express nfsd exports. All addressed are stored internally as IPv6; backwards compatibility is maintained using mapped addresses. Thanks to Bruce Fields, Brian Haley, Neil Brown and Hideaki Joshifuji for comments Signed-off-by: Aurelien Charbon <[email protected]> Cc: Neil Brown <[email protected]> Cc: Brian Haley <[email protected]> Cc: YOSHIFUJI Hideaki / 吉藤英明 <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-02-01nfsd: more careful input validation in nfsctl write methodsJ. Bruce Fields1-1/+4
Neil Brown points out that we're checking buf[size-1] in a couple places without first checking whether size is zero. Actually, given the implementation of simple_transaction_get(), buf[-1] is zero, so in both of these cases the subsequent check of the value of buf[size-1] will catch this case. But it seems fragile to depend on that, so add explicit checks for this case. Signed-off-by: J. Bruce Fields <[email protected]> Acked-by: NeilBrown <[email protected]>
2008-02-01svc: Add svc_xprt_names service to replace svc_sock_namesTom Tucker1-1/+1
Create a transport independent version of the svc_sock_names function. The toclose capability of the svc_sock_names service can be implemented using the svc_xprt_find and svc_xprt_close services. Signed-off-by: Tom Tucker <[email protected]> Acked-by: Neil Brown <[email protected]> Reviewed-by: Chuck Lever <[email protected]> Reviewed-by: Greg Banks <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-02-01knfsd: Support adding transports by writing portlist fileTom Tucker1-1/+48
Update the write handler for the portlist file to allow creating new listening endpoints on a transport. The general form of the string is: <transport_name><space><port number> For example: echo "tcp 2049" > /proc/fs/nfsd/portlist This is intended to support the creation of a listening endpoint for RDMA transports without adding #ifdef code to the nfssvc.c file. Transports can also be removed as follows: '-'<transport_name><space><port number> For example: echo "-tcp 2049" > /proc/fs/nfsd/portlist Attempting to add a listener with an invalid transport string results in EPROTONOSUPPORT and a perror string of "Protocol not supported". Attempting to remove an non-existent listener (.e.g. bad proto or port) results in ENOTCONN and a perror string of "Transport endpoint is not connected" Signed-off-by: Tom Tucker <[email protected]> Acked-by: Neil Brown <[email protected]> Reviewed-by: Chuck Lever <[email protected]> Reviewed-by: Greg Banks <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-02-01knfsd: allow cache_register to return error on failureJ. Bruce Fields1-3/+9
Newer server features such as nfsv4 and gss depend on proc to work, so a failure to initialize the proc files they need should be treated as fatal. Thanks to Andrew Morton for style fix and compile fix in case where CONFIG_NFSD_V4 is undefined. Cc: Andrew Morton <[email protected]> Acked-by: NeilBrown <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-02-01nfsd: fail init on /proc/fs/nfs/exports creation failureJ. Bruce Fields1-9/+28
I assume the reason failure of creation was ignored here was just to continue support embedded systems that want nfsd but not proc. However, in cases where proc is supported it would be clearer to fail entirely than to come up with some features disabled. Acked-by: NeilBrown <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-02-01nfsd: fail module init on reply cache init failureJ. Bruce Fields1-4/+7
If the reply cache initialization fails due to a kmalloc failure, currently we try to soldier on with a reduced (or nonexistant) reply cache. Better to just fail immediately: the failure is then much easier to understand and debug, and it could save us complexity in some later code. (But actually, it doesn't help currently because the cache is also turned off in some odd failure cases; we should probably find a better way to handle those failure cases some day.) Fix some minor style problems while we're at it, and rename nfsd_cache_init() to remove the need for a comment describing it. Acked-by: NeilBrown <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-02-01nfsd: cleanup nfsd module initialization cleanupJ. Bruce Fields1-10/+12
Handle the failure case here with something closer to the standard kernel style. Doesn't really matter for now, but I'd like to add a few more failure cases, and then this'll help. Acked-by: NeilBrown <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-02-01knfsd: cleanup nfsd4 properly on module init failureJ. Bruce Fields1-0/+2
We forgot to shut down the nfs4 state and idmapping code in this case. Acked-by: NeilBrown <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2007-10-09nfsd warning fixAndrew Morton1-1/+1
fs/nfsd/nfsctl.c: In function 'write_filehandle': fs/nfsd/nfsctl.c:301: warning: 'maxsize' may be used uninitialized in this function Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: "J. Bruce Fields" <[email protected]> Acked-by: Neil Brown <[email protected]>
2007-10-09knfsd: move nfsv4 slab creation/destruction to module init/exitJ. Bruce Fields1-1/+4
We have some slabs that the nfs4 server uses to store state objects. We're currently creating and destroying those slabs whenever the server is brought up or down. That seems excessive; may as well just do that in module initialization and exit. Also add some minor header cleanup. (Thanks to Andrew Morton for that and a compile fix.) Signed-off-by: "J. Bruce Fields" <[email protected]> Acked-by: Neil Brown <[email protected]>
2007-07-17knfsd: nfsd: remove unused header interface.hJ. Bruce Fields1-1/+0
It looks like Al Viro gutted this header file five years ago and it hasn't been touched since. Signed-off-by: "J. Bruce Fields" <[email protected]> Signed-off-by: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-07-17nfsd warning fixAndrew Morton1-1/+1
gcc-4.3: fs/nfsd/nfsctl.c: In function 'write_getfs': fs/nfsd/nfsctl.c:248: warning: cast from pointer to integer of different size Cc: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-02-14[PATCH] knfsd: fix return value for writes to some files in 'nfsd' filesystemNeilBrown1-1/+1
Most files in the 'nfsd' filesystem are transactional. When you write, a reply is generated that can be read back only on the same 'file'. If the reply has zero length, the 'write' will incorrectly return a value of '0' instead of the length that was written. This causes 'rpc.nfsd' to give an annoying warning. This patch fixes the test. Signed-off-by: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-12-08[PATCH] nfsd: change uses of f_{dentry, vfsmnt} to use f_pathJosef "Jeff" Sipek1-1/+1
Change all the uses of f_{dentry,vfsmnt} to f_path.{dentry,mnt} in the nfs server code. Signed-off-by: Josef "Jeff" Sipek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-10-04[PATCH] knfsd: Allow max size of NFSd payload to be configuredNeilBrown1-0/+33
The max possible is the maximum RPC payload. The default depends on amount of total memory. The value can be set within reason as long as no nfsd threads are currently running. The value can also be ready, allowing the default to be determined after nfsd has started. Signed-off-by: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-10-04[PATCH] knfsd: Fixed handling of lockd fail when adding nfsd socketNeilBrown1-6/+6
Arrgg.. We cannot 'lockd_up' before 'svc_addsock' as we don't know the protocol yet.... So switch it around again and save the name of the created sockets so that it can be closed if lock_up fails. Signed-off-by: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-10-04[PATCH] knfsd: Protect update to sn_nrthreads with lock_kernelNeilBrown1-0/+2
Signed-off-by: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-10-04[PATCH] knfsd: call lockd_down when closing a socket via a write to ↵NeilBrown1-0/+2
nfsd/portlist The refcount that nfsd holds on lockd is based on the number of open sockets. So when we close a socket, we should decrement the ref (with lockd_down). Currently when a socket is closed via writing to the portlist file, that doesn't happen. So: make sure we get an error return if the socket that was requested does is not found, and call lockd_down if it was. Cc: "J. Bruce Fields" <[email protected]> Signed-off-by: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-10-02[PATCH] knfsd: allow admin to set nthreads per nodeGreg Banks1-0/+70
Add /proc/fs/nfsd/pool_threads which allows the sysadmin (or a userspace daemon) to read and change the number of nfsd threads in each pool. The format is a list of space-separated integers, one per pool. Signed-off-by: Greg Banks <[email protected]> Signed-off-by: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-10-02[PATCH] knfsd: Check return value of lockd_up in write_portsNeilBrown1-3/+6
We should be checking the return value of lockd_up when adding a new socket to nfsd. So move the lockd_up before the svc_addsock and check the return value. The move is because lockd_down is easy, but there is no easy way to remove a recently added socket. Cc: "J. Bruce Fields" <[email protected]> Signed-off-by: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-10-02[PATCH] knfsd: allow sockets to be passed to nfsd via 'portlist'NeilBrown1-9/+50
Userspace should create and bind a socket (but not connectted) and write the 'fd' to portlist. This will cause the nfs server to listen on that socket. To close a socket, the name of the socket - as read from 'portlist' can be written to 'portlist' with a preceding '-'. Signed-off-by: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-10-02[PATCH] knfsd: define new nfsdfs file: portlist - contains list of portsNeilBrown1-0/+20
This file will list all ports that nfsd has open. Default when TCP enabled will be ipv4 udp 0.0.0.0 2049 ipv4 tcp 0.0.0.0 2049 Later, the list of ports will be settable. 'portlist' chosen rather than 'ports', to avoid unnecessary confusion with non-mainline patches which created 'ports' with different semantics. [[email protected]: cleanups, build fix] Signed-off-by: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-10-02[PATCH] knfsd: remove nfsd_versbits as intermediate storage for desired versionsNeilBrown1-10/+8
We have an array 'nfsd_version' which lists the available versions of nfsd, and 'nfsd_versions' (poor choice there :-() which lists the currently active versions. Then we have a bitmap - nfsd_versbits which says which versions are wanted. The bits in this bitset cause content to be copied from nfsd_version to nfsd_versions when nfsd starts. This patch removes nfsd_versbits and moves information directly from nfsd_version to nfsd_versions when requests for version changes arrive. Note that this doesn't make it possible to change versions while the server is running. This is because serv->sv_xdrsize is calculated when a service is created, and used when threads are created, and xdrsize depends on the active versions. Signed-off-by: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel1-1/+0
Signed-off-by: Jörn Engel <[email protected]> Signed-off-by: Adrian Bunk <[email protected]>
2006-06-23[PATCH] VFS: Permit filesystem to override root dentry on mountDavid Howells1-3/+3
Extend the get_sb() filesystem operation to take an extra argument that permits the VFS to pass in the target vfsmount that defines the mountpoint. The filesystem is then required to manually set the superblock and root dentry pointers. For most filesystems, this should be done with simple_set_mnt() which will set the superblock pointer and then set the root dentry to the superblock's s_root (as per the old default behaviour). The get_sb() op now returns an integer as there's now no need to return the superblock pointer. This patch permits a superblock to be implicitly shared amongst several mount points, such as can be done with NFS to avoid potential inode aliasing. In such a case, simple_set_mnt() would not be called, and instead the mnt_root and mnt_sb would be set directly. The patch also makes the following changes: (*) the get_sb_*() convenience functions in the core kernel now take a vfsmount pointer argument and return an integer, so most filesystems have to change very little. (*) If one of the convenience function is not used, then get_sb() should normally call simple_set_mnt() to instantiate the vfsmount. This will always return 0, and so can be tail-called from get_sb(). (*) generic_shutdown_super() now calls shrink_dcache_sb() to clean up the dcache upon superblock destruction rather than shrink_dcache_anon(). This is required because the superblock may now have multiple trees that aren't actually bound to s_root, but that still need to be cleaned up. The currently called functions assume that the whole tree is rooted at s_root, and that anonymous dentries are not the roots of trees which results in dentries being left unculled. However, with the way NFS superblock sharing are currently set to be implemented, these assumptions are violated: the root of the filesystem is simply a dummy dentry and inode (the real inode for '/' may well be inaccessible), and all the vfsmounts are rooted on anonymous[*] dentries with child trees. [*] Anonymous until discovered from another tree. (*) The documentation has been adjusted, including the additional bit of changing ext2_* into foo_* in the documentation. [[email protected]: convert ipath_fs, do other stuff] Signed-off-by: David Howells <[email protected]> Acked-by: Al Viro <[email protected]> Cc: Nathan Scott <[email protected]> Cc: Roland Dreier <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>