aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2006-12-06NFS: Fix up the dirty page accountingTrond Myklebust
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>
2006-12-06NFS: Ensure the inode is marked as dirty if we break out of nfs_wb_all()Trond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06NFS: Fix nfs_release_pageTrond Myklebust
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>
2006-12-06NFS: Ensure we only call set_page_writeback() under the page lockTrond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06NFS: Make nfs_updatepage() mark the page as dirty.Trond Myklebust
This will ensure that we can call set_page_writeback() from within nfs_writepage(), which is always called with the page lock set. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06NFS: Ensure that nfs_wb_page() calls writepage when necessary.Trond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06NFS: Add nfs_set_page_dirty()Trond Myklebust
We will want to allow nfs_writepage() to distinguish between pages that have been marked as dirty by the VM, and those that have been marked as dirty by nfs_updatepage(). In the former case, the entire page will want to be written out, and so any requests that were pending need to be flushed out first. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06NFS: Remove nfs_writepage_sync()Trond Myklebust
Maintaining two parallel ways of doing synchronous writes is rather pointless. This patch gets rid of the legacy nfs_writepage_sync(), and replaces it with the faster asynchronous writes. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06NFS: More cleanups of fs/nfs/write.cTrond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06NFS: Remove call to igrab() from nfs_writepage()Trond Myklebust
We always ensure that the nfs_open_context holds a reference to the dentry, so the test in nfs_writepage() for whether or not the inode is referenced is redundant. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06NFS: Cleanup: add common helper nfs_page_length()Trond Myklebust
Clean up a lot of ad-hoc page length calculations in fs/nfs/write.c Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06NFS: Store pointer to the nfs_page in page->privateTrond Myklebust
This will allow fast lookup of the nfs_page from the struct page instead of having to search the radix tree. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06NFS: cleanup of nfs_sync_inode_wait()Trond Myklebust
Allow callers to directly pass it a struct writeback_control. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06NFS: Clean up nfs_scan_dirty()Trond Myklebust
Pass down struct writeback control. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06NFS: Clean up nfs_flush_inode()Trond Myklebust
Make it take a struct writepages argument, and rename to nfs_flush_mapping(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06SUNRPC: Make the transport-specific setup routine allocate rpc_xprtChuck Lever
Change the location where the rpc_xprt structure is allocated so each transport implementation can allocate a private area from the same chunk of memory. Note also that xprt->ops->destroy, rather than xprt_destroy, is now responsible for freeing rpc_xprt when the transport is destroyed. Test plan: Connectathon. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06SUNRPC: minor optimization of "xid" field in rpc_xprtChuck Lever
Move the xid field in the rpc_xprt structure to be in the same cache line as the reserve_lock, since these are used at the same time. Test plan: None. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06SUNRPC: Clean up xs_send_pages()Trond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06SUNRPC: Ensure xdr_buf_read_netobj() checks for memory overrunsTrond Myklebust
Also clean up the code... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06SUNRPC: Add __(read|write)_bytes_from_xdr_bufTrond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06SUNRPC: Clean up argument types in xdr.cTrond Myklebust
Converts various integer buffer offsets and sizes to unsigned integer. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06NFS: Remove use of the Big Kernel Lock around nfs calls to readlinkFrank Filz
Remove use of the Big Kernel Lock around indirect calls to nfs3_proc_readlink and nfs4_proc_readlink, both of which basically call rpc_call_sync. Signed-off-by: Frank Filz <ffilz@us.ibm.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06NFS: Remove use of the Big Kernel Lock around calls to rpc_call_syncFrank Filz
Remove use of the Big Kernel Lock around calls to rpc_call_sync. Signed-off-by: Frank Filz <ffilz@us.ibm.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06NFS: Remove use of the Big Kernel Lock around calls to rpc_execute.Frank Filz
Remove use of the Big Kernel Lock around calls to rpc_execute. Signed-off-by: Frank Filz <ffilz@us.ibm.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06SUNRPC: Remove BKL around the RPC socket operations etc.Trond Myklebust
All internal RPC client operations should no longer depend on the BKL, however lockd and NFS callbacks may still require it. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06SUNRPC: Fix up missing BKL in asynchronous RPC callback functionsTrond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06SUNRPC: Give cloned RPC clients their own rpc_pipefs directoryTrond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06SUNRPC: Handle the cases where rpc_alloc_iostats() failsTrond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06NFS: Fix nfs_sync_inode_wait(FLUSH_INVALIDATE)Trond Myklebust
Currently nfs_sync_inode_wait() will fail to loop correctly when we call nfs_sync_inode_wait with the FLUSH_INVALIDATE argument. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06NFS: Fix missing page_unlock() in nfs_readpageTrond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06NFS: Fix asynchronous read error handlingTrond Myklebust
We must always call ->read_done() before we truncate the page data, or decide to flag an error. The reasons are that in NFSv2, ->read_done() is where the eof flag gets set. in NFSv3/v4 ->read_done() handles EJUKEBOX-type errors, and v4 state recovery. However, we need to mark the pages as uptodate before we deal with short read errors, since we may need to modify the nfs_read_data arguments. We therefore split the current nfs_readpage_result() into two parts: nfs_readpage_result(), which calls ->read_done() etc, and nfs_readpage_retry(), which subsequently handles short reads. Note: Removing the code that retries in case of a short read also fixes a bug in nfs_direct_read_result(), which used to return a corrupted number of bytes. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06NFS Exclusive open not supported bugAndy Ryan
When trying to open a file with the O_EXCL flag over NFS on a server that does not support exclusive mode, the file does not open. The reason, rpc_call_sync returns a errno number, and not the nfs error number. I fixed it by changing the status check in nfs3proc.c. Either this is how it should be fixed, or rpc_call_sync should be fixed to return the NFS error. Signed-off-by: Andy Ryan <genanr@allantgroup.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06SUNRPC: Fix a potential race in rpc_wake_up_task()Trond Myklebust
Use RCU to ensure that we can safely call rpc_finish_wakeup after we've called __rpc_do_wake_up_task. If not, there is a theoretical race, in which the rpc_task finishes executing, and gets freed first. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06Fix a second potential rpc_wakeup race...Trond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-12-06Subject: Re: [PATCH] Fix SUNRPC wakeup/execute race conditionChristophe Saout
The sunrpc scheduler contains a race condition that can let an RPC task end up being neither running nor on any wait queue. The race takes place between rpc_make_runnable (called from rpc_wake_up_task) and __rpc_execute under the following condition: First __rpc_execute calls tk_action which puts the task on some wait queue. The task is dequeued by another process before __rpc_execute continues its execution. While executing rpc_make_runnable exactly after setting the task `running' bit and before clearing the `queued' bit __rpc_execute picks up execution, clears `running' and subsequently both functions fall through, both under the false assumption somebody else took the job. Swapping rpc_test_and_set_running with rpc_clear_queued in rpc_make_runnable fixes that hole. This introduces another possible race condition that can be handled by checking for `queued' after setting the `running' bit. Bug noticed on a 4-way x86_64 system under XEN with an NFSv4 server on the same physical machine, apparently one of the few ways to hit this race condition at all. Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Christophe Saout <christophe@saout.de> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
2006-12-06[PATCH] uclinux: fix mmap() of directory for nommu caseMike Frysinger
I was playing with blackfin when i hit a neat bug ... doing an open() on a directory and then passing that fd to mmap() would cause the kernel to hang after poking into the code a bit more, i found that mm/nommu.c:validate_mmap_request() checks the length and if it is 0, just returns the address ... this is in stark contrast to mmu's mm/mmap.c:do_mmap_pgoff() where it returns -EINVAL for 0 length requests ... i then noticed that some other parts of the logic is out of date between the two funcs, so perhaps that's the easy fix ? Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-06[PATCH] m68knommu: remove FP conditionals in ucontext structGavin Lambert
The first patch is to the 2.6 kernel include file (for m68knommu), to get rid of the conditional definitions, otherwise the structures have different sizes depending on whether there's an FPU or not. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-06[PATCH] m68knommu: ColdFire serial driver fixesGreg Ungerer
Some updates for the old ColdFire serial driver: . support 3 and 4 UARTs on some ColdFire parts that have them . enable multifunction pins to serial for 527x CPU's . support the 5272 UART's fractional baud rate divisor . switch driver name to "mcfserial" Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-06[PATCH] m68knommu: switch 68360 to using rtc_timeGreg Ungerer
Adds support for RTCs (through genrtc) for M68KNOMMU. Board-specific code will have to link the appropriate RTC driver to the mach_hwclk callback, at minimum. This patch switches the 68360 code over to using rtc_time. Signed-off-by: Gavin Lambert <gavinl@compacsort.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-06[PATCH] m68knommu: fix timer register access on 523x ColdFire platformsGreg Ungerer
The 523x timer TRR register is a full 32bits, the older register (on other ColdFire parts) was only 16 bits. Use the right type of __raw_read when accessing it. Problem found by Yaroslav Vinogradov <yaroslav.vinogradov@freescale.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-06[PATCH] m68knommu: implement irq_canonicalize()Greg Ungerer
Add a null definition for irq_canonicalize(). It is used in the gerneric serial subsystem code, can't compile without it. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-06[PATCH] m68knommu: create rtc.hGreg Ungerer
This adds support for RTCs (through genrtc) for M68KNOMMU. Board-specific code will have to link the appropriate RTC driver to the mach_hwclk callback, at minimum. Signed-off-by: Gavin Lambert <gavinl@compacsort.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-06Actually update the fixed up compile failures.David Howells
Signed-Off-By: David Howells <dhowells@redhat.com>
2006-12-06Merge branch 'master' of ↵David Howells
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: drivers/pcmcia/ds.c Fix up merge failures with Linus's head and fix new compile failures. Signed-Off-By: David Howells <dhowells@redhat.com>
2006-12-06sh: sh775x/titan fixes for irq header changes.Jamie Lenehan
The following moves the creation of IPR interupts into setup-7750.c and updates a few other things to make it all work after the "Drop CPU subtype IRQ headers" commit. It boots and runs fine on my titan board. - adds an ipr_idx to the ipr_data and uses a function in the subtype code to calculate the address of the IPR registers - adds a function to enable individual interrupt mode for externals in the subtype code and calls that from the titan board code instead of doing it directly. - I changed the shift in the ipr_data to be the actual # of bits to shift, instead of the numnber / 4 - made it easier to match with the manual. Signed-off-by: Jamie Lenehan <lenehan@twibble.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06sh: update r7780rp defconfig.Paul Mundt
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06sh: compile fixes for header cleanup.Paul Mundt
Since some header inclusion paths were cleaned up, compilation broke. Add in the headers we need directly to build again. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06sh: Fixup pte_mkhuge() build failure.Paul Mundt
When hugetlbpage support isn't enabled, this can be bogus. Wrap it back in _PAGE_FLAGS_HARD to avoid changes to the base PTE when not aiming for larger sizes. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06sh: set KBUILD_IMAGE to something sensible.Paul Mundt
This was missing for sh too, wire it up.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06sh: show held locks in stack trace with lockdep.Paul Mundt
Follows the same change as other architectures.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>