pandora-kernel.git
18 years agodrm: major update from CVS for radeon and core
Dave Airlie [Mon, 2 Jan 2006 10:32:48 +0000 (21:32 +1100)]
drm: major update from CVS for radeon and core

This patch pull in a lot of changes from CVS to the main core DRM,
and updates the radeon driver to 1.21.0 that supports r300 texrect
and radeon card type ioctl.

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: update drm pci ids list
Dave Airlie [Mon, 2 Jan 2006 10:23:07 +0000 (21:23 +1100)]
drm: update drm pci ids list

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: drm_ioctl.c sync with fixes from CVS
Dave Airlie [Mon, 2 Jan 2006 10:19:39 +0000 (21:19 +1100)]
drm: drm_ioctl.c sync with fixes from CVS

Apply the fixes from CVS that were outstanding for this file

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: update lock flags from userspace
Dave Airlie [Mon, 2 Jan 2006 10:15:01 +0000 (21:15 +1100)]
drm: update lock flags from userspace

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: update to i915 1.3.0
Dave Airlie [Mon, 2 Jan 2006 09:14:23 +0000 (20:14 +1100)]
drm: update to i915 1.3.0

Add support for vblank ioctls to i915 driver

From: Dave Airlie <airlied@linux.ie>
Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: update drm_memory_debug.h
Dave Airlie [Mon, 2 Jan 2006 08:52:09 +0000 (19:52 +1100)]
drm: update drm_memory_debug.h

Update from DRM CVS for drm memory debug

From: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: proper fix for drm_context
Dave Airlie [Mon, 2 Jan 2006 08:25:35 +0000 (19:25 +1100)]
drm: proper fix for drm_context

Bad patch in last version

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: fix issue with contexts running out of RAM
Dave Airlie [Mon, 2 Jan 2006 08:23:44 +0000 (19:23 +1100)]
drm: fix issue with contexts running out of RAM

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: update PCIGART support from CVS
Dave Airlie [Mon, 2 Jan 2006 06:18:39 +0000 (17:18 +1100)]
drm: update PCIGART support from CVS

In order to work on FreeBSD the gart needed to use a local mapping
This patch moves the mainline to the new code and aligns some comment
changes

From: Eric Anholt <anholt@freebsd.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: remove old reclaim_buffers from ix0 drivers
Dave Airlie [Mon, 2 Jan 2006 05:49:02 +0000 (16:49 +1100)]
drm: remove old reclaim_buffers from ix0 drivers

From: Dave Airlie <airlied@linux.ie>
Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: bring savage inline with latest CVS
Dave Airlie [Mon, 2 Jan 2006 05:23:01 +0000 (16:23 +1100)]
drm: bring savage inline with latest CVS

apply some whitespace cleanup and add wrappers for MTRR for OS calls

From: Eric Anholt <anholt@freebsd.org> + Dave Airlie <airlied@linux.ie>
Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: fix a LOR issue on FreeBSD for savage driver
Dave Airlie [Mon, 2 Jan 2006 05:11:44 +0000 (16:11 +1100)]
drm: fix a LOR issue on FreeBSD for savage driver

Correct a LOR issue on FreeBSD by allocating temporary space and doing a single
DRM_COPY_FROM_USER rather than DRM_VERIFYAREA_READ followed by tons of
DRM_COPY_FROM_USER_UNCHECKED.  I don't like the look of the temporary space
allocation, but I like the simplification in the rest of the file.  Tested
with glxgears, tuxracer, and q3 on a savage4.

From: Eric Anholt <anholt@freebsd.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: bring sis + tdfx up to latest CVS
Dave Airlie [Mon, 2 Jan 2006 03:44:12 +0000 (14:44 +1100)]
drm: bring sis + tdfx up to latest CVS

Cleanup SIS + TDFX drivers with latest changes from CVS.

From: Eric Anholt <anholt@freebsd.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: via driver update to CVS version
Dave Airlie [Mon, 2 Jan 2006 03:26:20 +0000 (14:26 +1100)]
drm: via driver update to CVS version

This updates the DRM via driver to the latest CVS version, which contains
support for DMA blitting.

It also contains some whitespace and other minor fixes

From: Thomas Hellstrom <unichrome@shipmail.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: move ioctl flags to a bit field of flags
Dave Airlie [Mon, 2 Jan 2006 02:54:04 +0000 (13:54 +1100)]
drm: move ioctl flags to a bit field of flags

From: Dave Airlie

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: update VIA driver to 2.7.2
Dave Airlie [Sat, 12 Nov 2005 10:52:46 +0000 (21:52 +1100)]
drm: update VIA driver to 2.7.2

Add PCI DMA blitengine to VIA DRM
Add portability code for porting VIA to FreeBSD.
Sync via_drm.h with 3d driver

From: Thomas Hellstrom <unichrome@shipmail.org>, Eric Anholt <anholt@freebsd.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: drop mtrr from i915
Dave Airlie [Fri, 11 Nov 2005 12:30:27 +0000 (23:30 +1100)]
drm: drop mtrr from i915

Alan Hourihane wants to set MTRR in the DDX only as otherwise
we get problems with the shared memory chipset.

From: Alan Hourihane <alanh@fairlite.demon.co.uk>
Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: update mga driver for new bootstrap code
Dave Airlie [Fri, 11 Nov 2005 12:11:34 +0000 (23:11 +1100)]
drm: update mga driver for new bootstrap code

The MGA driver needs to use the full AGP interface.

From: Ian Romanick <idr@us.ibm.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: remove exports that modules shouldn't use.
Dave Airlie [Fri, 11 Nov 2005 12:10:18 +0000 (23:10 +1100)]
drm: remove exports that modules shouldn't use.

Modules should go via the new drm_agp_ functions.

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: add in-kernel entry points for rest of AGP ioctls
Dave Airlie [Fri, 11 Nov 2005 11:33:39 +0000 (22:33 +1100)]
drm: add in-kernel entry points for rest of AGP ioctls

Allow DRM modules to call AGP internally in the kernel.

From: Ian Romanick <idr@us.ibm.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: simplify sysfs code for drm
Dave Airlie [Fri, 11 Nov 2005 11:07:35 +0000 (22:07 +1100)]
drm: simplify sysfs code for drm

This simplifies the sysfs code for the drm and add a dri_library_name
attribute which can be used by a userspace app to figure out which
library to load.

From: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: fixup drm_proc.c struct table
Dave Airlie [Fri, 11 Nov 2005 09:27:35 +0000 (20:27 +1100)]
drm: fixup drm_proc.c struct table

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: remove old backwards compatibilty stuff
Dave Airlie [Fri, 11 Nov 2005 08:52:22 +0000 (19:52 +1100)]
drm: remove old backwards compatibilty stuff

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: remove drm_flush
Dave Airlie [Fri, 11 Nov 2005 08:40:52 +0000 (19:40 +1100)]
drm: remove drm_flush

drm_flush is no longer needed remove.

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: cleanup via_ds.c includes
Dave Airlie [Fri, 11 Nov 2005 08:34:47 +0000 (19:34 +1100)]
drm: cleanup via_ds.c includes

Remove the linux includes from via_ds.c

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: remove remnamt of old DRM code from tdfx
Dave Airlie [Fri, 11 Nov 2005 08:34:10 +0000 (19:34 +1100)]
drm: remove remnamt of old DRM code from tdfx

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: remove drm_init.c it is no longer needed
Dave Airlie [Thu, 10 Nov 2005 11:28:56 +0000 (22:28 +1100)]
drm: remove drm_init.c it is no longer needed

Move drm_cpu_valid into drm_fops.c

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: rename driver hooks more understandably
Dave Airlie [Thu, 10 Nov 2005 11:16:34 +0000 (22:16 +1100)]
drm: rename driver hooks more understandably

Rename the driver hooks in the DRM to something a little more understandable:
preinit         ->      load
postinit        ->      (removed)
presetup        ->      firstopen
postsetup       ->      (removed)
open_helper     ->      open
prerelease      ->      preclose
free_filp_priv  ->      postclose
pretakedown     ->      lastclose
postcleanup     ->      unload
release         ->      reclaim_buffers_locked
version         ->      (removed)

postinit and version were replaced with generic code in the Linux DRM (drivers
now set their version numbers and description in the driver structure, like on
BSD).  postsetup wasn't used at all.  Fixes the savage hooks for
initializing and tearing down mappings at the right times.  Testing involved at
least starting X, running glxgears, killing glxgears, exiting X, and repeating.

Tested on:      FreeBSD (g200, g400, r200, r128)
                Linux (r200, savage4)

From: Eric Anholt <anholt@freebsd.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Thu, 10 Nov 2005 03:57:25 +0000 (19:57 -0800)]
Merge /pub/scm/linux/kernel/git/bart/ide-2.6

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 10 Nov 2005 03:32:25 +0000 (19:32 -0800)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6

18 years ago[PATCH] SUNRPC: don't reencode when looping in call transmit.
Trond Myklebust [Thu, 10 Nov 2005 02:45:24 +0000 (21:45 -0500)]
[PATCH] SUNRPC: don't reencode when looping in call transmit.

If the call to xprt_transmit() fails due to socket buffer space
exhaustion, we do not need to re-encode the RPC message when we
loop back through call_transmit.

Re-encoding can actually end up triggering the WARN_ON() in
call_decode() if we re-encode something like a read() request and
auth->au_rslack has changed.
It can also cause us to increment the RPCSEC_GSS sequence number
beyond the limits of the allowed window.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[NETLINK]: Generic netlink family
Thomas Graf [Thu, 10 Nov 2005 01:25:56 +0000 (02:25 +0100)]
[NETLINK]: Generic netlink family

The generic netlink family builds on top of netlink and provides
simplifies access for the less demanding netlink users. It solves
the problem of protocol numbers running out by introducing a so
called controller taking care of id management and name resolving.

Generic netlink modules register themself after filling out their
id card (struct genl_family), after successful registration the
modules are able to register callbacks to command numbers by
filling out a struct genl_ops and calling genl_register_op(). The
registered callbacks are invoked with attributes parsed making
life of simple modules a lot easier.

Although generic netlink modules can request static identifiers,
it is recommended to use GENL_ID_GENERATE and to let the controller
assign a unique identifier to the module. Userspace applications
will then ask the controller and lookup the idenfier by the module
name.

Due to the current multicast implementation of netlink, the number
of generic netlink modules is restricted to 1024 to avoid wasting
memory for the per socket multiacst subscription bitmask.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[RTNETLINK]: Use generic netlink receive queue processor
Thomas Graf [Thu, 10 Nov 2005 01:25:55 +0000 (02:25 +0100)]
[RTNETLINK]: Use generic netlink receive queue processor

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Use generic netlink receive queue processor
Thomas Graf [Thu, 10 Nov 2005 01:25:54 +0000 (02:25 +0100)]
[XFRM]: Use generic netlink receive queue processor

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETLINK]: Generic netlink receive queue processor
Thomas Graf [Thu, 10 Nov 2005 01:25:53 +0000 (02:25 +0100)]
[NETLINK]: Generic netlink receive queue processor

Introduces netlink_run_queue() to handle the receive queue of
a netlink socket in a generic way. Processes as much as there
was in the queue upon entry and invokes a callback function
for each netlink message found. The callback function may
refuse a message by returning a negative error code but setting
the error pointer to 0 in which case netlink_run_queue() will
return with a qlen != 0.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETLINK]: Make netlink_callback->done() optional
Thomas Graf [Thu, 10 Nov 2005 01:25:52 +0000 (02:25 +0100)]
[NETLINK]: Make netlink_callback->done() optional

Most netlink families make no use of the done() callback, making
it optional gets rid of all unnecessary dummy implementations.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETLINK]: Type-safe netlink messages/attributes interface
Thomas Graf [Thu, 10 Nov 2005 01:25:51 +0000 (02:25 +0100)]
[NETLINK]: Type-safe netlink messages/attributes interface

Introduces a new type-safe interface for netlink message and
attributes handling. The interface is fully binary compatible
with the old interface towards userspace. Besides type safety,
this interface features attribute validation capabilities,
simplified message contstruction, and documentation.

The resulting netlink code should be smaller, less error prone
and easier to understand.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Add nf_conntrack subsystem.
Yasuyuki Kozakai [Thu, 10 Nov 2005 00:38:16 +0000 (16:38 -0800)]
[NETFILTER]: Add nf_conntrack subsystem.

The existing connection tracking subsystem in netfilter can only
handle ipv4.  There were basically two choices present to add
connection tracking support for ipv6.  We could either duplicate all
of the ipv4 connection tracking code into an ipv6 counterpart, or (the
choice taken by these patches) we could design a generic layer that
could handle both ipv4 and ipv6 and thus requiring only one sub-protocol
(TCP, UDP, etc.) connection tracking helper module to be written.

In fact nf_conntrack is capable of working with any layer 3
protocol.

The existing ipv4 specific conntrack code could also not deal
with the pecularities of doing connection tracking on ipv6,
which is also cured here.  For example, these issues include:

1) ICMPv6 handling, which is used for neighbour discovery in
   ipv6 thus some messages such as these should not participate
   in connection tracking since effectively they are like ARP
   messages

2) fragmentation must be handled differently in ipv6, because
   the simplistic "defrag, connection track and NAT, refrag"
   (which the existing ipv4 connection tracking does) approach simply
   isn't feasible in ipv6

3) ipv6 extension header parsing must occur at the correct spots
   before and after connection tracking decisions, and there were
   no provisions for this in the existing connection tracking
   design

4) ipv6 has no need for stateful NAT

The ipv4 specific conntrack layer is kept around, until all of
the ipv4 specific conntrack helpers are ported over to nf_conntrack
and it is feature complete.  Once that occurs, the old conntrack
stuff will get placed into the feature-removal-schedule and we will
fully kill it off 6 months later.

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[PATCH] powerpc: sched fixups
Andrew Morton [Wed, 9 Nov 2005 23:45:30 +0000 (15:45 -0800)]
[PATCH] powerpc: sched fixups

- Re-add a hunk lost during merge: ppc64 is missing the hunk that disables
  preempt on the secondary CPUs before they call cpu_idle().

- ppc's cpu_idle() had the need_resched() test wrong.

Cc: Nick Piggin <nickpiggin@yahoo.com.au>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] optimize activate_task()
Chen, Kenneth W [Wed, 9 Nov 2005 23:45:29 +0000 (15:45 -0800)]
[PATCH] optimize activate_task()

recalc_task_prio() is called from activate_task() to calculate dynamic
priority and interactive credit for the activating task.  For real-time
scheduling process, all that dynamic calculation is thrown away at the end
because rt priority is fixed.  Patch to optimize recalc_task_prio() away
for rt processes.

Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Nick Piggin <piggin@cyberone.com.au>
Cc: Con Kolivas <kernel@kolivas.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] ide-floppy: software eject not working with LS-120 drive
Ondrej Zary [Wed, 9 Nov 2005 23:25:15 +0000 (00:25 +0100)]
[PATCH] ide-floppy: software eject not working with LS-120 drive

The problem (eject not working on ATAPI LS-120 drive) is caused by
idefloppy_ioctl() function which *first* tries generic_ide_ioctl()
and *only* if it fails with -EINVAL, proceeds with the specific ioctls.
The generic eject command fails with something other than -EINVAL
and the specific one is never executed.

This patch fixes it by first going through the internal ioctls
and only trying generic_ide_ioctl() if none of them matches.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
18 years ago[PATCH] siimage: enable interrupts on Adaptec SA-1210 card
John W. Linville [Wed, 9 Nov 2005 23:19:14 +0000 (00:19 +0100)]
[PATCH] siimage: enable interrupts on Adaptec SA-1210 card

The siimage driver proports to support the Adaptec SA-1210 SATA
controller.  However, at least some of those cards boot-up with their
interrupts disabled internally.  The siimage driver currently ignores
that fact, so that driver does not actually work with those cards.
This patch enables those interrupts on cards that need it.

[ This is implemented based on similar code in the libata-based
  sata_sil driver. ]

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
18 years ago[PATCH] ide: explain the PCI bus test we do in <asm-i386/ide.h>
Alan Cox [Wed, 9 Nov 2005 23:10:37 +0000 (00:10 +0100)]
[PATCH] ide: explain the PCI bus test we do in <asm-i386/ide.h>

Matthew Wilcox asked that this got a comment explaining why it is done
so here it is.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
18 years ago[PATCH] ide: CS5535 driver
Jaya Kumar [Wed, 9 Nov 2005 22:58:16 +0000 (23:58 +0100)]
[PATCH] ide: CS5535 driver

Signed-off-by: Jaya Kumar <jayakumar.ide@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
18 years agoFix AGP compile on non-x86 architectures
Linus Torvalds [Wed, 9 Nov 2005 22:56:00 +0000 (14:56 -0800)]
Fix AGP compile on non-x86 architectures

AGP shouldn't use "global_flush_tlb()" to flush the AGP mappings, that i
spurely an x86'ism.  The proper AGP mapping flusher that should be used
is "flush_agp_mappings()", which on x86 obviously happens to do a global
TLB flush.

This makes AGP (or at least the config _I_ happen to use) compile again
on ppc64.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] ide: AMD Geode GX/LX support
Jordan Crouse [Wed, 9 Nov 2005 22:26:09 +0000 (23:26 +0100)]
[PATCH] ide: AMD Geode GX/LX support

From: "Jordan Crouse" <jordan.crouse@amd.com>

The core IDE engine on the CS5536 is the same as the other AMD southbridges,
so unlike the CS5535, we can simply add the appropriate PCI headers to
the existing amd74xx code.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
18 years ago[PATCH] ide: ide-scsi fails to call idescsi_check_condition for things like "Medium...
Willem Riede [Wed, 9 Nov 2005 22:18:22 +0000 (23:18 +0100)]
[PATCH] ide: ide-scsi fails to call idescsi_check_condition for things like "Medium not present"

This patch started life as a response to fedora specific ide subsystem changes
that made error handling of my ATAPI tape drive fail; the specifics are in

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=160868

The insertion of the statement rq->errors = err; near the end of
ide_end_drive_cmd() in drivers/ide/ide-io.c means that rq->errors does not
contain what it needs to in idescsi_end_request() in drivers/scsi/ide-scsi.c
anymore. Recent mainline kernels now also have this change.

The patch below makes ide-scsi whole.

Signed-off-by: Willem Riede <wrlk@riede.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
Linus Torvalds [Wed, 9 Nov 2005 22:13:53 +0000 (14:13 -0800)]
Merge /pub/scm/linux/kernel/git/gregkh/i2c-2.6

18 years ago[PATCH] ide: possible cleanups
Adrian Bunk [Wed, 9 Nov 2005 22:07:56 +0000 (23:07 +0100)]
[PATCH] ide: possible cleanups

This patch contains the following possible cleanups:
- pci/cy82c693.c: make a needlessly global function static
- remove the following unneeded EXPORT_SYMBOL's:
  - ide-taskfile.c: do_rw_taskfile
  - ide-iops.c: default_hwif_iops
  - ide-iops.c: default_hwif_transport
  - ide-iops.c: wait_for_ready

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
18 years ago[PATCH] ide: move CONFIG_IDE_MAX_HWIFS into linux/ide.h
Bjorn Helgaas [Wed, 9 Nov 2005 21:58:07 +0000 (22:58 +0100)]
[PATCH] ide: move CONFIG_IDE_MAX_HWIFS into linux/ide.h

CONFIG_IDE_MAX_HWIFS is a generic thing, no need to have it duplicated
by every arch that uses it.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
18 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy...
Linus Torvalds [Wed, 9 Nov 2005 21:47:34 +0000 (13:47 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/shaggy/jfs-2.6

18 years ago[PATCH] ide: incorrect device link for ide-cs
Hannes Reinecke [Wed, 9 Nov 2005 21:47:18 +0000 (22:47 +0100)]
[PATCH] ide: incorrect device link for ide-cs

Devices driven by ide-cs will appear under /sys/devices instead of the
appropriate PCMCIA device. To fix this I had to extend the hw_regs_t
structure with a 'struct device' field, which allows us to set the
parent link for the appropriate hwif.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@suse.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 9 Nov 2005 21:40:21 +0000 (13:40 -0800)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6

18 years ago[IPV6]: ip6ip6_lock is not unlocked in error path.
Ken-ichirou MATSUZAWA [Wed, 9 Nov 2005 21:08:29 +0000 (13:08 -0800)]
[IPV6]: ip6ip6_lock is not unlocked in error path.

From: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6]: Fix fallout from CONFIG_IPV6_PRIVACY
Peter Chubb [Wed, 9 Nov 2005 21:05:47 +0000 (13:05 -0800)]
[IPV6]: Fix fallout from CONFIG_IPV6_PRIVACY

Trying to build today's 2.6.14+git snapshot gives undefined references
to use_tempaddr

Looks like an ifdef got left out.

Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER] ctnetlink: ICMP_ID is u_int16_t not u_int8_t.
Krzysztof Piotr Oledzki [Wed, 9 Nov 2005 21:04:32 +0000 (13:04 -0800)]
[NETFILTER] ctnetlink: ICMP_ID is u_int16_t not u_int8_t.

Signed-off-by: Krzysztof Piotr Oledzki <ole@ans.pl>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER] ctnetlink: Fix oops when no ICMP ID info in message
Krzysztof Piotr Oledzki [Wed, 9 Nov 2005 21:04:08 +0000 (13:04 -0800)]
[NETFILTER] ctnetlink: Fix oops when no ICMP ID info in message

This patch fixes an userspace triggered oops. If there is no ICMP_ID
info the reference to attr will be NULL.

Signed-off-by: Krzysztof Piotr Oledzki <ole@ans.pl>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER] ctnetlink: Add support to identify expectations by ID's
Pablo Neira Ayuso [Wed, 9 Nov 2005 21:03:42 +0000 (13:03 -0800)]
[NETFILTER] ctnetlink: Add support to identify expectations by ID's

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER] ctnetlink: propagate error instaed of returning -EPERM
Pablo Neira Ayuso [Wed, 9 Nov 2005 21:03:26 +0000 (13:03 -0800)]
[NETFILTER] ctnetlink: propagate error instaed of returning -EPERM

Propagate the error to userspace instead of returning -EPERM if the get
conntrack operation fails.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER] ctnetlink: return -EINVAL if size is wrong
Pablo Neira Ayuso [Wed, 9 Nov 2005 21:03:09 +0000 (13:03 -0800)]
[NETFILTER] ctnetlink: return -EINVAL if size is wrong

Return -EINVAL if the size isn't OK instead of -EPERM.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: stop tracking ICMP error at early point
Yasuyuki Kozakai [Wed, 9 Nov 2005 21:02:45 +0000 (13:02 -0800)]
[NETFILTER]: stop tracking ICMP error at early point

Currently connection tracking handles ICMP error like normal packets
if it failed to get related connection. But it fails that after all.

This makes connection tracking stop tracking ICMP error at early point.

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER] nfnetlink: only load subsystems if CAP_NET_ADMIN is set
Harald Welte [Wed, 9 Nov 2005 21:02:16 +0000 (13:02 -0800)]
[NETFILTER] nfnetlink: only load subsystems if CAP_NET_ADMIN is set

Without this patch, any user can cause nfnetlink subsystems to be
autoloaded.  Those subsystems however could add significant processing
overhead to packet processing, and would refuse any configuration messages
from non-CAP_NET_ADMIN processes anyway.

This patch follows a suggestion from Patrick McHardy.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER] PPTP helper: fix PNS-PAC expectation call id
Philip Craig [Wed, 9 Nov 2005 21:01:53 +0000 (13:01 -0800)]
[NETFILTER] PPTP helper: fix PNS-PAC expectation call id

The reply tuple of the PNS->PAC expectation was using the wrong call id.

So we had the following situation:
- PNS behind NAT firewall
- PNS call id requires NATing
- PNS->PAC gre packet arrives first

then the PNS->PAC expectation is matched, and the other expectation
is deleted, but the PAC->PNS gre packets do not match the gre conntrack
because the call id is wrong.

We also cannot use ip_nat_follow_master().

Signed-off-by: Philip Craig <philipc@snapgear.com>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER] ctnetlink: get_conntrack can use GFP_KERNEL
Pablo Neira Ayuso [Wed, 9 Nov 2005 21:01:19 +0000 (13:01 -0800)]
[NETFILTER] ctnetlink: get_conntrack can use GFP_KERNEL

ctnetlink_get_conntrack is always called from user context, so GFP_KERNEL
is enough.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER] ctnetlink: kill unused includes
Pablo Neira Ayuso [Wed, 9 Nov 2005 21:00:47 +0000 (13:00 -0800)]
[NETFILTER] ctnetlink: kill unused includes

Kill some useless headers included in ctnetlink. They aren't used in any
way.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER] ctnetlink: add module alias to fix autoloading
Pablo Neira Ayuso [Wed, 9 Nov 2005 21:00:29 +0000 (13:00 -0800)]
[NETFILTER] ctnetlink: add module alias to fix autoloading

Add missing module alias. This is a must to load ctnetlink on demand. For
example, the conntrack tool will fail if the module isn't loaded.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER] ctnetlink: add marking support from userspace
Pablo Neira Ayuso [Wed, 9 Nov 2005 21:00:04 +0000 (13:00 -0800)]
[NETFILTER] ctnetlink: add marking support from userspace

This patch adds support for conntrack marking from user space.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER] ctnetlink: check if protoinfo is present
Pablo Neira Ayuso [Wed, 9 Nov 2005 20:59:41 +0000 (12:59 -0800)]
[NETFILTER] ctnetlink: check if protoinfo is present

This fixes an oops triggered from userspace. If we don't pass information
about the private protocol info, the reference to attr will be NULL. This is
likely to happen in update messages.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER] nfnetlink: nfattr_parse() can never fail, make it void
Harald Welte [Wed, 9 Nov 2005 20:59:13 +0000 (12:59 -0800)]
[NETFILTER] nfnetlink: nfattr_parse() can never fail, make it void

nfattr_parse (and thus nfattr_parse_nested) always returns success. So we
can make them 'void' and remove all the checking at the caller side.

Based on original patch by Pablo Neira Ayuso <pablo@netfilter.org>

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: refcount leak of proto when ctnetlink dumping tuple
Yasuyuki Kozakai [Wed, 9 Nov 2005 20:58:46 +0000 (12:58 -0800)]
[NETFILTER]: refcount leak of proto when ctnetlink dumping tuple

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: packet counter of conntrack is 32bits
Yasuyuki Kozakai [Wed, 9 Nov 2005 20:58:05 +0000 (12:58 -0800)]
[NETFILTER]: packet counter of conntrack is 32bits

The packet counter variable of conntrack was changed to 32bits from 64bits.
This follows that change.

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC] sbus rtc: implement ->compat_ioctl
Christoph Hellwig [Wed, 9 Nov 2005 20:07:18 +0000 (12:07 -0800)]
[SPARC] sbus rtc: implement ->compat_ioctl

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC]: Fix locking thinkos in display7seg and cpwatchdog drivers.
David S. Miller [Wed, 9 Nov 2005 20:05:37 +0000 (12:05 -0800)]
[SPARC]: Fix locking thinkos in display7seg and cpwatchdog drivers.

Noticed by Eric Brower.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Use ARRAY_SIZE macro
Tobias Klauser [Wed, 9 Nov 2005 20:03:42 +0000 (12:03 -0800)]
[SPARC64]: Use ARRAY_SIZE macro

Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove a
duplicate of ARRAY_SIZE which is never used anyways.

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC]: Use ARRAY_SIZE macro
Tobias Klauser [Wed, 9 Nov 2005 20:03:05 +0000 (12:03 -0800)]
[SPARC]: Use ARRAY_SIZE macro

Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove a
duplicate of ARRAY_SIZE which is never used anyways.

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
Linus Torvalds [Wed, 9 Nov 2005 19:45:00 +0000 (11:45 -0800)]
Merge /pub/scm/linux/kernel/git/davej/agpgart

18 years agoFix ptrace self-attach rule
Linus Torvalds [Wed, 9 Nov 2005 19:33:07 +0000 (11:33 -0800)]
Fix ptrace self-attach rule

Before we did CLONE_THREAD, the way to check whether we were attaching
to ourselves was to just check "current == task", but with CLONE_THREAD
we should check that the thread group ID matches instead.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Wed, 9 Nov 2005 16:55:53 +0000 (08:55 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

18 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Wed, 9 Nov 2005 16:35:50 +0000 (08:35 -0800)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/libata-dev

18 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Wed, 9 Nov 2005 16:34:36 +0000 (08:34 -0800)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/netdev-2.6

18 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Wed, 9 Nov 2005 16:33:27 +0000 (08:33 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

18 years ago[PATCH] fs/hugetlbfs/inode.c: make a function static
Adrian Bunk [Wed, 9 Nov 2005 05:39:48 +0000 (21:39 -0800)]
[PATCH] fs/hugetlbfs/inode.c: make a function static

This patch makes a needlessly global function static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: William Irwin <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] drivers/message/fusion/mptbase.c: make code static
Adrian Bunk [Wed, 9 Nov 2005 05:39:48 +0000 (21:39 -0800)]
[PATCH] drivers/message/fusion/mptbase.c: make code static

This patch makes the following previously global and EXPORT_SYMBOL'ed
code static:
- struct mpt_proc_root_dir
- int mpt_stm_index

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] drivers/char/sysrq.c: make two functions static
Adrian Bunk [Wed, 9 Nov 2005 05:39:47 +0000 (21:39 -0800)]
[PATCH] drivers/char/sysrq.c: make two functions static

This patch makes two needlessly global functions static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fs/namei.c: make path_lookup_create() static
Adrian Bunk [Wed, 9 Nov 2005 05:39:46 +0000 (21:39 -0800)]
[PATCH] fs/namei.c: make path_lookup_create() static

This patch makes the needlessly global function path_lookup_create()
static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: document sysfs usage of md, and make a couple of small refinements
NeilBrown [Wed, 9 Nov 2005 05:39:45 +0000 (21:39 -0800)]
[PATCH] md: document sysfs usage of md, and make a couple of small refinements

Document in Documentation/md.txt the files that now appear in sysfs, and make
a couple of small refinements to exactly when 'level' and 'raid_disks' are
empty, to make it match the documentation.

Signed-off-by: Neil Brown <neilb@suse.de>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: improve 'scan_mode' and rename it to 'sync_action'
NeilBrown [Wed, 9 Nov 2005 05:39:44 +0000 (21:39 -0800)]
[PATCH] md: improve 'scan_mode' and rename it to 'sync_action'

The current sync_action for an array can be one of

   idle  - nothing happening
   resync - reduncancy being recalcualted
   recover - missing device being recoverred to spare
   check   - user initiated check of redundancy
   repair  - like resync but user-initiated and ignores
             bitmap optimisation.

Each of these strings can also be written to the 'sync_action' file to cause
that action to happen (if appropriate).

While 'sync' is not technically correct, as a recovery is *not* a 'sync', I
think it is the most servicable word here.  Also 'action' is a strong word
than 'mode'.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: complete conversion of md to use kthreads
NeilBrown [Wed, 9 Nov 2005 05:39:43 +0000 (21:39 -0800)]
[PATCH] md: complete conversion of md to use kthreads

There are a few loose ends following the conversion of md to use kthreads:

- Some fields in mdk_thread_t that aren't needed (kthreads does it's own
  completion and manages it's own name).

- thread->run is now never NULL, so no need to check

- Some tests for signal_pending that aren't needed (As we don't use signals
  to stop threads any more)

- Some flush_signals are not needed

- Some waits are interruptible and don't need to be.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: ignore auto-readonly flag for arrays where it isn't meaningful
NeilBrown [Wed, 9 Nov 2005 05:39:42 +0000 (21:39 -0800)]
[PATCH] md: ignore auto-readonly flag for arrays where it isn't meaningful

The 'auto-readonly' flag (which suppresses resync and superblock updates until
the first write) is not meaningful for personalities that don't support resync
or superblock writes (raid0, linear, etc).

So clear the setting early to avoid it confusing anything - e.g.  appearing in
/proc/mdstat

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: only try to print recovery/resync status for personalities that support...
NeilBrown [Wed, 9 Nov 2005 05:39:41 +0000 (21:39 -0800)]
[PATCH] md: only try to print recovery/resync status for personalities that support recovery

The introduction of 'resync=PENDING' (for read-only devices) caused that
message to appear for non-syncable arrays like raid0 and linear.  Simplest
thing is to not try to print any resync info unless the personality clearly
supports it.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: split off some md attributes in sysfs to a separate group
NeilBrown [Wed, 9 Nov 2005 05:39:40 +0000 (21:39 -0800)]
[PATCH] md: split off some md attributes in sysfs to a separate group

Some, but not all, md array support data redundancy and hence support checking
and restoring that redundancy (resync, rebuild).

Some attributes apply specifically to functions involving this redundancy, and
so should only appear for md arrays for which they are meaningful.  i.e.  they
should not appear for raid0, linear, multpath, faulty.

This patch separates these into a distinct group and creates the group only if
the personality supports sync_request.

Signed-off-by: Neil Brown <neilb@suse.de>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: fix some locking and module refcounting issues with md's use of sysfs
NeilBrown [Wed, 9 Nov 2005 05:39:39 +0000 (21:39 -0800)]
[PATCH] md: fix some locking and module refcounting issues with md's use of sysfs

1/ I really should be using the __ATTR macros for defining attributes, so
   that the .owner field get set properly, otherwise modules can be removed
   while sysfs files are open.  This also involves some name changes of _show
   routines.

2/ Always lock the mddev (against reconfiguration) for all sysfs attribute
   access.  This easily avoid certain races and is completely consistant with
   other interfaces (ioctl and /proc/mdstat both always lock against
   reconfiguration).

3/ raid5 attributes must check that the 'conf' structure actually exists
   (the array could have been stopped while an attribute file was open).

4/ A missing 'kfree' from when the raid5_conf_t was converted to have a
   kobject embedded, and then converted back again.

Signed-off-by: Neil Brown <neilb@suse.de>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: make sure a user-request sync of raid5 ignores intent bitmap
NeilBrown [Wed, 9 Nov 2005 05:39:38 +0000 (21:39 -0800)]
[PATCH] md: make sure a user-request sync of raid5 ignores intent bitmap

A sync of raid5 usually ignore blocks which the bitmap says are in-sync.  But
a user-request check or repair should not ignore these.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: make manual repair work for raid1
NeilBrown [Wed, 9 Nov 2005 05:39:38 +0000 (21:39 -0800)]
[PATCH] md: make manual repair work for raid1

Raid1 currently optimises resync using the intent bitmap etc.  This
optimisation is not wanted when we explicitly request a repair through sysfs,
so add appropriate checks.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: make sure /block link in /sys/.../md/ goes to correct devices
NeilBrown [Wed, 9 Nov 2005 05:39:37 +0000 (21:39 -0800)]
[PATCH] md: make sure /block link in /sys/.../md/ goes to correct devices

If a block_device is a partition, then it's kobject is
  bdev->bd_part->kobj
otherwise (if it is a full device), the kobject is
  bdev->bd_disk->kobj

As md wants back-links to the correct object (whether partition or not), we
need to respect this difference...  (Thus current code shows a link to the
whole device, whether we are using a partition or not, which is wrong).

Signed-off-by: Neil Brown <neilb@suse.de>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: allow md arrays to be started read-only (module parameter).
NeilBrown [Wed, 9 Nov 2005 05:39:36 +0000 (21:39 -0800)]
[PATCH] md: allow md arrays to be started read-only (module parameter).

When an md array is started, the superblock will be written, and resync may
commense.  This is not good if you want to be completely read-only as, for
example, when preparing to resume from a suspend-to-disk image.

So introduce a module parameter "start_ro" which can be set
to '1' at boot, at module load, or via
  /sys/module/md_mod/parameters/start_ro

When this is set, new arrays get an 'auto-ro' mode, which disables all
internal io (superblock updates, resync, recovery) and is automatically
switched to 'rw' when the first write request arrives.

The array can be set to true 'ro' mode using 'mdadm -r' before the first
write request, or resync can be started without a write using 'mdadm -w'.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: Remove attempt to use dynamic names in sysfs for component devices on...
NeilBrown [Wed, 9 Nov 2005 05:39:35 +0000 (21:39 -0800)]
[PATCH] md: Remove attempt to use dynamic names in sysfs for component devices on an MD array.

With version-0.90 superblock, component devices on an md device to not have
any stable name related to the array -(version-1 assigns a fixed index when
a device is added to an array, and this remains despit any hot-swap).

The intial code for making these devices appear in sysfs used dynamic
names, which would change whenever a hot-spare was swapped for a failed or
missing device.  This turns out not to be practical in sysfs for a number
of reasons.

This patch changes then naming of component devices to be based on the
result of 'bdevname'.  This is stable and should be unique.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: support BIO_RW_BARRIER for md/raid1
NeilBrown [Wed, 9 Nov 2005 05:39:34 +0000 (21:39 -0800)]
[PATCH] md: support BIO_RW_BARRIER for md/raid1

We can only accept BARRIER requests if all slaves handle
barriers, and that can, of course, change with time....

So we keep track of whether the whole array seems safe for barriers,
and also whether each individual rdev handles barriers.

We initially assumes barriers are OK.

When writing the superblock we try a barrier, and if that fails, we flag
things for no-barriers.  This will usually clear the flags fairly quickly.

If writing the superblock finds that BIO_RW_BARRIER is -ENOTSUPP, we need to
resubmit, so introduce function "md_super_wait" which waits for requests to
finish, and retries ENOTSUPP requests without the barrier flag.

When writing the real raid1, write requests which were BIO_RW_BARRIER but
which aresn't supported need to be retried.  So raid1d is enhanced to do this,
and when any bio write completes (i.e.  no retry needed) we remove it from the
r1bio, so that devices needing retry are easy to find.

We should hardly ever get -ENOTSUPP errors when writing data to the raid.
It should only happen if:
  1/ the device used to support BARRIER, but now doesn't.  Few devices
     change like this, though raid1 can!
or
  2/ the array has no persistent superblock, so there was no opportunity to
     pre-test for barriers when writing the superblock.

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: make md on-disk bitmaps not host-endian
NeilBrown [Wed, 9 Nov 2005 05:39:32 +0000 (21:39 -0800)]
[PATCH] md: make md on-disk bitmaps not host-endian

Current bitmaps use set_bit et.al and so are host-endian, which means
not-portable.  Oops.

Define a new version number (4) for which bitmaps are little-endian.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: convert 'faulty' and 'in_sync' fields to bits in 'flags' field
NeilBrown [Wed, 9 Nov 2005 05:39:31 +0000 (21:39 -0800)]
[PATCH] md: convert 'faulty' and 'in_sync' fields to bits in 'flags' field

This has the advantage of removing the confusion caused by 'rdev_t' and
'mddev_t' both having 'in_sync' fields.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>