Kumar Gala [Sat, 25 Jun 2005 21:54:39 +0000 (14:54 -0700)]
[PATCH] ppc32: Remove FSL OCP support
Support for the OCP device model on Freescale (FSL) PPC's is no longer used.
All FSL PPC's that were using OCP have be converted to using the platform
device model.
Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Kumar Gala [Sat, 25 Jun 2005 21:54:37 +0000 (14:54 -0700)]
[PATCH] ppc32: Add support for Freescale e200 (Book-E) core
The e200 core is a Book-E core (similar to e500) that has a unified L1 cache
and is not cache coherent on the bus. The e200 core also adds a separate
exception level for debug exceptions. Part of this patch helps to cleanup a
few cases that are true for all Freescale Book-E parts, not just e500.
Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Kumar Gala [Sat, 25 Jun 2005 21:54:36 +0000 (14:54 -0700)]
[PATCH] ppc32: Check return of ppc_sys_get_pdata before accessing pointer
Ensure that the returned pointer from ppc_sys_get_pdata is not NULL before we
start using it. This handles any cases where we have variants of processors
on the same board with different functionality.
Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This patch,based on sample code by Roland McGrath, adds an execheap
permission check that controls the ability to make the heap executable so
that this can be prevented in almost all cases (the X server is presently
an exception, but this will hopefully be resolved in the future) so that
even programs with execmem permission will need to have the anonymous
memory mapped in order to make it executable.
The only reason that we use a permission check for such restriction (vs.
making it unconditional) is that the X module loader presently needs it; it
could possibly be made unconditional in the future when X is changed.
The policy patch for the execheap permission is available at:
http://pearls.tuxedo-es.org/patches/selinux/policy-execheap.patch
Signed-off-by: Lorenzo Hernandez Garcia-Hierro <lorenzo@gnu.org> Acked-by: James Morris <jmorris@redhat.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This patch adds an execstack permission check that controls the ability to
make the main process stack executable so that attempts to make the stack
executable can still be prevented even if the process is allowed the
existing execmem permission in order to e.g. perform runtime code
generation. Note that this does not yet address thread stacks. Note also
that unlike the execmem check, the execstack check is only applied on
mprotect calls, not mmap calls, as the current security_file_mmap hook is
not passed the necessary information presently.
The original author of the code that makes the distinction of the stack
region, is Ingo Molnar, who wrote it within his patch for
/proc/<pid>/maps markers.
(http://marc.theaimsgroup.com/?l=linux-kernel&m=110719881508591&w=2)
The patches also can be found at:
http://pearls.tuxedo-es.org/patches/selinux/policy-execstack.patch
http://pearls.tuxedo-es.org/patches/selinux/kernel-execstack.patch
policy-execstack.patch is the patch that needs to be applied to the policy in
order to support the execstack permission and exclude it
from general_domain_access within macros/core_macros.te.
kernel-execstack.patch adds such permission to the SELinux code within
the kernel and adds the proper permission check to the selinux_file_mprotect() hook.
Signed-off-by: Lorenzo Hernandez Garcia-Hierro <lorenzo@gnu.org> Acked-by: James Morris <jmorris@redhat.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Hugh Dickins [Sat, 25 Jun 2005 21:54:33 +0000 (14:54 -0700)]
[PATCH] mm: fix remap_pte_range BUG
Out-of-tree user of remap_pfn_range hit kernel BUG at mm/memory.c:1112! It
passes an unrounded size to remap_pfn_range, which was okay before 2.6.12,
but misses remap_pte_range's new end condition. An audit of all the other
ptwalks confirms that this is the only one so exposed.
Hifumi Hisashi [Sat, 25 Jun 2005 21:54:32 +0000 (14:54 -0700)]
[PATCH] Fix the error handling in direct I/O
Fix a bug on error handling in the direct I/O function.
Currently, if a file is opened with the O_DIRECT|O_SYNC flag, the write()
syscall cannot receive the EIO error after an I/O error (SCSI cable is
disconnected etc.).
Return values of other points that call generic_osync_inode() are treated
appropriately.
A couple of drivers declare register_serial/unregister_serial prototypes
but don't use them. FRV contains a commented out call to register_serial.
Since these are deprecated, remove these unnecessary references.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Dmitry Torokhov [Sat, 25 Jun 2005 21:54:28 +0000 (14:54 -0700)]
[PATCH] I8K: add new BIOS signatures
I8K: add BIOS signatures of a newer Dell laptops, also there can be
more than one temperature sensor reported by BIOS. Lifted from
driver 1.25 on Massimo Dal Zotto's site.
Dmitry Torokhov [Sat, 25 Jun 2005 21:54:25 +0000 (14:54 -0700)]
[PATCH] I8K: use standard DMI interface
I8K: Change to use stock dmi infrastructure instead of homegrown
parsing code. The driver now requires box's DMI data to match
list of supported models so driver can be safely compiled-in
by default without fear of it poking into random SMM BIOS
code. DMI checks can be ignored with i8k.ignore_dmi option.
Dmitry Torokhov [Sat, 25 Jun 2005 21:54:22 +0000 (14:54 -0700)]
[PATCH] Toshiba driver cleanup
Toshiba legacy driver cleanup:
- use module_init/module_exit for initialization instead of using
#ifdef MODULE and calling tosh_init manually from drivers/char/misc.c
- do not explicitly initialize static variables
- some whitespace and formatting cleanups
Russell King [Sat, 25 Jun 2005 18:39:45 +0000 (19:39 +0100)]
[PATCH] ARM: Generic Dynamic Tick Timer support for ARM, take 4
This patch adds support for Dynamic Tick Timer for ARM. Dynamic Tick is
also known as VST (Variable Scheduling Timeouts).
Dynamic Tick has been in use in the OMAP tree since last October. The
patch is not intrusive, and does not do anything unless CONFIG_NO_IDLE_HZ
is defined. This patch has the following fixed based on comments from
RMK:
- Time is updated before calling interrupt handlers.
- Added new interrupt flag SA_TIMER to avoid duplicate timer interrupts
- Moved struct dyn_tick_timer to time.h until we at some point probably
have an arch independent dyn-tick.h
- Cleaned up testing for DYN_TICK_ENABLED in irq.c
I've cleaned up this patch to fix some remaining issues:
- Call the timer tick handler with irqs disabled, as it would be from
a normal interrupt
- if we have a dyn_tick, we better implement all methods.
- generic timer_dyn_reprogram() call, to be called before sleeping
- added command line option - "dyntick=" to allow boot-time control
of this feature
-- rmk
Signed-off-by: Tony Lindgren Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
[PATCH] ARM: 2752/1: disable ixp2000 PCI I/O software workaround on chips that don't need it
Patch from Lennert Buytenhek
The later ixp2000 models don't need the PCI I/O workaround that we
currently perform. Add a config option to disable the workaround,
and panic on boot if a kernel without the workaround is booted on a
buggy chip. As only pre-production ixp2000s need the workaround,
the default is for it not to be configured in.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Deepak Saxena Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
The ixp2000 gpio cleanup broke the ixdp2800 build as it moved some
gpio-related functions from arch/platform.h to arch/gpio.h and the
ixdp2x00 support code used those functions but didn't include the
latter header file.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
[PATCH] ARM: 2750/1: add i2c platform device for enp2611 on-board i2c bus
Patch from Lennert Buytenhek
On the enp2611, GPIO 7 and 6 are connected to an on-board i2c bus that
attaches to the SODIMM module slot (for SPD) and an LM84 temperature
sensor. Add a platform device for this i2c bus.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Michael Chan [Sat, 25 Jun 2005 03:20:04 +0000 (20:20 -0700)]
[TG3]: Refinements to new locking strategy.
1. Move tp->irq_sync = 0 to before the interrupt mailbox IO in
tg3_enable_ints() so that the interrupt handler will always see
irq_sync == 0 when interrupts are enabled.
2. Remove the tg3_enable_ints() call in tg3_reset_hw(). Interrupts are
always enabled explicitly or through tg3_netif_start(). This is to
prevent interrupts being enabled while poll is disabled.
3. Update trans_start with jiffies in tg3_netif_stop() to prevent false
NETDEV WATCHDOG.
4. Pass in the proper irq_sync parameter to tg3_full_lock() depending on
netif_running() in some of the ethtool set calls.
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 25 Jun 2005 03:18:35 +0000 (20:18 -0700)]
[TG3]: Eliminate all hw IRQ handler spinlocks.
Move all driver spinlocks to be taken at sw IRQ
context only.
This fixes the skb_copy() we were doing with hw
IRQs disabled (which is illegal and triggers a
BUG() with HIGHMEM enabled). It also simplifies
the locking all over the driver tremendously.
We accomplish this feat by creating a special
sequence to synchronize with the hw IRQ handler
using a binary state and synchronize_irq().
This idea is from Herbert Xu.
Thanks to Michael Chan for helping to track down
all of the race conditions in initial versions
of this code.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 25 Jun 2005 03:17:10 +0000 (20:17 -0700)]
[TG3]: Fix missing memory barriers and SD_STATUS_UPDATED bit clearing.
There must be a rmb() between reading the status block tag
and calling tg3_has_work(). This was missing in tg3_mis()
and tg3_interrupt_tagged(). tg3_poll() got it right.
Also, SD_STATUS_UPDATED must be cleared in the status block
right before we call tg3_has_work(). Only tg3_poll() got this
wrong.
Based upon patches and commentary from Grant Grundler and
Michael Chan.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 25 Jun 2005 01:07:51 +0000 (18:07 -0700)]
[TCP]: Do not present confusing congestion control options by default.
Create TCP_CONG_ADVANCED option, akin to IP_ADVANCED_ROUTER, which
when disabled will bypass all of the congestion control Kconfig
options and leave the user with a safe default.
That safe default is currently BIC-TCP with new Reno as a fallback.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 25 Jun 2005 00:50:53 +0000 (17:50 -0700)]
[IPV4]: Move FIB lookup algorithm choice under IP_ADVANCED_ROUTING
Most users need not be concerned with a complex choice of what
FIB lookup algorithm to use. So give them the safe default of
IP_FIB_HASH if IP_ADVANCED_ROUTING is disabled.
Signed-off-by: David S. Miller <davem@davemloft.net>
[PATCH] ARM: 2748/1: ixp2000 implementation of the iomap api
Patch from Lennert Buytenhek
A number of ixp2000 models have a bug where the byte lanes for PCI I/O
transactions are swapped. We already work around this in our versions
of {in,out}{b,w,l}, but we also need to perform these workarounds in a
custom implementation of the new iomap API, provided in this patch.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Deepak Saxena Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
[PATCH] ARM: 2747/1: allow platforms to provide their own iomap implementation
Patch from Lennert Buytenhek
This patch conditionalises the io{read,write}{8,16,32} defines and the
prototypes for ioport_map/ioport_unmap in asm-arm/io.h on ioread8 not
already having been defined. This is done so that platforms can provide
their own implementation of the iomap API, ixp2000 for example needs
this.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Deepak Saxena Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Catalin Marinas [Fri, 24 Jun 2005 20:27:39 +0000 (21:27 +0100)]
[PATCH] ARM: 2698/1: Enable kernel r/w access to user pages on ARMv6
Patch from Catalin Marinas
cpu_v6_set_pte() sets the kernel access rights to r/o for user
pages (L_PTE_USER) when neither L_PTE_WRITE nor L_PTE_DIRTY are
set. This causes a kernel data abort when writing the TLS value
in the 0xffff0000 page. This patch enables the kernel r/w access.
Signed-off-by: Catalin Marinas Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Deepak Saxena [Fri, 24 Jun 2005 19:54:35 +0000 (20:54 +0100)]
[PATCH] ARM: 2745/1: Fix IXP4xx debug macros
Patch from Deepak Saxena
Current IXP4xx debug macros do not work in the small window between
the MMU being enabled and the call to map_io() b/c the standard
peripheral mapping is not properly setup for use with the low-level
debug code. This patch creates a new section-aligned mapping for the
UART specifically for use with the debug macros.
Signed-off-by: Deepak Saxena Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This patch cleans up the ixp2000 gpio irq code and implements the
set_irq_type method for gpio irqs so that users can select for which
events (falling edge/rising edge/level low/level high) on the gpio
pin they want the corresponding gpio irq to be triggered.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Deepak Saxena Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
[PATCH] ARM: 2740/1: ixp2000 align{b,w} need to parenthesize their arguments
Patch from Lennert Buytenhek
Two macros that are used on the ixp2000 to fixup byte lane enables
for I/O space accesses, align{b,w}, use their arguments without
parenthesizing them.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Fri, 24 Jun 2005 18:48:22 +0000 (19:48 +0100)]
[PATCH] Serial: Eliminate magic numbers
Use the existing macros instead.
Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Carsten Otte [Fri, 24 Jun 2005 05:05:28 +0000 (22:05 -0700)]
[PATCH] xip: reduce code duplication
This patch reworks filemap_xip.c with the goal to reduce code duplication
from mm/filemap.c. It applies agains 2.6.12-rc6-mm1. Instead of
implementing the aio functions, this one implements the synchronous
read/write functions only. For readv and writev, the generic fallback is
used. For aio, we rely on the application doing the fallback. Since our
"synchronous" function does memcpy immediately anyway, there is no
performance difference between using the fallbacks or implementing each
operation.
Carsten Otte [Fri, 24 Jun 2005 05:05:25 +0000 (22:05 -0700)]
[PATCH] xip: fs/mm: execute in place
- generic_file* file operations do no longer have a xip/non-xip split
- filemap_xip.c implements a new set of fops that require get_xip_page
aop to work proper. all new fops are exported GPL-only (don't like to
see whatever code use those except GPL modules)
- __xip_unmap now uses page_check_address, which is no longer static
in rmap.c, and defined in linux/rmap.h
- mm/filemap.h is now much more clean, plainly having just Linus'
inline funcs moved here from filemap.c
- fix includes in filemap_xip to make it build cleanly on i386
Martin Waitz [Fri, 24 Jun 2005 05:05:20 +0000 (22:05 -0700)]
[PATCH] DocBook: only use tabular style for long synopsis
There was a complaint that function declarations are shown tabular in the
documentation since switching to xmlto. This patch disables tabular mode
when the function fits in one line.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Matt Domsch [Fri, 24 Jun 2005 05:05:15 +0000 (22:05 -0700)]
[PATCH] modules: add version and srcversion to sysfs
This patch adds version and srcversion files to
/sys/module/${modulename} containing the version and srcversion fields
of the module's modinfo section (if present).
/sys/module/e1000
|-- srcversion
`-- version
This patch differs slightly from the version posted in January, as it
now uses the new kstrdup() call in -mm.
Why put this in sysfs?
a) Tools like DKMS, which deal with changing out individual kernel
modules without replacing the whole kernel, can behave smarter if they
can tell the version of a given module. The autoinstaller feature, for
example, which determines if your system has a "good" version of a
driver (i.e. if the one provided by DKMS has a newer verson than that
provided by the kernel package installed), and to automatically compile
and install a newer version if DKMS has it but your kernel doesn't yet
have that version.
b) Because sysadmins manually, or with tools like DKMS, can switch out
modules on the file system, you can't count on 'modinfo foo.ko', which
looks at /lib/modules/${kernelver}/... actually matching what is loaded
into the kernel already. Hence asking sysfs for this.
c) as the unbind-driver-from-device work takes shape, it will be
possible to rebind a driver that's built-in (no .ko to modinfo for the
version) to a newly loaded module. sysfs will have the
currently-built-in version info, for comparison.
d) tech support scripts can then easily grab the version info for what's
running presently - a question I get often.
There has been renewed interest in this patch on linux-scsi by driver
authors.
As the idea originated from GregKH, I leave his Signed-off-by: intact,
though the implementation is nearly completely new. Compiled and run on
x86 and x86_64.
From: Matthew Dobson <colpatch@us.ibm.com>
build fix
From: Thierry Vignaud <tvignaud@mandriva.com>
build fix
From: Matthew Dobson <colpatch@us.ibm.com>
warning fix
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com> Signed-off-by: Matt Domsch <Matt_Domsch@dell.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Even though it says DViCO FusionHDTV3 Gold-Q on the box, Gold-T is printed
on the card. This fix corrects the error in all places, and corrects the
tuner name Thomson DDT 7611 (ATSC/NTSC) in the documentation.
This applies against 2.6.12-rc5-mm2 after applying Manueal Capinha's
patch "Add support for PixelView Ultra Pro in v4l" (because of the
change from card=27 to card=28)
Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Manuel Capinha [Fri, 24 Jun 2005 05:04:53 +0000 (22:04 -0700)]
[PATCH] v4l: add support for PixelView Ultra Pro
The following patch adds support for the PixelView Ultra Pro video capture
card in v4l.
- It removes the remote control key definitions from ir-kbd-gpio.c and
moves them to ir-common.c so that they can be shared between bt878 and
cx88 based cards.
- The patch also moves the FUSIONHDTV_3_GOLD_Q card from number 27 to 28
to regain compatibility with the V4L cvs.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This patch fixes PAL-M chroma subcarrier frequency (FSC) to its correct
value of 3.5756115 MHz and adjusts horizontal total samples for PAL-M,
according with formula Line Draw Time / (4*FSC).
Michael Schimek [Fri, 24 Jun 2005 05:04:47 +0000 (22:04 -0700)]
[PATCH] v4l: saa7134 ntsc vbi fix
This patch fixes NTSC VBI capturing in the saa7134 driver.
Signed-off-by: Michael H. Schimek <mschimek@gmx.at> Cc: <video4linux-list@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Peter Skipworth [Fri, 24 Jun 2005 05:04:45 +0000 (22:04 -0700)]
[PATCH] BTTV support for Adlink RTV24 capture card
The bttv module currently lacks support for the Adlink RTV24 capture card.
The following patch adds support for the Adlink RTV24 video capture card to
the bttv module.
Michael Krufky [Fri, 24 Jun 2005 05:04:43 +0000 (22:04 -0700)]
[PATCH] Fix for cx88-cards.c for DVICO-FusionHDTV 3 GOLD Q
This patch allows full analog functionality for the DViCO FusionHDTV3
Gold-Q, 18ac:d820 which has a Conexant cx23882, Thompson7611, and LG 3202.
It does NOT yet support digital decoding or digital audio without the
internal analog audio jack connected to the sound board, but it works
perfectly in analog mode.
Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Fri, 24 Jun 2005 05:04:32 +0000 (22:04 -0700)]
[PATCH] knfsd: nfsd4 reboot dirname fix
Set the recovery directory via /proc/fs/nfsd/nfs4recoverydir.
It may be changed any time, but is used only on startup.
Signed-off-by: Andy Adamson <andros@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Fri, 24 Jun 2005 05:04:30 +0000 (22:04 -0700)]
[PATCH] knfsd: nfsd4: reboot recovery
This patch adds the code to create and remove client subdirectories from the
recovery directory, as described in the previous patch comment.
Signed-off-by: Andy Adamson <andros@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NFSv4 clients are required to know what state they have on the server so that
they can reclaim it on server reboot. However, it is possible for
pathalogical combinations of server reboots and network partitions to leave a
client in a state where it cannot know whether it has lost its state on the
server.
For this reason, rfc3530 requires that we store some information about clients
to stable storage.
So we maintain a directory /var/lib/nfs/v4recovery with a subdirectory for
each client with active state. We leave open the possibility of including
files underneath each such subdirectory with information about the client, but
for now the subdirectories are empty.
We create a client subdirectory whenever a client makes its first non-reclaim
open_confirm.
We remove a client subdirectory whenever either
a) its lease expires, or
b) the grace period ends without it reclaiming anything.
When handling reclaims, we allow the reclaim if and only if the client doing
the reclaim has a subdirectory.
This patch adds just the code to scan the recovery directory on nfsd startup.
Signed-off-by: Andy Adamson <andros@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Fri, 24 Jun 2005 05:04:23 +0000 (22:04 -0700)]
[PATCH] knfsd: nfsd4: remove cb_parsed
The cb_parsed field is only used by probe_callback, to determine whether the
callback information has been filled in by setclientid. But there is no way
that probe_callback() can be called without that having already happened, so
that check is superfluous, as is cb_parsed.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Fri, 24 Jun 2005 05:04:20 +0000 (22:04 -0700)]
[PATCH] knfsd: nfsd4: allow multiple lockowners
>From the language of rfc3530 section 8.1.3 (e.g., the suggestion that a
"process id" might be a reasonable lockowner value) it's conceivable that a
client might want to use the same lockowner string on multiple files, so we may
as well allow that. We expect each use of open_to_lockowner to create a
distinct seqid stream, though.
For now we're also allowing multiple uses of open_to_lockowner with the same
open, though it seems unlikely clients would actually do that.
Also add a comment reminding myself of some very non-scalable data structures.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Fri, 24 Jun 2005 05:04:17 +0000 (22:04 -0700)]
[PATCH] knfsd: nfsd4: rename state list fields
Trivial renaming patch:
I can never remember, while looking at various lists relating the nfsd4 state
structures, which are the "heads" and which are items on other lists, or which
structures are actually on the various lists. The following convention helps
me: given structures foo and bar, with foo containing the head of a list of
bars, use "bars" for the name of the head of the list contained in the struct
foo, and use "per_foo" for the entries in the struct bars.
Already done for struct nfs4_file; go ahead and do it for the other nfsd4
state structures.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Change from "goto" to "else if" format in setclientid_confirm.
From: Fred Isaman Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NFS4_INVAL is not a valid error for setclientid_confirm, and INUSE is the more
logical error here anyway.
From: Fred Isaman Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Setclientid_confirm code confused states 1 and 3 (numbering from the
IMPLEMENTATION section of rfc3530, section 14.2.33). Fix this.
State 1 allows the client to change the callback channel on the fly. We don't
implement this currently, so just turn off the callback channel in this case.
From: Fred Isaman Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Fri, 24 Jun 2005 05:04:06 +0000 (22:04 -0700)]
[PATCH] knfsd: nfsd4: fix uncomfirmed list
Setclientid code assumes there is only one match in unconfirmed list.
Make sure that assumption holds.
From: Fred Isaman Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Fri, 24 Jun 2005 05:04:03 +0000 (22:04 -0700)]
[PATCH] knfsd: nfsd4: make needlessly global code static
This patch contains the following possible cleanups:
- make needlessly global code static
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Fri, 24 Jun 2005 05:04:01 +0000 (22:04 -0700)]
[PATCH] knfsd: nfsd4: grace period end
For the purposes of reboot recovery, we want to do some work during the
transition period at the end of the grace period. Some of that work must be
guaranteed to have a certain relationship with the end of the grace period, so
we want to control the transition there.
Our approach is to modify the in_grace() checks to consult a global variable
instead of checking the time directly, to schedule the first run of the
laundromat thread at the end of the grace period, and to set the global
end-of-grace-period there.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Fri, 24 Jun 2005 05:03:56 +0000 (22:03 -0700)]
[PATCH] knfsd: nfsd4: add find_{un}conf_by_str functions to simplify setclientid
Minor setclientid cleanup
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Fri, 24 Jun 2005 05:03:52 +0000 (22:03 -0700)]
[PATCH] knfsd: nfsd4: reboot hash
For the purposes of reboot recovery we keep a directory with subdirectories
each having a name that is the ascii hex representation of the md5 sum of a
client identifier for an active client.
This adds the code to calculate that name. We also use it for the purposes of
comparing clients, so if someone ever manages to find two client names that
are md5 collisions, then we'll return clid_inuse to the second.
Signed-off-by: Andy Adamson <andros@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Fri, 24 Jun 2005 05:03:42 +0000 (22:03 -0700)]
[PATCH] knfsd: nfsd4: setclientid simplification
We can be a little more concise here.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Fri, 24 Jun 2005 05:03:35 +0000 (22:03 -0700)]
[PATCH] knfsd: nfsd4: idmap initialization
Adopt standard kernel style by defining a no-op function instead of putting
ifdef's in the code where the function is called.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Fri, 24 Jun 2005 05:03:32 +0000 (22:03 -0700)]
[PATCH] knfsd: nfsd4: remove nfs4_reclaim_init
nfs4_reclaim_init is no longer performing any useful function.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Fri, 24 Jun 2005 05:03:30 +0000 (22:03 -0700)]
[PATCH] knfsd: nfsd4: clean up state initialization
Separate out stuff that needs initialization on startup from stuff that only
needs initialization on module init from static data.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Fri, 24 Jun 2005 05:03:26 +0000 (22:03 -0700)]
[PATCH] knfsd: nfsd4: rename nfs4_state_init
Somewhat gratuitous rename to simplify following patch.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Fri, 24 Jun 2005 05:03:23 +0000 (22:03 -0700)]
[PATCH] knfsd: nfsd4: delegation recovery
Allow recovery of delegations after reboot.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Fri, 24 Jun 2005 05:03:21 +0000 (22:03 -0700)]
[PATCH] knfsd: nfsd4: simplify lease changing
The only way the protocol gives to change the lease time on the fly is to
simulate a reboot. We don't have that completely right in the current code;
among other things, we should probably put lockd in grace too while we do
this.
For now, let's just keep this simple, and wait till the next time nfsd starts
to register any changes in lease time. If the administrator really wants to
change the lease time *now*, they can go ahead and bring nfsd down and then
back up again after changing the lease time.
Also remove the "if (reclaim_str_hashtbl_size == 0)" case, a shortcut which
skips the grace period if we know of no clients in need of recovery. This
isn't going to work well with nlm.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Fri, 24 Jun 2005 05:03:19 +0000 (22:03 -0700)]
[PATCH] knfsd: nfsd4: create separate laundromat workqueue
We're running the laundromat work on the default kevent worker thread. But
the laundromat takes the nfsv4 state semaphore, which is used for way too much
stuff, and the potential for deadlocks is high. Better to have this on a
separate workqueue.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>