Stéphane Eranian [Mon, 30 Aug 2004 22:20:37 +0000 (22:20 +0000)]
[IA64] perfmon.c: cleanup system-wide context when closed from another cpu
- fix pfm_stop() and pfm_flush_pmds() to correctly cleanup
in case of a system-wide context which is closed while running
from another processor. This was leading to an assertion failure
in pfm_loads_regs() for the next user of the PMU on the monitored
CPU.
signed-off-by: stephane eranian <eranian@hpl.hp.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Dean Nelson [Wed, 25 Aug 2004 18:27:33 +0000 (18:27 +0000)]
[IA64] allow OEM written modules to make calls to ia64 OEM SAL functions.
Add wrapper functions for SAL_CALL(), SAL_CALL_NOLOCK(), and
SAL_CALL_REENTRANT() that allow OEM written modules to make
calls to ia64 OEM SAL functions.
Signed-off-by: Dean Nelson <dcn@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Jesse Barnes [Wed, 25 Aug 2004 17:45:09 +0000 (17:45 +0000)]
[IA64] generic_defconfig: Enable codepage/iocharset for VFAT filesystems.
VFAT filesystems need to have codepages and iocharsets specified these days,
so build some into the kernel to make it easier to mount /boot/efi on ia64
systems.
Signed-off-by: Jesse Barnes <jbarnes@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Jesse Barnes [Wed, 25 Aug 2004 17:39:35 +0000 (17:39 +0000)]
[IA64] Add include pagemap.h to tlb.h to fix warnings when CONFIG_SWAP=n.
I noticed when building with CONFIG_SWAP=n that tlb.h gave a warning about
some undefined symbols. This is because it was pulling them in through
swap.h, but when CONFIG_SWAP=n, they're no longer pulled in. Adding
pagemap.h to tlb.h fixes the problem.
Signed-off-by: Jesse Barnes <jbarnes@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Tony Luck [Mon, 23 Aug 2004 18:06:07 +0000 (18:06 +0000)]
Merge agluck-lia64.sc.intel.com:/data/home/aegl/BK/linux-ia64-test-2.6.8.1
into agluck-lia64.sc.intel.com:/data/home/aegl/BK/linux-ia64-release-2.6.8.1
Paul Mackerras [Mon, 23 Aug 2004 16:39:00 +0000 (09:39 -0700)]
[PATCH] ppc64: use struct list_head for hose_list
This patch changes hose_list from a simple linked list to a
"list.h"-style list. This is in preparation for the runtime
addition/removal of PCI Host Bridges.
Signed-off-by: John Rose <johnrose@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Nathan Fontenot [Mon, 23 Aug 2004 16:38:48 +0000 (09:38 -0700)]
[PATCH] ppc64: fix enable_surveillance() for power5
On some platforms (notably power5) you can't enable surveillance
(firmware/service processor watchdog) from the kernel - you have to do
it in the firmware.
This patch changes enable_surveillance() to make the message that is
printed in this situation more informative. Additionaly, the rtas_call
was changed to rtas_set_indicator so as to avoid having to handle
RTAS_BUSY returns.
Linus Torvalds [Mon, 23 Aug 2004 14:13:03 +0000 (07:13 -0700)]
Use F_SETLK instead of F_SETLK64 in nfs locking code.
The code doesn't actually _care_ about 32/64-bit issues,
only about F_SETLK vs F_SETLKW, and the F_SETLK64 doesn't
exist except as a compatibility thing on 64-bit architectures
(since the regular one already _is_ 64-bit, of course).
Trond Myklebust [Mon, 23 Aug 2004 16:02:36 +0000 (12:02 -0400)]
RPC,NFSv4: NFSv4 operations that create or destroy state on the
server are not allowed to be interrupted as that may result in the
client and server disagreeing.
Trond Myklebust [Mon, 23 Aug 2004 15:21:20 +0000 (11:21 -0400)]
NFSv2/v3/v4: Make the rpc_ops->getattr method take a filehandle
rather than an inode argument. Fix up nfs_instantiate() and
_nfs4_do_open to use this since doing a new lookup might be racy.
Trond Myklebust [Mon, 23 Aug 2004 15:19:03 +0000 (11:19 -0400)]
NFSv2/v3/v4: Place NFS nfs_page shared data into a single structure
that hangs off filp->private_data. As a side effect, this also
cleans up the NFSv4 private file state info.
Trond Myklebust [Mon, 23 Aug 2004 14:18:16 +0000 (10:18 -0400)]
NFSv2: In the NFSv3 RFC, the sattr3 structure passed in the SETATTR
call allows for the client to request that the mtime and/or atime
of an inode be set to the current server time, the given (client)
time, or not changed. The set-to-current-server value is used
when you run "touch file" on the client.
The NFSv2 RFC defines no such encoding for the sattr structure.
However Solaris and Irix machine obey a convention where passing
the invalid value mtime.useconds=1000000 means "set both mtime and
atime to the current server time". The convention is documented
in the book "NFS Illustrated" by Brent Callaghan. The patch below
implements this convention for the Linux client and server (hence
multiple To:s).
Trond Myklebust [Mon, 23 Aug 2004 14:17:20 +0000 (10:17 -0400)]
KCONFIG: In the kernel help for NFSv3 & NFSv4 client support both are
listed as "the newer version ... of the NFS protocol". Obviously
both can't be the newer version at the same time, so here's a
patch to correct the text in such a way that only v4 is listed as
the newer version. Patch is against 2.6.7-rc3 - please consider
including it.
Trond Myklebust [Mon, 23 Aug 2004 14:16:26 +0000 (10:16 -0400)]
NFS: Now that file handle comparison ignores the unused parts of the
file handle container, there is no longer any need to clear the
file handle container before copying in a file handle. This
allows us to remove a 128 byte memset() from several hot paths.
Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Trond Myklebust [Mon, 23 Aug 2004 14:15:49 +0000 (10:15 -0400)]
NFS: While the storage container for NFS file handles must be able to
store 128 bytes, usually NFS servers don't use file handles that
are more than 32 bytes in size. This patch creates an efficient
mechanism for comparing file handles that ignores the unused bytes
in a file handle.
Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Trond Myklebust [Mon, 23 Aug 2004 14:15:13 +0000 (10:15 -0400)]
NFS: In 2.4, NFS O_DIRECT used the VFS's O_DIRECT logic to provide
direct I/O support for NFS files. The 2.4 VFS O_DIRECT logic was
block based, thus the NFS client had to provide a minimum
allowable blocksize for O_DIRECT reads and writes on NFS files.
For various reasons we chose 512 bytes. In 2.6, there is no
requirement for a minimum blocksize. NFS O_DIRECT reads and
writes can go to any byte at any offset in a file. Thus we revert
the blocksize setting for NFS file systems to the previous
behavior, which was to advertise the "wsize" setting as the
optimal I/O block size. This improves the performance of
applications like 'cp' which use this value as their transfer
size.
This patch also exposes the server's reported disk block size in the
f_frsize of the vfsstat structure.
Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Trond Myklebust [Mon, 23 Aug 2004 14:13:19 +0000 (10:13 -0400)]
NFS: Break the nfs_wreq_lock into per-mount locks. This helps prevent
a heavy read and write workload on one mount point from
interfering with workloads on other mount points.
Note that there is still some serialization due to the big kernel
lock.
Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Trond Myklebust [Mon, 23 Aug 2004 14:12:24 +0000 (10:12 -0400)]
RPCSEC_GSS: Add the spkm3 common and client-side code.
Signed-off-by: Andy Adamson <andros@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Trond Myklebust [Mon, 23 Aug 2004 14:10:18 +0000 (10:10 -0400)]
NFSv4: OK, so it's trivial and probably superfluous, but I don't see
why we shouldn't be slightly stricter here, so I'm just going to
keep sending this until I'm told to stop.... Make sure that
unmapped errors are approximately in the range of defined NFS4
errors.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Trond Myklebust [Mon, 23 Aug 2004 14:01:57 +0000 (10:01 -0400)]
RPC: Reduce stack utilization for all synchronous NFS operations by
using a dynamically allocated rpc_task structure instead of
allocating one on the stack. This reduces stack utilization by
over 200 bytes for all synchronous NFS operations.
Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Linus Torvalds [Mon, 23 Aug 2004 10:59:22 +0000 (03:59 -0700)]
Remove pointless cast-as-lvalue usage from modedb.c
It's evil, people. Don't use that particular gcc extension.
I've yet to meet anybody who could read the resulting code
and tell me what the heck it does.
Linus Torvalds [Mon, 23 Aug 2004 10:10:29 +0000 (03:10 -0700)]
Don't use signed one-bit bitfields.
We assign 0 and 1 to it, but since it's signed, that's
actually already overflowing the poor thing. So make
it unsigned, which is what it really was supposed to be
in the first place.
David S. Miller [Mon, 23 Aug 2004 07:34:58 +0000 (00:34 -0700)]
[SPARC64]: Fix bugs in new U1memcpy code.
- U1copy_from_user needs PREAMBLE since it uses
explicit ASI_BLK_AIUS references.
- Need to use EX_RETVAL() in U1memcpy.S
- U1memcpy.S can load one 64-bit word too
many, passing the source buffer boundary
and thus potentially causing exceptions.
David S. Miller [Mon, 23 Aug 2004 07:33:47 +0000 (00:33 -0700)]
[SPARC64]: Revamped memcpy infrastructure.
- Make it easier to maintain the Ultra-I vs. Ultra-III
memcpy implementations. Before you had to maintain
3 different entire copies of the routines.
- Kill %asi register writing Ultra-I single memcpy loop
for both user and kernel. Was not worth it.
- Simplify exception detection and handling enormously.
Trond Myklebust [Mon, 23 Aug 2004 07:14:37 +0000 (00:14 -0700)]
[PATCH] Fix posix file locking (9/9)
NFSv2/v3: Fix up a race in the case where the user presses ^C while a
process is in the middle of setting up a posix lock. In case the
server registered our lock, we need to make sure that it gets
cleaned up during the resulting file close().
Trond Myklebust [Mon, 23 Aug 2004 07:14:14 +0000 (00:14 -0700)]
[PATCH] Fix posix file locking (7/9)
VFS,CIFS,NLM,NFSv4: make filesystems directly responsible for calling
posix_lock_file() if they need it. This fixes an NFS race whereby
in case of a server reboot, the recovery thread could re-establish
a lock that had just been freed.
Trond Myklebust [Mon, 23 Aug 2004 07:13:51 +0000 (00:13 -0700)]
[PATCH] Fix posix file locking (5/9)
NLM: file_lock->fl_owner may live for longer than the pid of the
original process that created it. Fix NFSv2/v3 client locking code
to map file_lock->fl_owner into a unique 32-bit number or
"pseudo-pid".
There's a misplaced check returning error for
hpt_minimum_revision(dev,8) == TRUE still there, making the previous
fixes useless for the early revision HPT cards.