summaryrefslogtreecommitdiffstats
path: root/fs/nfs
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] sysctl: remove insert_at_head from register_sysctlEric W. Biederman2007-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The semantic effect of insert_at_head is that it would allow new registered sysctl entries to override existing sysctl entries of the same name. Which is pain for caching and the proc interface never implemented. I have done an audit and discovered that none of the current users of register_sysctl care as (excpet for directories) they do not register duplicate sysctl entries. So this patch simply removes the support for overriding existing entries in the sys_sysctl interface since no one uses it or cares and it makes future enhancments harder. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-by: Ralf Baechle <ralf@linux-mips.org> Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: David Howells <dhowells@redhat.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Andi Kleen <ak@muc.de> Cc: Jens Axboe <axboe@kernel.dk> Cc: Corey Minyard <minyard@acm.org> Cc: Neil Brown <neilb@suse.de> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Jan Kara <jack@ucw.cz> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Mark Fasheh <mark.fasheh@oracle.com> Cc: David Chinner <dgc@sgi.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Patrick McHardy <kaber@trash.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] remove many unneeded #includes of sched.hTim Schmielau2007-02-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | After Al Viro (finally) succeeded in removing the sched.h #include in module.h recently, it makes sense again to remove other superfluous sched.h includes. There are quite a lot of files which include it but don't actually need anything defined in there. Presumably these includes were once needed for macros that used to live in sched.h, but moved to other header files in the course of cleaning it up. To ease the pain, this time I did not fiddle with any header files and only removed #includes from .c-files, which tend to cause less trouble. Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha, arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig, allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all configs in arch/arm/configs on arm. I also checked that no new warnings were introduced by the patch (actually, some warnings are removed that were emitted by unnecessarily included header files). Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'master' of /home/trondmy/kernel/linux-2.6/Trond Myklebust2007-02-1210-31/+36
|\ | | | | | | | | | | | | | | | | | | Conflicts: net/sunrpc/auth_gss/gss_krb5_crypto.c net/sunrpc/auth_gss/gss_spkm3_token.c net/sunrpc/clnt.c Merge with mainline and fix conflicts.
| * [PATCH] Mark struct super_operations constJosef 'Jeff' Sipek2007-02-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | This patch is inspired by Arjan's "Patch series to mark struct file_operations and struct inode_operations const". Compile tested with gcc & sparse. Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * [PATCH] mark struct inode_operations const 2Arjan van de Ven2007-02-126-10/+10
| | | | | | | | | | | | | | | | | | | | | | Many struct inode_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * [PATCH] mark struct file_operations const 6Arjan van de Ven2007-02-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * [PATCH] include/linux/nfsd/const.h: remove NFS_SUPER_MAGICAdrian Bunk2007-02-121-0/+1
| | | | | | | | | | | | | | | | | | NFS_SUPER_MAGIC is already defined in include/linux/magic.h Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * [PATCH] knfsd: SUNRPC: Provide room in svc_rqst for larger addressesChuck Lever2007-02-122-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Expand the rq_addr field to allow it to contain larger addresses. Specifically, we replace a 'sockaddr_in' with a 'sockaddr_storage', then everywhere the 'sockaddr_in' was referenced, we use instead an accessor function (svc_addr_in) which safely casts the _storage to _in. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * [PATCH] knfsd: SUNRPC: Add a function to format the address in an svc_rqst ↵Chuck Lever2007-02-121-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for printing There are loads of places where the RPC server assumes that the rq_addr fields contains an IPv4 address. Top among these are error and debugging messages that display the server's IP address. Let's refactor the address printing into a separate function that's smart enough to figure out the difference between IPv4 and IPv6 addresses. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * [PATCH] knfsd: SUNRPC: allow creating an RPC service without registering ↵Chuck Lever2007-02-121-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with portmapper Sometimes we need to create an RPC service but not register it with the local portmapper. NFSv4 delegation callback, for example. Change the svc_makesock() API to allow optionally creating temporary or permanent sockets, optionally registering with the local portmapper, and make it return the ephemeral port of the new socket. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | NFS: disconnect before retrying NFSv4 requests over TCPChuck Lever2007-02-121-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC3530 section 3.1.1 states an NFSv4 client MUST NOT send a request twice on the same connection unless it is the NULL procedure. Section 3.1.1 suggests that the client should disconnect and reconnect if it wants to retry a request. Implement this by adding an rpc_clnt flag that an ULP can use to specify that the underlying transport should be disconnected on a major timeout. The NFSv4 client asserts this new flag, and requests no retries after a minor retransmit timeout. Note that disconnecting on a retransmit is in general not safe to do if the RPC client does not reuse the TCP port number when reconnecting. See http://bugzilla.linux-nfs.org/show_bug.cgi?id=6 Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFS: Don't use ClearPageUptodate() when writeback failsTrond Myklebust2007-02-121-5/+10
| | | | | | | | | | | | | | ClearPageUptodate() will just cause races here. What we really want to do is to invalidate the page cache. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFS: Cleanup - avoid rereading 'jiffies' more than once in the same routineTrond Myklebust2007-02-121-6/+8
| | | | | | | | | | | | Micro-optimisations for nfs_fhget() and nfs_wcc_update_inode(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFS: Fix a wraparound issue with nfsi->cache_change_attributeTrond Myklebust2007-02-121-8/+13
| | | | | | | | | | | | | | | | | | | | | | Fix wraparound issue with nfsi->cache_change_attribute. If it is found to lie in the future, then update it to lie in the past. Patch based on a suggestion by Neil Brown. ..and minor micro-optimisation: avoid reading 'jiffies' more than once in nfs_update_inode(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFSv4: /proc/mounts displays the wrong server name for referralsTrond Myklebust2007-02-031-8/+5
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFS: fix print format for tk_pidChuck Lever2007-02-033-9/+12
| | | | | | | | | | | | | | | | | | | | The tk_pid field is an unsigned short. The proper print format specifier for that type is %5u, not %4d. Also clean up some miscellaneous print formatting nits. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFSv4: Add lockdep checks to nfs4_wait_clnt_recover()Trond Myklebust2007-02-031-0/+4
| | | | | | | | | | | | Attempt to detect deadlocks due to caller holding locks on clp->cl_sem Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFSv4: Don't start state recovery in nfs4_close_done()Trond Myklebust2007-02-031-5/+1
| | | | | | | | | | | | We might not even have any open files at this point... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFS: Fixup some outdated comments...Trond Myklebust2007-02-031-41/+1
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFS: nfs_writepages() cleanupTrond Myklebust2007-02-032-25/+11
| | | | | | | | | | | | | | Strip out the call to nfs_commit_inode(), and allow that to be done by nfs_write_inode(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFS: Micro-optimisation for nfs_wb_page()Trond Myklebust2007-02-031-0/+2
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFS: Ensure that ->writepage() uses flush_stable() when reclaiming pagesTrond Myklebust2007-02-031-1/+1
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFS: Remove nfs_readpage_sync()Trond Myklebust2007-02-034-196/+2
| | | | | | | | | | | | It makes no sense to maintain 2 parallel systems for reading in pages. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFSv4: Cleanups for fs_locations code.Trond Myklebust2007-02-034-13/+7
| | | | | | | | | | | | | | | | | | | | Start long arduous project... What the hell is struct dentry = {}; all about? Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFSv4: Don't require that NFSv4 mount paths begin with '/'Trond Myklebust2007-02-031-5/+6
| | | | | | | | | | | | | | | | | | Addresses the regression noted in http://bugzilla.linux-nfs.org/show_bug.cgi?id=134 Also mark a couple of other regressions as requiring fixing. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFS: Dont clobber more uptodate values in nfs_set_verifier()Trond Myklebust2007-02-031-5/+14
| | | | | | | | | | | | | | | | nfs_lookup_revalidate and friends are not serialised, so it is currently quite possible for the dentry to be revalidated, and then have the updated verifier replaced with an older value by another process. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFS: Also use readdir info to revalidate positive dentriesTrond Myklebust2007-02-031-3/+11
| | | | | | | | | | | | | | | | | | If the fileid of the cached dentry fails to match that returned by the readdir call, then we should also d_drop. Try to take into account the fact that on NFSv4, readdir may return the "mounted_on_fileid" by looking for submounts. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFS: Fix a readdir/lookup inefficiency.Trond Myklebust2007-02-031-2/+8
| | | | | | | | | | | | | | | | Make sure that nfs_readdir_lookup() handles negative dentries correctly. If d_lookup() returns a negative dentry, then we need to d_drop() that since readdir shows that it should be positive. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFS: Fix up "rm -rf"...Trond Myklebust2007-02-031-0/+2
| | | | | | | | | | | | | | | | | | | | When a file is being scheduled for deletion by means of the sillyrename mechanism, it makes sense to start out writeback of the dirty data as soon as possible in order to ensure that the delete can occur. Examples of cases where this is an issue include "rm -rf", which will busy-wait until the file is closed, and the sillyrename completes. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFSv4: Fix NFS4_enc_server_caps_sz/NFS4_dec_server_caps_szTrond Myklebust2007-02-031-0/+2
| | | | | | | | | | | | Insert missing encode_putfh_maxsz/decode_putfh_maxsz Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | NFSv4: Fix Oops in nfs4_create_referral_serverTrond Myklebust2007-02-032-3/+8
|/ | | | | | | | The filehandle that is passed into nfs4_create_referral_server is not initialised. The expectation is that nfs4_create_referral_server will initialise it, and return it to the caller. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* [PATCH] Remove warning: VFS is out of sync with lock managerNeil Brown2007-01-301-2/+3
| | | | | | | | | | | | | | | But keep it as a dprintk The message can be generated in a quite normal situation: If a 'lock' request is interrupted, then the lock client needs to record that the server has the lock, incase it does. When we come the unlock, the server might say it doesn't, even though we think it does (or might) and this generates the message. Signed-off-by: Neil Brown <neilb@suse.de> Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] NFS: Fix races in nfs_revalidate_mapping()Trond Myklebust2007-01-243-32/+71
| | | | | | | | Prevent the call to invalidate_inode_pages2() from racing with file writes by taking the inode->i_mutex across the page cache flush and invalidate. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] NFS: Fix race in nfs_release_page()Trond Myklebust2007-01-111-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | NFS: Fix race in nfs_release_page() invalidate_inode_pages2() may find the dirty bit has been set on a page owing to the fact that the page may still be mapped after it was locked. Only after the call to unmap_mapping_range() are we sure that the page can no longer be dirtied. In order to fix this, NFS has hooked the releasepage() method and tries to write the page out between the call to unmap_mapping_range() and the call to remove_mapping(). This, however leads to deadlocks in the page reclaim code, where the page may be locked without holding a reference to the inode or dentry. Fix is to add a new address_space_operation, launder_page(), which will attempt to write out a dirty page without releasing the page lock. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Also, the bare SetPageDirty() can skew all sort of accounting leading to other nasties. [akpm@osdl.org: cleanup] Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] getting rid of all casts of k[cmz]alloc() callsRobert P. J. Day2006-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run this: #!/bin/sh for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do echo "De-casting $f..." perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f done And then go through and reinstate those cases where code is casting pointers to non-pointers. And then drop a few hunks which conflicted with outstanding work. Cc: Russell King <rmk@arm.linux.org.uk>, Ian Molton <spyro@f2s.com> Cc: Mikael Starvik <starvik@axis.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jeff Dike <jdike@addtoit.com> Cc: Greg KH <greg@kroah.com> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Paul Fulghum <paulkf@microgate.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Karsten Keil <kkeil@suse.de> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Jeff Garzik <jeff@garzik.org> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Ian Kent <raven@themaw.net> Cc: Steven French <sfrench@us.ibm.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Neil Brown <neilb@cse.unsw.edu.au> Cc: Jaroslav Kysela <perex@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] rename struct namespace to struct mnt_namespaceKirill Korotaev2006-12-081-1/+1
| | | | | | | | | | | | | | Rename 'struct namespace' to 'struct mnt_namespace' to avoid confusion with other namespaces being developped for the containers : pid, uts, ipc, etc. 'namespace' variables and attributes are also renamed to 'mnt_ns' Signed-off-by: Kirill Korotaev <dev@sw.ru> Signed-off-by: Cedric Le Goater <clg@fr.ibm.com> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Herbert Poetzl <herbert@13thfloor.at> Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] nfs: change uses of f_{dentry,vfsmnt} to use f_pathJosef "Jeff" Sipek2006-12-088-29/+29
| | | | | | | | | Change all the uses of f_{dentry,vfsmnt} to f_path.{dentry,mnt} in the nfs client code. Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Merge branch 'master' of /home/trondmy/kernel/linux-2.6/ into merge_linusTrond Myklebust2006-12-075-12/+12
|\
| * [PATCH] slab: remove kmem_cache_tChristoph Lameter2006-12-075-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace all uses of kmem_cache_t with struct kmem_cache. The patch was generated using the following script: #!/bin/sh # # Replace one string by another in all the kernel sources. # set -e for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do quilt add $file sed -e "1,\$s/$1/$2/g" $file >/tmp/$$ mv /tmp/$$ $file quilt refresh done The script was run like this sh replace kmem_cache_t "struct kmem_cache" Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] slab: remove SLAB_KERNELChristoph Lameter2006-12-073-3/+3
| | | | | | | | | | | | | | | | SLAB_KERNEL is an alias of GFP_KERNEL. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] slab: remove SLAB_NOFSChristoph Lameter2006-12-072-3/+3
| | | | | | | | | | | | | | | | SLAB_NOFS is an alias of GFP_NOFS. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | Merge branch 'master' of /home/trondmy/kernel/linux-2.6/ into merge_linusTrond Myklebust2006-12-074-8/+9
|\ \ | |/ | | | | | | | | | | | | Conflicts: include/linux/sunrpc/xprt.h net/sunrpc/xprtsock.c Fix up conflicts with the workqueue changes.
| * Merge branch 'master' of ↵David Howells2006-12-051-7/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: drivers/infiniband/core/iwcm.c drivers/net/chelsio/cxgb2.c drivers/net/wireless/bcm43xx/bcm43xx_main.c drivers/net/wireless/prism54/islpci_eth.c drivers/usb/core/hub.h drivers/usb/input/hid-core.c net/core/netpoll.c Fix up merge failures with Linus's head and fix new compilation failures. Signed-Off-By: David Howells <dhowells@redhat.com>
| * | WorkStruct: Pass the work_struct pointer instead of context dataDavid Howells2006-11-224-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass the work_struct pointer to the work function rather than context data. The work function can use container_of() to work out the data. For the cases where the container of the work_struct may go away the moment the pending bit is cleared, it is made possible to defer the release of the structure by deferring the clearing of the pending bit. To make this work, an extra flag is introduced into the management side of the work_struct. This governs auto-release of the structure upon execution. Ordinarily, the work queue executor would release the work_struct for further scheduling or deallocation by clearing the pending bit prior to jumping to the work function. This means that, unless the driver makes some guarantee itself that the work_struct won't go away, the work function may not access anything else in the work_struct or its container lest they be deallocated.. This is a problem if the auxiliary data is taken away (as done by the last patch). However, if the pending bit is *not* cleared before jumping to the work function, then the work function *may* access the work_struct and its container with no problems. But then the work function must itself release the work_struct by calling work_release(). In most cases, automatic release is fine, so this is the default. Special initiators exist for the non-auto-release case (ending in _NAR). Signed-Off-By: David Howells <dhowells@redhat.com>
| * | WorkStruct: Separate delayable and non-delayable events.David Howells2006-11-222-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Separate delayable work items from non-delayable work items be splitting them into a separate structure (delayed_work), which incorporates a work_struct and the timer_list removed from work_struct. The work_struct struct is huge, and this limits it's usefulness. On a 64-bit architecture it's nearly 100 bytes in size. This reduces that by half for the non-delayable type of event. Signed-Off-By: David Howells <dhowells@redhat.com>
* | | NFS: Clean up calls to mark_inode_dirty() part 2Trond Myklebust2006-12-061-2/+2
| | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | | NFS: Fix up writeback_control->nr_to_write accountingTrond Myklebust2006-12-061-9/+1
| | | | | | | | | | | | | | | | | | | | | We're really accounting for the same page twice now: once in generic_writepages(), and once in nfs_scan_dirty(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | | NFS: Fix up the dirty page accountingTrond Myklebust2006-12-062-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is now no reason to account for the dirty pages in the NFS code, since the VM code will now do it for us via __set_page_dirty_nobuffers(), and set_page_writeback(). We still need to keep the accounting of stable writes, though. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | | NFS: Ensure the inode is marked as dirty if we break out of nfs_wb_all()Trond Myklebust2006-12-061-0/+3
| | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | | NFS: Fix nfs_release_pageTrond Myklebust2006-12-061-6/+7
| | | | | | | | | | | | | | | | | | | | | invalidate_inode_pages2_range() will clear the PG_dirty bit before calling try_to_release_page(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
OpenPOWER on IntegriCloud