aboutsummaryrefslogtreecommitdiff
path: root/fs
AgeCommit message (Collapse)Author
2006-12-30Merge branch 'upstream-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2 * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2: ocfs2: export heartbeat thread pid via configfs ocfs2: always unmap in ocfs2_data_convert_worker() ocfs2: ignore NULL vfsmnt in ocfs2_should_update_atime() ocfs2: Allow direct I/O read past end of file ocfs2: don't print error in ocfs2_permission()
2006-12-30[PATCH] ramfs breaks without CONFIG_BLOCKDimitri Gorokhovik
ramfs doesn't provide the .set_dirty_page a_op, and when the BLOCK layer is not configured in, 'set_page_dirty' makes a call via a NULL pointer. Signed-off-by: Dimitri Gorokhovik <dimitri.gorokhovik@free.fr> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30[PATCH] Fix lock inversion aio_kick_handler()Zach Brown
lockdep found a AB BC CA lock inversion in retry-based AIO: 1) The task struct's alloc_lock (A) is acquired in process context with interrupts enabled. An interrupt might arrive and call wake_up() which grabs the wait queue's q->lock (B). 2) When performing retry-based AIO the AIO core registers aio_wake_function() as the wake funtion for iocb->ki_wait. It is called with the wait queue's q->lock (B) held and then tries to add the iocb to the run list after acquiring the ctx_lock (C). 3) aio_kick_handler() holds the ctx_lock (C) while acquiring the alloc_lock (A) via lock_task() and unuse_mm(). Lockdep emits a warning saying that we're trying to connect the irq-safe q->lock to the irq-unsafe alloc_lock via ctx_lock. This fixes the inversion by calling unuse_mm() in the AIO kick handing path after we've released the ctx_lock. As Ben LaHaise pointed out __put_ioctx could set ctx->mm to NULL, so we must only access ctx->mm while we have the lock. Signed-off-by: Zach Brown <zach.brown@oracle.com> Signed-off-by: Suparna Bhattacharya <suparna@in.ibm.com> Acked-by: Benjamin LaHaise <bcrl@kvack.org> Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-28ocfs2: export heartbeat thread pid via configfsZhen Wei
The patch allows the ocfs2 heartbeat thread to prioritize I/O which may help cut down on spurious fencing. Most of this will be in the tools - we can have a pid configfs attribute and let userspace (ocfs2_hb_ctl) calls the ioprio_set syscall after starting heartbeat, but only cfq scheduler supports I/O priorities now. Signed-off-by: Zhen Wei <zwei@novell.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-12-28ocfs2: always unmap in ocfs2_data_convert_worker()Mark Fasheh
Mmap-heavy clustered workloads were sometimes finding stale data on mmap reads. The solution is to call unmap_mapping_range() on any down convert of a data lock. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-12-28ocfs2: ignore NULL vfsmnt in ocfs2_should_update_atime()Mark Fasheh
This can come from NFSD. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-12-28ocfs2: Allow direct I/O read past end of fileMark Fasheh
ocfs2_direct_IO_get_blocks() was incorrectly returning -EIO for a direct I/O read whose start block was past the end of the file allocation tree. Fix things so that we return a hole instead. do_direct_IO() will then notice that the range start is past eof and return a short read. While there, remove the unused vbo_max variable. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-12-28ocfs2: don't print error in ocfs2_permission()Mark Fasheh
Errors from generic_permission() can happen in valid cases and shouldn't be reported. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-12-23Fix up CIFS for "test_clear_page_dirty()" removalLinus Torvalds
This also adds he required page "writeback" flag handling, that cifs hasn't been doing and that the page dirty flag changes made obvious. Acked-by: Steve French <smfltc@us.ibm.com> Acked-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-23Fix reiserfs after "test_clear_page_dirty()" removalLinus Torvalds
Thanks to Len Brown for testing this fix, since while they have in the past, none of my machines run reiserfs at the moment. Cc: Vladimir V. Saveliev <vs@namesys.com> Acked-by: Len Brown <lenb@kernel.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22[PATCH] jbd: wait for already submitted t_sync_datalist buffer to completeHisashi Hifumi
In the current jbd code, if a buffer on BJ_SyncData list is dirty and not locked, the buffer is refiled to BJ_Locked list, submitted to the IO and waited for IO completion. But the fsstress test showed the case that when a buffer was already submitted to the IO just before the buffer_dirty(bh) check, the buffer was not waited for IO completion. Following patch solves this problem. If it is assumed that a buffer is submitted to the IO before the buffer_dirty(bh) check and still being written to disk, this buffer is refiled to BJ_Locked list. Signed-off-by: Hisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp> Cc: Jan Kara <jack@ucw.cz> Cc: "Stephen C. Tweedie" <sct@redhat.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22[PATCH] fdtable: Provide free_fdtable() wrapperVadim Lobanov
Christoph Hellwig has expressed concerns that the recent fdtable changes expose the details of the RCU methodology used to release no-longer-used fdtable structures to the rest of the kernel. The trivial patch below addresses these concerns by introducing the appropriate free_fdtable() calls, which simply wrap the release RCU usage. Since free_fdtable() is a one-liner, it makes sense to promote it to an inline helper. Signed-off-by: Vadim Lobanov <vlobanov@speakeasy.net> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22[PATCH] Make JFFS depend on CONFIG_BROKENJosh Boyer
Mark JFFS as broken and provide a warning to users that it is deprecated and scheduled for removal in 2.6.21 Signed-off-by: Josh Boyer <jwboyer@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22[PATCH] fsstack: Remove inode copyMichael Halcrow
Trevor found a file size problem in eCryptfs in recent kernels, and he tracked it down to an fsstack change. This was the eCryptfs copy_attr_all: > -void ecryptfs_copy_attr_all(struct inode *dest, const struct inode *src) > -{ > - dest->i_mode = src->i_mode; > - dest->i_nlink = src->i_nlink; > - dest->i_uid = src->i_uid; > - dest->i_gid = src->i_gid; > - dest->i_rdev = src->i_rdev; > - dest->i_atime = src->i_atime; > - dest->i_mtime = src->i_mtime; > - dest->i_ctime = src->i_ctime; > - dest->i_blkbits = src->i_blkbits; > - dest->i_flags = src->i_flags; > -} This is the fsstack copy_attr_all: > +void fsstack_copy_attr_all(struct inode *dest, const struct inode *src, > + int (*get_nlinks)(struct inode *)) > +{ > + if (!get_nlinks) > + dest->i_nlink = src->i_nlink; > + else > + dest->i_nlink = (*get_nlinks)(dest); > + > + dest->i_mode = src->i_mode; > + dest->i_uid = src->i_uid; > + dest->i_gid = src->i_gid; > + dest->i_rdev = src->i_rdev; > + dest->i_atime = src->i_atime; > + dest->i_mtime = src->i_mtime; > + dest->i_ctime = src->i_ctime; > + dest->i_blkbits = src->i_blkbits; > + dest->i_flags = src->i_flags; > + > + fsstack_copy_inode_size(dest, src); > +} The addition of copy_inode_size breaks eCryptfs, since eCryptfs needs to interpolate the file sizes (eCryptfs has extra space in the lower file for the header). The setting of the upper inode size occurs elsewhere in eCryptfs, and the new copy_attr_all now undoes what eCryptfs was doing right beforehand. I see three ways of going forward from here. (1) Something like this patch needs to go in (assuming it jives with Unionfs), (2) we need to make a change to the fsstack API for more fine-grained control over copying attributes (e.g., by also including a callback function for calculating the right file size, which will require some more work on both eCryptfs and Unionfs), or (3) the fsstack patch on eCryptfs (commit 0cc72dc7f050188d8d7344b1dd688cbc68d3cd30 made on Fri Dec 8 02:36:31 2006 -0800) needs to be yanked in 2.6.20. I think the simplest solution, from eCryptfs' perspective, is to just remove the inode size copy. Remove inode size copy in general fsstack attr copy code. Stacked filesystems may need to interpolate the inode size, since the file size in the lower file may be different than the file size in the stacked layer. Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com> Acked-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22[PATCH] fs/sysv/: proper prototypes for 2 functionsAdrian Bunk
Add proper prototypes for sysv_{init,destroy}_icache() in sysv.h Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-21[PATCH] Fix XFS after clear_page_dirty() removalDavid Chinner
XFS appears to call clear_page_dirty to get the mapping tree dirty tag set correctly at the same time the page dirty flag is cleared. I note that this can be done by set_page_writeback() if we clear the dirty flag on the page first when we are writing back the entire page. Hence it seems to me that the XFS call to clear_page_dirty() could easily be substituted by clear_page_dirty_for_io() followed by a call to set_page_writeback() to get the mapping tree tags set correctly after the page has been marked clean. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-21[PATCH] fuse: remove clear_page_dirty() callMiklos Szeredi
The use by FUSE was just a remnant of an optimization from the time when writable mappings were supported. Now FUSE never actually allows the creation of dirty pages, so this invocation of clear_page_dirty() is effectively a no-op. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-21[PATCH] Fix JFS after clear_page_dirty() removalDave Kleikamp
This patch removes some questionable code that attempted to make a no-longer-used page easier to reclaim. Calling metapage_writepage against such a page will not result in any I/O being performed, so removing this code shouldn't be a big deal. [ It's likely that we could have just replaced the "clear_page_dirty()" call with a call to "cancel_dirty_page()" instead, but in the meantime this is cleaner and simpler anyway, so unless there is some overriding reason (and Dave implies there isn't) I'll just use this patch as-is. - Linus ] Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-21VM: Remove "clear_page_dirty()" and "test_clear_page_dirty()" functionsLinus Torvalds
They were horribly easy to mis-use because of their tempting naming, and they also did way more than any users of them generally wanted them to do. A dirty page can become clean under two circumstances: (a) when we write it out. We have "clear_page_dirty_for_io()" for this, and that function remains unchanged. In the "for IO" case it is not sufficient to just clear the dirty bit, you also have to mark the page as being under writeback etc. (b) when we actually remove a page due to it becoming inaccessible to users, notably because it was truncate()'d away or the file (or metadata) no longer exists, and we thus want to cancel any outstanding dirty state. For the (b) case, we now introduce "cancel_dirty_page()", which only touches the page state itself, and verifies that the page is not mapped (since cancelling writes on a mapped page would be actively wrong as it is still accessible to users). Some filesystems need to be fixed up for this: CIFS, FUSE, JFS, ReiserFS, XFS all use the old confusing functions, and will be fixed separately in subsequent commits (with some of them just removing the offending logic, and others using clear_page_dirty_for_io()). This was confirmed by Martin Michlmayr to fix the apt database corruption on ARM. Cc: Martin Michlmayr <tbm@cyrius.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Hugh Dickins <hugh@veritas.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Arjan van de Ven <arjan@infradead.org> Cc: Andrei Popa <andrei.popa@i-neo.ro> Cc: Andrew Morton <akpm@osdl.org> Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Cc: Gordon Farquharson <gordonfarquharson@gmail.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-21Clean up and make try_to_free_buffers() not race with dirty pagesLinus Torvalds
This is preparatory work in our continuing saga on some hard-to-trigger file corruption with shared writable mmap() after the dirty page tracking changes (commit d08b3851da41d0ee60851f2c75b118e1f7a5fc89 etc) were merged. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-21[PATCH] fix leaks on pipe(2) failure exitsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-15[GFS2] Fix KconfigSteven Whitehouse
Here is a patch to fix up the Kconfig so that we don't land up with problems when people disable the NET subsystem. Thanks for all the hints and suggestions that people have sent me regarding this. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Cc: Aleksandr Koltsoff <czr@iki.fi> Cc: Toralf Förster <toralf.foerster@gmx.de> Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: Adrian Bunk <bunk@stusta.de> Cc: Chris Zubrzycki <chris@middle--earth.org> Cc: Patrick Caulfield <pcaulfie@redhat.com>
2006-12-15[DLM] fix compile warningPatrick Caulfield
This patch fixes a compile warning in lowcomms-tcp.c indicating that kmem_cache_t is deprecated. Signed-Off-By: Patrick Caulfield <pcaulfie@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2006-12-13DebugFS : file/directory removal fixMathieu Desnoyers
Fix file and directory removal in debugfs. Add inotify support for file removal. The following scenario : create dir a create dir a/b cd a/b (some process goes in cwd a/b) rmdir a/b rmdir a fails due to the fact that "a" appears to be non empty. It is because the "b" dentry is not deleted from "a" and still in use. The same problem happens if "b" is a file. d_delete is nice enough to know when it needs to unhash and free the dentry if nothing else is using it or, if someone is using it, to remove it from the hash queues and wait for it to be deleted when it has no users. The nice side-effect of this fix is that it calls the file removal notification. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-13DebugFS : more file/directory creation error handlingMathieu Desnoyers
Correct dentry count to handle creation errors. This patch puts a dput at the file creation instead of the file removal : lookup_one_len already returns a dentry with reference count of 1. Then, the dget() in simple_mknod increments it when the dentry is associated with a file. In a scenario where simple_create or simple_mkdir returns an error, this would lead to an unwanted increment of the reference counter, therefore making file removal impossible. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-13DebugFS : file/directory creation error handlingMathieu Desnoyers
Fix error handling of file and directory creation in DebugFS. The error path should release the file system because no _remove will be called for this erroneous creation. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-13DebugFS : coding style fixesMathieu Desnoyers
Minor coding style fixes along the way : 80 cols and a white space. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-13DebugFS : inotify create/mkdir supportMathieu Desnoyers
Add inotify create and mkdir events to DebugFS. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-13[PATCH] getting rid of all casts of k[cmz]alloc() callsRobert P. J. Day
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>
2006-12-13[PATCH] knfsd: Fix up some bit-rot in exp_exportNeilBrown
The nfsservctl system call isn't used but recent nfs-utils releases for exporting filesystems, and consequently the code that is uses - exp_export - has suffered some bitrot. Particular: - some newly added fields in 'struct svc_export' are being initialised properly. - the return value is now always -ENOMEM ... This patch fixes both these problems. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] knfsd: nfsd4: simplify filehandle checkJ.Bruce Fields
Kill another big "if" clause. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] knfsd: nfsd4: simplify migration op checkJ.Bruce Fields
I'm not too fond of these big if conditions. Replace them by checks of a flag in the operation descriptor. To my eye this makes the code a bit more self-documenting, and makes the complicated part of the code (proc_compound) a little more compact. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] knfsd: nfsd4: reorganize compound opsJ.Bruce Fields
Define an op descriptor struct, use it to simplify nfsd4_proc_compound(). Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] knfsd: nfsd4: make verify and nverify wrappersJ.Bruce Fields
Make wrappers for verify and nverify, for consistency with other ops. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] knfsd: nfsd4: don't inline nfsd4 compound op functionsJ.Bruce Fields
The inlining contributes to bloating the stack of nfsd4_compound, and I want to change the compound op functions to function pointers anyway. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] knfsd: nfsd4: move replay_owner to cstateJ.Bruce Fields
Tuck away the replay_owner in the cstate while we're at it. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] knfsd: nfsd4: remove spurious replay_owner checkJ.Bruce Fields
OK, this is embarassing--I've even looked back at the history, and cannot for the life of me figure out why I added this check. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] knfsd: nfsd4: pass saved and current fh together into nfsd4 operationsJ.Bruce Fields
Pass the saved and current filehandles together into all the nfsd4 compound operations. I want a unified interface to these operations so we can just call them by pointer and throw out the huge switch statement. Also I'll eventually want a structure like this--that holds the state used during compound processing--for deferral. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] knfsd: nfsd: don't drop silently on upcall deferralJ.Bruce Fields
To avoid tying up server threads when nfsd makes an upcall (to mountd, to get export options, to idmapd, for nfsv4 name<->id mapping, etc.), we temporarily "drop" the request and save enough information so that we can revisit it later. Certain failures during the deferral process can cause us to really drop the request and never revisit it. This is often less than ideal, and is unacceptable in the NFSv4 case--rfc 3530 forbids the server from dropping a request without also closing the connection. As a first step, we modify the deferral code to return -ETIMEDOUT (which is translated to nfserr_jukebox in the v3 and v4 cases, and remains a drop in the v2 case). Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] knfsd: nfsd4: handling more nfsd_cross_mnt errors in nfsd4 readdirJ.Bruce Fields
This patch on its own causes no change in behavior, since nfsd_cross_mnt() only returns -EAGAIN; but in the future I'd like it to also be able to return -ETIMEDOUT, so we may as well handle any possible error here. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] knfsd: nfsd: simplify exp_pseudorootJ.Bruce Fields
Note there's no need for special handling of -EAGAIN here; nfserrno() does what we want already. So this is a pure cleanup with no change in functionality. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] knfsd: nfsd: make exp_rootfh handle exp_parent errorsJ.Bruce Fields
Since exp_parent can fail by returning an error (-EAGAIN) in addition to by returning NULL, we should check for that case in exp_rootfh. (TODO: we should check that userland handles these errors too.) Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] knfsd: nfsd4: clarify units of COMPOUND_SLACK_SPACEJ.Bruce Fields
A comment here incorrectly states that "slack_space" is measured in words, not bytes. Remove the comment, and adjust a variable name and a few comments to clarify the situation. This is pure cleanup; there should be no change in functionality. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] knfsd: nfsd4: remove a dprink from nfsd4_lockJ.Bruce Fields
This dprintk is printing the wrong error now, but it's probably an unnecessary dprintk anyway; just remove it. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] one more EXPORT_UNUSED_SYMBOL removalAdrian Bunk
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] update Tigran's email addressesTigran Aivazian
As Adrian pointed out recently, there were still a couple of places where I should have fixed my email address. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] ncpfs: ensure we free wdog_pid on parse_option or fill_inode failureEric W. Biederman
This took a little refactoring but now errors are handled cleanly. When this code used pid_t values this wasn't necessary because you can't leak a pid_t. Thanks to Peter Vandrovec for spotting this. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Peter Vandrovec <vandrove@vc.cvut.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] ncpfs: Use struct pid to track the userspace watchdog processEric W. Biederman
This patch converts the tracking of the user space watchdog process from using a pid_t to use struct pid. This makes us safe from pid wrap around issues and prepares the way for the pid namespace. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Petr Vandrovec <VANDROVE@vc.cvut.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] smbfs: Make conn_pid a struct pidEric W. Biederman
smbfs keeps track of the user space server process in conn_pid. This converts that track to use a struct pid instead of pid_t. This keeps us safe from pid wrap around issues and prepares the way for the pid namespace. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] lockd endianness annotationsAl Viro
Annotated, all places switched to keeping status net-endian. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>