]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/log
mirror_ubuntu-eoan-kernel.git
17 years ago[Bluetooth] Advertise L2CAP features mask support
Marcel Holtmann [Sat, 20 Oct 2007 11:38:51 +0000 (13:38 +0200)]
[Bluetooth] Advertise L2CAP features mask support

Indicate the support for the L2CAP features mask value when the remote
entity tries to negotiate Bluetooth 1.2 specific features.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
17 years ago[Bluetooth] Retrieve L2CAP features mask on connection setup
Marcel Holtmann [Sat, 20 Oct 2007 11:37:56 +0000 (13:37 +0200)]
[Bluetooth] Retrieve L2CAP features mask on connection setup

The Bluetooth 1.2 specification introduced a specific features mask
value to interoperate with newer versions of the specification. So far
this piece of information was never needed, but future extensions will
rely on it. This patch adds a generic way to retrieve this information
only once per connection setup.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
17 years ago[Bluetooth] Remove global conf_mtu variable from L2CAP
Marcel Holtmann [Sat, 20 Oct 2007 11:37:06 +0000 (13:37 +0200)]
[Bluetooth] Remove global conf_mtu variable from L2CAP

After the change to the L2CAP configuration parameter handling the
global conf_mtu variable is no longer needed and so remove it.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
17 years ago[Bluetooth] Finish L2CAP configuration only with acceptable settings
Marcel Holtmann [Sat, 20 Oct 2007 11:35:42 +0000 (13:35 +0200)]
[Bluetooth] Finish L2CAP configuration only with acceptable settings

The parameters of the L2CAP output configuration might not be accepted
after the first configuration round. So only indicate a finished output
configuration when acceptable settings are provided.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
17 years ago[Bluetooth] Switch from OGF+OCF to using only opcodes
Marcel Holtmann [Sat, 20 Oct 2007 11:33:56 +0000 (13:33 +0200)]
[Bluetooth] Switch from OGF+OCF to using only opcodes

The Bluetooth HCI commands are divided into logical OGF groups for
easier identification of their purposes. While this still makes sense
for the written specification, its makes the code only more complex
and harder to read. So instead of using separate OGF and OCF values
to identify the commands, use a common 16-bit opcode that combines
both values. As a side effect this also reduces the complexity of
OGF and OCF calculations during command header parsing.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
17 years agoNFS: Fix a typo in nfs_call_unlink()
Trond Myklebust [Sun, 21 Oct 2007 16:02:22 +0000 (12:02 -0400)]
NFS: Fix a typo in nfs_call_unlink()

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFSv2: Ensure that the directory metadata gets revalidated on file create
Trond Myklebust [Sat, 20 Oct 2007 17:07:21 +0000 (13:07 -0400)]
NFSv2: Ensure that the directory metadata gets revalidated on file create

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoMerge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney...
Linus Torvalds [Sun, 21 Oct 2007 16:57:55 +0000 (09:57 -0700)]
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
  Blackfin arch: update boards files
  Blackfin arch: dma add some API and cleanup bf54x DMA definition
  Blackfin arch: cleanup and promote the general purpose timers api to a core blackfin component
  Blackfin arch: add a cheesy install target
  Blackfin arch: add functions for converting between sclks and usecs
  Blackfin arch: add assembly function for doing 64bit unsigned division
  Blackfin arch: -mno-fdpic works
  Blackfin arch: use "char bfin_board_name[]" rather than "char *bfin_board_name" per discussion on lkml as the former uses less storage
  Blackfin arch: Fixing Bug: balance calls to get_task_mm with corresponding mmput calls
  Blackfin serial driver Kconfig: depend on DMA not being enabled rather than a specific DMA size
  Blackfin arch: Fix bug: missing CHIPID register field definition of BF54x
  Blackfin arch: Fix up /proc/cpuinfo so it is like everyone else
  Blackfin arch: Optimization - no need to make additional math here
  Blackfin arch: force irq_flags into the .data section
  Blackfin arch BF548 defconfig: enable watchdog by default
  Blackfin arch: add new processor ADSP-BF52x arch/mach support

17 years agoMerge branch 'audit.b43' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit...
Linus Torvalds [Sun, 21 Oct 2007 15:54:32 +0000 (08:54 -0700)]
Merge branch 'audit.b43' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current

* 'audit.b43' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
  [PATCH] audit: watching subtrees
  [PATCH] new helper - inotify_evict_watch()
  [PATCH] new helper - inotify_clone_watch()
  [PATCH] new helpers - collect_mounts() and release_collected_mounts()
  [PATCH] pass dentry to audit_inode()/audit_inode_child()

17 years agonobh: nobh_write_end fix
Nick Piggin [Sun, 21 Oct 2007 04:57:41 +0000 (06:57 +0200)]
nobh: nobh_write_end fix

This path mustn't have been tested :( I did attempt to exercise it
by injecting failures here, but I suspect PageMappedToDisk may have
been getting in the way. Will need more of a look, although I think
nobh mode is OK for an -rc1 (it shouldn't eat anyone's data).

Commit 03158cd7eb3374843de68421142ca5900df845d9 ("fs: restore nobh")
introcduced a NULL deref.  Spotted by the Coverity checker.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoBlackfin arch: update boards files
Bryan Wu [Sun, 21 Oct 2007 09:03:55 +0000 (17:03 +0800)]
Blackfin arch: update boards files

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
17 years agoBlackfin arch: dma add some API and cleanup bf54x DMA definition
Bryan Wu [Sun, 21 Oct 2007 16:02:14 +0000 (00:02 +0800)]
Blackfin arch: dma add some API and cleanup bf54x DMA definition

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
17 years agoBlackfin arch: cleanup and promote the general purpose timers api to a core blackfin...
Mike Frysinger [Sun, 21 Oct 2007 15:37:54 +0000 (23:37 +0800)]
Blackfin arch: cleanup and promote the general purpose timers api to a core blackfin component

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
17 years agoBlackfin arch: add a cheesy install target
Mike Frysinger [Sun, 21 Oct 2007 16:45:55 +0000 (00:45 +0800)]
Blackfin arch: add a cheesy install target

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
17 years agoBlackfin arch: add functions for converting between sclks and usecs
Mike Frysinger [Sun, 21 Oct 2007 14:59:49 +0000 (22:59 +0800)]
Blackfin arch: add functions for converting between sclks and usecs

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
17 years agoBlackfin arch: add assembly function for doing 64bit unsigned division
Mike Frysinger [Sun, 21 Oct 2007 14:57:36 +0000 (22:57 +0800)]
Blackfin arch: add assembly function for doing 64bit unsigned division

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
17 years agoBlackfin arch: -mno-fdpic works
Mike Frysinger [Sun, 21 Oct 2007 14:55:18 +0000 (22:55 +0800)]
Blackfin arch: -mno-fdpic works

now that -mno-fdpic works, force it on so that
we can use any blackfin toolchain to build up the
kernel and kernel modules

wrap -mno-fdpic in $(call cc-option,-mno-fdpic) so that older
toolchains will still work

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
17 years agoBlackfin arch: use "char bfin_board_name[]" rather than "char *bfin_board_name" per...
Mike Frysinger [Sun, 21 Oct 2007 14:36:06 +0000 (22:36 +0800)]
Blackfin arch: use "char bfin_board_name[]" rather than "char *bfin_board_name" per discussion on lkml as the former uses less storage

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
17 years agoBlackfin arch: Fixing Bug: balance calls to get_task_mm with corresponding mmput...
Bernd Schmidt [Sun, 21 Oct 2007 14:32:27 +0000 (22:32 +0800)]
Blackfin arch: Fixing Bug: balance calls to get_task_mm with corresponding mmput calls

We must balance calls to get_task_mm with corresponding mmput calls, otherwise
refcounting is screwed up and mms don't get freed when their task exits.

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
17 years agoBlackfin serial driver Kconfig: depend on DMA not being enabled rather than a specifi...
Mike Frysinger [Sun, 21 Oct 2007 14:30:01 +0000 (22:30 +0800)]
Blackfin serial driver Kconfig: depend on DMA not being enabled rather than a specific DMA size

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
17 years agoBlackfin arch: Fix bug: missing CHIPID register field definition of BF54x
Bryan Wu [Sun, 21 Oct 2007 08:58:49 +0000 (16:58 +0800)]
Blackfin arch: Fix bug: missing CHIPID register field definition of BF54x

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
17 years agoBlackfin arch: Fix up /proc/cpuinfo so it is like everyone else
Robin Getz [Sun, 21 Oct 2007 09:03:31 +0000 (17:03 +0800)]
Blackfin arch: Fix up /proc/cpuinfo so it is like everyone else

Fix up /proc/cpuinfo so it is like everyone else, and gets
parsed by various applications properly. Still needs some tweaking on
parts without full L1 sram, like 532, 531, so it doesn't print out L1
bank info that doesn't exist.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
17 years agoBlackfin arch: Optimization - no need to make additional math here
Michael Hennerich [Sun, 21 Oct 2007 08:53:53 +0000 (16:53 +0800)]
Blackfin arch: Optimization - no need to make additional math here

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
17 years agoBlackfin arch: force irq_flags into the .data section
Mike Frysinger [Sun, 21 Oct 2007 16:19:31 +0000 (00:19 +0800)]
Blackfin arch: force irq_flags into the .data section

force irq_flags into the .data section by initializing it to
the hardware masks that cannot be disabled.  this way if we
use irq enable/disable functions before the .bss has been
zeroed out (as does our l1 relocate/dma functions), we dont
hit a problem where bss contains bogus crap.

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
17 years agoBlackfin arch BF548 defconfig: enable watchdog by default
Mike Frysinger [Sun, 21 Oct 2007 16:19:08 +0000 (00:19 +0800)]
Blackfin arch BF548 defconfig: enable watchdog by default

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
17 years agoBlackfin arch: add new processor ADSP-BF52x arch/mach support
Michael Hennerich [Sun, 21 Oct 2007 08:54:27 +0000 (16:54 +0800)]
Blackfin arch: add new processor ADSP-BF52x arch/mach support

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
17 years ago[PATCH] audit: watching subtrees
Al Viro [Sun, 22 Jul 2007 12:04:18 +0000 (08:04 -0400)]
[PATCH] audit: watching subtrees

New kind of audit rule predicates: "object is visible in given subtree".
The part that can be sanely implemented, that is.  Limitations:
* if you have hardlink from outside of tree, you'd better watch
it too (or just watch the object itself, obviously)
* if you mount something under a watched tree, tell audit
that new chunk should be added to watched subtrees
* if you umount something in a watched tree and it's still mounted
elsewhere, you will get matches on events happening there.  New command
tells audit to recalculate the trees, trimming such sources of false
positives.

Note that it's _not_ about path - if something mounted in several places
(multiple mount, bindings, different namespaces, etc.), the match does
_not_ depend on which one we are using for access.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] new helper - inotify_evict_watch()
Al Viro [Thu, 7 Jun 2007 16:22:59 +0000 (12:22 -0400)]
[PATCH] new helper - inotify_evict_watch()

Kicks the watch out without dropping it.  Called under ->inotify_mutex

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] new helper - inotify_clone_watch()
Al Viro [Thu, 7 Jun 2007 16:21:44 +0000 (12:21 -0400)]
[PATCH] new helper - inotify_clone_watch()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] new helpers - collect_mounts() and release_collected_mounts()
Al Viro [Thu, 7 Jun 2007 16:20:32 +0000 (12:20 -0400)]
[PATCH] new helpers - collect_mounts() and release_collected_mounts()

Get a snapshot of a subtree, creating private clones of vfsmounts
for all its components and release such snapshot resp.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] pass dentry to audit_inode()/audit_inode_child()
Al Viro [Thu, 7 Jun 2007 16:19:32 +0000 (12:19 -0400)]
[PATCH] pass dentry to audit_inode()/audit_inode_child()

makes caller simpler *and* allows to scan ancestors

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agoMerge branch 'master' of hera.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
Linus Torvalds [Sun, 21 Oct 2007 03:19:15 +0000 (20:19 -0700)]
Merge branch 'master' of hera.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6

* 'master' of hera.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (29 commits)
  [PARISC] fix uninitialized variable warning in asm/rtc.h
  [PARISC] Port checkstack.pl to parisc
  [PARISC] Make palo target work when $obj != $src
  [PARISC] Zap unused variable warnings in pci.c
  [PARISC] Fix tests in palo target
  [PARISC] Fix palo target
  [PARISC] Restore palo target
  [PARISC] Attempt to clean up parisc/Makefile
  [PARISC] Fix infinite loop in /proc/iomem
  [PARISC] Quiet sysfs_create_link __must_check warnings in pdc_stable
  [PARISC] Squelch pci_enable_device __must_check warning in superio
  [PARISC] Kill off broken irqstack code
  [PARISC] Remove hardcoded uses of PAGE_SIZE
  [PARISC] Clean up pointless ASM_PAGE_SIZE_DIV use
  [PARISC] Kill off the last vestiges of ASM_PAGE_SIZE
  [PARISC] Kill off ASM_PAGE_SIZE use
  [PARISC] Beautify parisc vmlinux.lds.S
  [PARISC] Clean up a resource_size_t warning in sba_iommu
  [PARISC] Kill incorrect cast warning in unwinder
  [PARISC] Kill zone_to_nid printk warning
  ...

Fixed trivial conflict in include/asm-parisc/tlbflush.h manually

17 years agoMerge ssh://master.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
Linus Torvalds [Sun, 21 Oct 2007 03:17:52 +0000 (20:17 -0700)]
Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/sam/kbuild

* ssh://master.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
  kbuild: restore arch/{ppc/xtensa}/boot cflags
  kconfig: set title bar in xconfig
  kbuild: fix toplevel Makefile/depmod

17 years agoNew maintainers for the x86 (32-bit and 64-bit) architecture
Ingo Molnar [Sat, 20 Oct 2007 00:36:26 +0000 (02:36 +0200)]
New maintainers for the x86 (32-bit and 64-bit) architecture

Add new maintainers for the x86 (32-bit and 64-bit) architecture.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agovfc_dev conversion to mutex: fallout
Al Viro [Sat, 20 Oct 2007 20:47:53 +0000 (21:47 +0100)]
vfc_dev conversion to mutex: fallout

Commit 7b96dc023a1b487bce59256fde14b8bb28b45aea ("[SPARC] Videopix Frame
Grabber: Convert device_lock_sem to mutex") missed one place.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agooom_kill bug
Al Viro [Sat, 20 Oct 2007 20:45:33 +0000 (21:45 +0100)]
oom_kill bug

Wrong order of arguments

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PARISC] fix uninitialized variable warning in asm/rtc.h
Kyle McMartin [Sat, 20 Oct 2007 20:23:00 +0000 (13:23 -0700)]
[PARISC] fix uninitialized variable warning in asm/rtc.h

get_rtc_time, in the case that PDC returns that the battery is bad, returns
an unmodified rtc_time arg to the caller, which then uses uninitialized
values. Fix this by memset-ing the arg with zeroes, so it will at least be
cleared if we return failure.

Spotted by John David Anglin.

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
17 years ago[PARISC] Port checkstack.pl to parisc
Kyle McMartin [Sat, 20 Oct 2007 20:18:56 +0000 (13:18 -0700)]
[PARISC] Port checkstack.pl to parisc

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
17 years agokbuild: restore arch/{ppc/xtensa}/boot cflags
Milton Miller [Sat, 20 Oct 2007 08:58:03 +0000 (03:58 -0500)]
kbuild: restore arch/{ppc/xtensa}/boot cflags

Commit 9a39e273d4df0560c724c5fe71f6314a0583ca2b removed the boot directory
addition to CFLAGS that was being used by the subdirectory builds.  For the
other files, that patch set EXTRA_CFLAGS, but Makefile.build explicitly
sets that to empty as it is explicitly for a single directory only.
Append to KBUILD_CFLAGS instead.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
17 years agokconfig: set title bar in xconfig
Randy Dunlap [Sat, 20 Oct 2007 18:18:47 +0000 (11:18 -0700)]
kconfig: set title bar in xconfig

Put kernel version info on title bar in xconfig (qconf) instead of
defaulting to "qconf".

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
17 years agokbuild: fix toplevel Makefile/depmod
David Brownell [Sat, 20 Oct 2007 04:42:24 +0000 (21:42 -0700)]
kbuild: fix toplevel Makefile/depmod

This removes a syntax error (seen building on Ubuntu Feisty).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
17 years ago[PARISC] Make palo target work when $obj != $src
Kyle McMartin [Sat, 20 Oct 2007 16:31:33 +0000 (09:31 -0700)]
[PARISC] Make palo target work when $obj != $src

Stumbled upon when I was testing it out and using
make O=... to build.

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
17 years ago[PARISC] Zap unused variable warnings in pci.c
Kyle McMartin [Sat, 20 Oct 2007 04:41:33 +0000 (21:41 -0700)]
[PARISC] Zap unused variable warnings in pci.c

'bus' was basically useless and 'hba' is only applicable on
64bit. Sigh, there's got to be a cleaner way to do this...

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
17 years agoRevert "kconfig: tristate choices with mixed tristate and boolean values"
Linus Torvalds [Sat, 20 Oct 2007 04:25:45 +0000 (21:25 -0700)]
Revert "kconfig: tristate choices with mixed tristate and boolean values"

This reverts commit a5bf3d891a6a0fb5aa122792d965e3774108b923.

David Brownell notes that this causes a regression visible in the
drivers/usb/gadget Kconfig file:

  "That Kconfig hasn't changed (other than adding new drivers), and it's
   worked that way for several years now ...  so the issue seems to be
   changes in menuconfig/kconfig/etc semantics.

   The issue is that when USB_GADGET=m, it's no longer possible to
   configure peripheral controller drivers as modules ...  the
   controller drivers can now only be configured for static linkage.

   It should be making a choice of one of the controller drivers which
   could work on the target system, and allow that driver to be linked
   either as a module (ok iff USB_GADGET=m) or statically."

Reverting this commit resolves the problem, and also fixes a second
problem that David noticed: various dependent options couldn't be enabled.

Tested-and-reported-by: David Brownell <david-b@pacbell.net>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Jan Beulich <jbeulich@novell.com>,
Cc: Andrew Morton <akpm@linux-foundation.org>,
Cc: Sam Ravnborg <sam@ravnborg.org>,
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PARISC] Fix tests in palo target
Kyle McMartin [Sat, 20 Oct 2007 04:08:20 +0000 (21:08 -0700)]
[PARISC] Fix tests in palo target

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
Linus Torvalds [Sat, 20 Oct 2007 03:36:17 +0000 (20:36 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial

* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (74 commits)
  fix do_sys_open() prototype
  sysfs: trivial: fix sysfs_create_file kerneldoc spelling mistake
  Documentation: Fix typo in SubmitChecklist.
  Typo: depricated -> deprecated
  Add missing profile=kvm option to Documentation/kernel-parameters.txt
  fix typo about TBI in e1000 comment
  proc.txt: Add /proc/stat field
  small documentation fixes
  Fix compiler warning in smount example program from sharedsubtree.txt
  docs/sysfs: add missing word to sysfs attribute explanation
  documentation/ext3: grammar fixes
  Documentation/java.txt: typo and grammar fixes
  Documentation/filesystems/vfs.txt: typo fix
  include/asm-*/system.h: remove unused set_rmb(), set_wmb() macros
  trivial copy_data_pages() tidy up
  Fix typo in arch/x86/kernel/tsc_32.c
  file link fix for Pegasus USB net driver help
  remove unused return within void return function
  Typo fixes retrun -> return
  x86 hpet.h: remove broken links
  ...

17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Sat, 20 Oct 2007 03:35:20 +0000 (20:35 -0700)]
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (21 commits)
  Fix build break in tsi108.c
  qeth: remove header_ops bug
  ir-functions.c:(.text+0xbce18): undefined reference to `input_event'
  NAPI: kconfig prompt and deleted doc file
  phy/bitbang: missing MODULE_LICENSE
  DM9000 initialization fix
  [PATCH] rt2x00: Add new rt73usb USB ID
  [PATCH] rt2x00: Fix residual check in PLCP calculations.
  [PATCH] iwlwifi: Fix rate setting in probe request for HW sacn
  [PATCH] b43: Make b43_stop() static
  [PATCH] drivers/net/wireless/b43/main.c: fix an uninitialized variable
  [PATCH] iwlwifi: set correct base rate for A band in rs_dbgfs_set_mcs
  [PATCH] zd1211rw, fix oops when ejecting install media
  [PATCH] b43legacy: Fix potential return of uninitialized variable
  [PATCH] iwl4965-base.c: fix off-by-one errors
  [PATCH] p54: Make filter configuration atomic
  [PATCH] rtl8187: remove NICMAC setting in configure_filters callback
  [PATCH] janitorial: fix all double includes in drivers/net/wireless
  [PATCH] rtl8187: Fix more frag bit checking, rts duration calc
  [PATCH] ipw2100: send WEXT scan events
  ...

17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Sat, 20 Oct 2007 03:34:29 +0000 (20:34 -0700)]
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] sata_sis: use correct S/G table size
  pata_cs5536: MWDMA fix
  sata_sis: fix SCR read breakage
  libata: fix kernel-doc param name

17 years agoMerge branch 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linvill...
Jeff Garzik [Sat, 20 Oct 2007 03:04:50 +0000 (23:04 -0400)]
Merge branch 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream

17 years agoFix build break in tsi108.c
Olof Johansson [Sat, 20 Oct 2007 02:04:20 +0000 (21:04 -0500)]
Fix build break in tsi108.c

Fix build break:

drivers/net/tsi108_eth.c: In function 'tsi108_init_one':
drivers/net/tsi108_eth.c:1633: error: expected ')' before 'dev'
drivers/net/tsi108_eth.c:1633: warning: too few arguments for format
make[2]: *** [drivers/net/tsi108_eth.o] Error 1

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoqeth: remove header_ops bug
Ursula Braun [Thu, 1 Jan 1970 00:00:01 +0000 (01:00 +0100)]
qeth: remove header_ops bug

Remove qeth bug caused by commit:
[NET]: Move hardware header operations out of netdevice.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoir-functions.c:(.text+0xbce18): undefined reference to `input_event'
Randy Dunlap [Fri, 19 Oct 2007 04:53:50 +0000 (21:53 -0700)]
ir-functions.c:(.text+0xbce18): undefined reference to `input_event'

[bugme-daemon@bugzilla.kernel.org wrote:]

From: Randy Dunlap <randy.dunlap@oracle.com>

Drivers that use lro functions should depend on INET, otherwise they
may not link correctly.  Let's not select INET.  Select should be used
only for library-like code, not to enable subsystems.

ERROR: "lro_flush_all" [drivers/net/myri10ge/myri10ge.ko] undefined!
ERROR: "lro_receive_frags" [drivers/net/myri10ge/myri10ge.ko] undefined!

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoNAPI: kconfig prompt and deleted doc file
Randy Dunlap [Fri, 19 Oct 2007 00:16:20 +0000 (17:16 -0700)]
NAPI: kconfig prompt and deleted doc file

- make the kconfig NAPI option prompt consistent across all net drivers
  (other than EXPERIMENTAL; can it now be removed also, or is the new
  napi_struct implementation now EXPERIMENTAL ?)
- remove comment about the now-deleted NAPI_HOWTO.txt file
- clean up typos in Tulip NAPI & Interrupt Mitigation

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agophy/bitbang: missing MODULE_LICENSE
Randy Dunlap [Thu, 18 Oct 2007 19:20:21 +0000 (12:20 -0700)]
phy/bitbang: missing MODULE_LICENSE

Missing MODULE_LICENSE(), loading this module taints the kernel.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoDM9000 initialization fix
Mike Rapoport [Thu, 18 Oct 2007 07:23:11 +0000 (09:23 +0200)]
DM9000 initialization fix

DM9000 driver returns success even if it is failed to detect the chip.
Below patch fixes it.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
 drivers/net/dm9000.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoAvoid compile error in fs/nfs/unlink.c
Linus Torvalds [Sat, 20 Oct 2007 02:59:18 +0000 (19:59 -0700)]
Avoid compile error in fs/nfs/unlink.c

Erez Zadok reports that certain configurations fail to build due to
schedule() TASK_[UN]INTERRUPTIBLE not being declared.  Add proper
include files to fix.

Cc: Erez Zadok <ezk@cs.sunysb.edu>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[libata] sata_sis: use correct S/G table size
Jeff Garzik [Sat, 20 Oct 2007 02:56:44 +0000 (22:56 -0400)]
[libata] sata_sis: use correct S/G table size

sata_sis has the same restrictions as other SFF controllers, and so must
use LIBATA_MAX_PRD to denote that SCSI may only fill ATA_MAX_PRD/2
entries, due to our need to handle IOMMU merging.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agopata_cs5536: MWDMA fix
Bartlomiej Zolnierkiewicz [Tue, 16 Oct 2007 23:23:43 +0000 (01:23 +0200)]
pata_cs5536: MWDMA fix

* Fix out-of-bound array access for MWDMA modes.

* Bump driver version.

Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosata_sis: fix SCR read breakage
Tejun Heo [Thu, 18 Oct 2007 02:53:39 +0000 (11:53 +0900)]
sata_sis: fix SCR read breakage

SCR read for controllers which uses PCI configuration space for SCR
access got broken while adding @val argument to SCR accessors.  Fix
it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: fix kernel-doc param name
Randy Dunlap [Thu, 18 Oct 2007 21:12:26 +0000 (14:12 -0700)]
libata: fix kernel-doc param name

Fix libata kernel-doc parameter name.

Warning(linux-2.6.23-git13//drivers/ata/libata-core.c:1415): No description found for parameter 'sgl'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Sat, 20 Oct 2007 02:36:05 +0000 (19:36 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6: (50 commits)
  ide: remove inclusion of non-existent io_trace.h
  ide-disk: add get_smart_data() helper
  ide: fix ->data_phase in taskfile_load_raw()
  ide: check drive->using_dma in flagged_taskfile()
  ide: check ->dma_setup() return value in flagged_taskfile()
  dtc2278: note on docs
  qd65xx: remove pointless qd_{read,write}_reg() (take 2)
  ide: PCI BMDMA initialization fixes (take 2)
  ide: remove stale comments from ide-taskfile.c
  ide: remove dead code from ide_driveid_update()
  ide: use __ide_end_request() in ide_end_dequeued_request()
  ide: enhance ide_setup_pci_noise()
  cs5530: remove needless ide_lock taking
  ide: take ide_lock for prefetch disable/enable in do_special()
  ht6560b: fix deadlock on error handling
  cmd640: fix deadlock on error handling
  slc90e66: fix deadlock on error handling
  opti621: fix deadlock on error handling
  qd65xx: fix deadlock on error handling
  dtc2278: fix deadlock on error handling
  ...

17 years agonfs: Fix build break with CONFIG_NFS_V4=n
Olof Johansson [Sat, 20 Oct 2007 01:41:49 +0000 (20:41 -0500)]
nfs: Fix build break with CONFIG_NFS_V4=n

Signed-off-by: Olof Johansson <olof@lixom.net>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/agk/linux-2.6-dm
Linus Torvalds [Sat, 20 Oct 2007 02:17:56 +0000 (19:17 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/agk/linux-2.6-dm

* master.kernel.org:/pub/scm/linux/kernel/git/agk/linux-2.6-dm: (29 commits)
  dm crypt: tidy pending
  dm mpath: send uevents
  dm: uevent generate events
  dm: add uevent to core
  dm: export name and uuid
  dm raid1: add mirror_set to struct mirror
  dm log: split suspend
  dm mpath: hp retry if not ready
  dm mpath: add hp handler
  dm mpath: add retry pg init
  dm crypt: tidy labels
  dm crypt: tidy whitespace
  dm crypt: add post processing queue
  dm crypt: use per device singlethread workqueues
  dm mpath: emc fix an error message
  dm: bio_list macro renaming
  dm io:ctl remove vmalloc void cast
  dm: tidy bio_io_error usage
  kcopyd use mutex instead of semaphore
  dm: use kzalloc
  ...

17 years agofix do_sys_open() prototype
Jason Uhlenkott [Sat, 20 Oct 2007 01:16:18 +0000 (03:16 +0200)]
fix do_sys_open() prototype

Fix an argument name in do_sys_open()'s prototype.

Signed-off-by: Jason Uhlenkott <juhlenko@akamai.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
17 years agosysfs: trivial: fix sysfs_create_file kerneldoc spelling mistake
Chris Malley [Sat, 20 Oct 2007 01:14:32 +0000 (03:14 +0200)]
sysfs: trivial: fix sysfs_create_file kerneldoc spelling mistake

Spelling error in sysfs_create_file kerneldoc.

Signed-off-by: Chris Malley <mail@chrismalley.co.uk>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
17 years agoDocumentation: Fix typo in SubmitChecklist.
James Bowes [Sat, 20 Oct 2007 01:13:09 +0000 (03:13 +0200)]
Documentation: Fix typo in SubmitChecklist.

Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
17 years agoTypo: depricated -> deprecated
Rolf Eike Beer [Sat, 20 Oct 2007 01:10:57 +0000 (03:10 +0200)]
Typo: depricated -> deprecated

Typo: depricated -> deprecated

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
17 years agoAdd missing profile=kvm option to Documentation/kernel-parameters.txt
Dave Jones [Sat, 20 Oct 2007 01:08:22 +0000 (03:08 +0200)]
Add missing profile=kvm option to Documentation/kernel-parameters.txt

Whilst looking up what profile=sleep did, I noticed that we missed
adding docs for the most recent addition to the profiler.

Signed-off-by: Dave Jones <davej@redhat.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
17 years agofix typo about TBI in e1000 comment
Masatake YAMATO [Sat, 20 Oct 2007 01:06:37 +0000 (03:06 +0200)]
fix typo about TBI in e1000 comment

Signed-off-by: Masatake YAMATO <jet@gyve.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
17 years agosysctl: Don't compile sysctl_check when !CONFIG_SYSCTL
Eric W. Biederman [Sat, 20 Oct 2007 00:23:25 +0000 (18:23 -0600)]
sysctl: Don't compile sysctl_check when !CONFIG_SYSCTL

Weird I thought I had written the makefile so this would be handled.  Oh
well this should fix it.

Sorry about that.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-and-tested-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoproc.txt: Add /proc/stat field
Leonardo Chiquitto [Sat, 20 Oct 2007 01:03:38 +0000 (03:03 +0200)]
proc.txt: Add /proc/stat field

This patch updates the "cat /proc/stat" output found
in Documentation/filesystems/proc.txt.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
17 years agodm crypt: tidy pending
Milan Broz [Sat, 20 Oct 2007 00:14:21 +0000 (01:14 +0100)]
dm crypt: tidy pending

Add crypt prefix to dec_pending to avoid confusing it in backtraces with
the dm core function of the same name.

No functional change here.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm mpath: send uevents
Mike Anderson [Fri, 19 Oct 2007 21:48:02 +0000 (22:48 +0100)]
dm mpath: send uevents

This patch adds calls to dm_path_event for a failed path and a reinstated
path.

Signed-off-by: Mike Anderson <andmike@linux.vnet.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm: uevent generate events
Mike Anderson [Fri, 19 Oct 2007 21:48:01 +0000 (22:48 +0100)]
dm: uevent generate events

This patch adds support for the dm_path_event dm_send_event functions which
create and send udev events.

Signed-off-by: Mike Anderson <andmike@linux.vnet.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm: add uevent to core
Mike Anderson [Fri, 19 Oct 2007 21:48:00 +0000 (22:48 +0100)]
dm: add uevent to core

This patch adds a uevent skeleton to device-mapper.

Signed-off-by: Mike Anderson <andmike@linux.vnet.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm: export name and uuid
Mike Anderson [Fri, 19 Oct 2007 21:47:59 +0000 (22:47 +0100)]
dm: export name and uuid

This patch adds a function to obtain a copy of a mapped device's name and uuid.

Signed-off-by: Mike Anderson <andmike@linux.vnet.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm raid1: add mirror_set to struct mirror
Jonathan Brassow [Fri, 19 Oct 2007 21:47:58 +0000 (22:47 +0100)]
dm raid1: add mirror_set to struct mirror

Store a pointer to the owning mirror_set structure within each mirror
structure for a subsequent patch to use.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm log: split suspend
Jonathan Brassow [Fri, 19 Oct 2007 21:47:57 +0000 (22:47 +0100)]
dm log: split suspend

There are now two phases to a suspend in device-mapper -
presuspend and postsuspend.  This patch removes the
single 'suspend' in the logging API and replaces it with
'presuspend' and 'postsuspend' functions to align it
better with core device-mapper.

A subsequent patch will make use of 'presuspend'.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm mpath: hp retry if not ready
Dave Wysochanski [Fri, 19 Oct 2007 21:47:55 +0000 (22:47 +0100)]
dm mpath: hp retry if not ready

This patch adds retries to the hp hardware handler, and utilizes the
MP_RETRY flag of dm-multipath.  For now in the hp handler, if we get a
pg_init completed with a check condition we just assume we can retry the
pg_init command.  We make this assumption because of incomplete data on
specific check condition code of the HP hardware, and because testing
has shown the HP path initialization command to be idempotent.
The number of times we retry is settable via the "pg_init_retries"
multipath map feature.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Acked-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm mpath: add hp handler
Dave Wysochanski [Fri, 19 Oct 2007 21:47:54 +0000 (22:47 +0100)]
dm mpath: add hp handler

This patch adds the most basic dm-multipath hardware support for the
HP active/passive arrays.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm mpath: add retry pg init
Dave Wysochanski [Fri, 19 Oct 2007 21:47:53 +0000 (22:47 +0100)]
dm mpath: add retry pg init

This patch allows a failed path group initialisation command to be retried.

It adds a generic MP_RETRY flag and a "pg_init_retries" feature to
device-mapper multipath which limits the number of retries.

1. A hw handler sends a path initialization command to the storage and
the command completes with an error code indicating the command
should be retried.

2. The hardware handler calls dm_pg_init_complete() with MP_RETRY
set in err_flags to ask the dm multipath core to retry.

3. If the retry limit has not been exceeded, pg_init() is retried.
Otherwise fail_path() is called.

If you are using the userspace multipath-tools or device-mapper-multipath
package, you can set pg_init_retries in the 'device' section of your
/etc/multipath.conf file. For example:

features                "2 pg_init_retries 7"

The number of PG retries attempted is reported in the 'dmsetup status' output.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Acked-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm crypt: tidy labels
Milan Broz [Fri, 19 Oct 2007 21:47:52 +0000 (22:47 +0100)]
dm crypt: tidy labels

Replace numbers with names in labels in error paths, to avoid confusion
when new one get added between existing ones.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm crypt: tidy whitespace
Milan Broz [Fri, 19 Oct 2007 21:42:37 +0000 (22:42 +0100)]
dm crypt: tidy whitespace

Clean up, convert some spaces to tabs.

No functional change here.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm crypt: add post processing queue
Milan Broz [Fri, 19 Oct 2007 21:38:58 +0000 (22:38 +0100)]
dm crypt: add post processing queue

Add post-processing queue (per crypt device) for read operations.

Current implementation uses only one queue for all operations
and this can lead to starvation caused by many requests waiting
for memory allocation. But the needed memory-releasing operation
is queued after these requests (in the same queue).

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm crypt: use per device singlethread workqueues
Milan Broz [Fri, 19 Oct 2007 21:38:57 +0000 (22:38 +0100)]
dm crypt: use per device singlethread workqueues

Use a separate single-threaded workqueue for each crypt device
instead of one global workqueue.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm mpath: emc fix an error message
Alasdair G Kergon [Fri, 19 Oct 2007 21:38:56 +0000 (22:38 +0100)]
dm mpath: emc fix an error message

Correct an error message, reported by Michael Wood <michael@frogfoot.com>.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm: bio_list macro renaming
Alasdair G Kergon [Fri, 19 Oct 2007 21:38:55 +0000 (22:38 +0100)]
dm: bio_list macro renaming

Remove BIO_LIST and DEFINE_BIO_LIST macros that gain us nothing
since contents are initialised to NULL.

Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm io:ctl remove vmalloc void cast
Jesper Juhl [Fri, 19 Oct 2007 21:38:54 +0000 (22:38 +0100)]
dm io:ctl remove vmalloc void cast

In drivers/md/dm-ioctl.c::copy_params() there's a call to vmalloc()
where we currently cast the return value, but that's pretty pointless
given that vmalloc() returns "void *".

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm: tidy bio_io_error usage
Milan Broz [Fri, 19 Oct 2007 21:38:53 +0000 (22:38 +0100)]
dm: tidy bio_io_error usage

Use bio_io_error() in only two places and tidy the code,
preparing for later patches.

There is no functional change in this patch.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agokcopyd use mutex instead of semaphore
Matthias Kaehlcke [Fri, 19 Oct 2007 21:38:52 +0000 (22:38 +0100)]
kcopyd use mutex instead of semaphore

Kcopyd uses a semaphore as mutex.  Use the mutex API instead of the (binary)
semaphore,

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
17 years agodm: use kzalloc
Dmitry Monakhov [Fri, 19 Oct 2007 21:38:51 +0000 (22:38 +0100)]
dm: use kzalloc

Convert kmalloc() + memset() to kzalloc().

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm: use is_power_of_2
vignesh babu [Fri, 19 Oct 2007 21:38:44 +0000 (22:38 +0100)]
dm: use is_power_of_2

Replacing n & (n - 1) for power of 2 check by is_power_of_2(n)

Signed-off-by: vignesh babu <vignesh.babu@wipro.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm: fix thaw_bdev
Jun'ichi Nomura [Fri, 19 Oct 2007 21:38:43 +0000 (22:38 +0100)]
dm: fix thaw_bdev

This patch fixes a bd_mount_sem counter corruption bug in device-mapper.

thaw_bdev() should be called only when freeze_bdev() was called for the
device.
Otherwise, thaw_bdev() will up bd_mount_sem and corrupt the semaphore counter.
struct block_device with the corrupted semaphore may remain in slab cache
and be reused later.

Attached patch will fix it by calling unlock_fs() instead.
unlock_fs() will determine whether it should call thaw_bdev()
by checking the device is frozen or not.

Easy reproducer is:
  #!/bin/sh
  while [ 1 ]; do
     dmsetup --notable create a
     dmsetup --nolockfs suspend a
     dmsetup remove a
  done

It's not easy to see the effect of corrupted semaphore.
So I have tested with putting printk below in bdev_alloc_inode():
        if (atomic_read(&ei->bdev.bd_mount_sem.count) != 1)
                printk(KERN_DEBUG "Incorrect semaphore count = %d (%p)\n",
                        atomic_read(&ei->bdev.bd_mount_sem.count),
                        &ei->bdev);

Without the patch, I saw something like:
 Incorrect semaphore count = 17 (f2ab91c0)

With the patch, the message didn't appear.

The bug was introduced in 2.6.16 with this bug fix:

commit d9dde59ba03095e526640988c0fedd75e93bc8b7
Date:   Fri Feb 24 13:04:24 2006 -0800

    [PATCH] dm: missing bdput/thaw_bdev at removal

    Need to unfreeze and release bdev otherwise the bdev inode with
    inconsistent state is reused later and cause problem.

and backported to 2.6.15.5.

It occurs only in free_dev(), which is called only when the dm device is
removed.  The buggy code is executed only if md->suspended_bdev is
non-NULL and that can happen only when the device was suspended without
noflush.

Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: stable@kernel.org
17 years agodm delay: fix status
Milan Broz [Fri, 19 Oct 2007 21:38:42 +0000 (22:38 +0100)]
dm delay: fix status

Fix missing space in dm-delay target status output
if separate read and write delay are configured.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm delay: fix ctr error paths
Dmitry Monakhov [Fri, 19 Oct 2007 21:38:41 +0000 (22:38 +0100)]
dm delay: fix ctr error paths

Add missing 'dm_put_device' to dm-delay target constructor.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm raid1: fix leakage
Dmitry Monakhov [Fri, 19 Oct 2007 21:38:39 +0000 (22:38 +0100)]
dm raid1: fix leakage

Add missing 'dm_io_client_destroy' to alloc_context error path.
Reorganize mirror constructor error path in order to prevent
workqueue leakage.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm crypt: missing kfree in ctr error path
Dmitry Monakhov [Fri, 19 Oct 2007 21:38:38 +0000 (22:38 +0100)]
dm crypt: missing kfree in ctr error path

Insert missing kfree() in crypt_iv_essiv_ctr() error path.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm crypt: drop device ref in ctr error path
Dmitry Monakhov [Fri, 19 Oct 2007 21:38:37 +0000 (22:38 +0100)]
dm crypt: drop device ref in ctr error path

Add a missing 'dm_put_device' in an error path in crypt target constructor.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm io:ctl use constant struct size
Milan Broz [Fri, 19 Oct 2007 21:38:36 +0000 (22:38 +0100)]
dm io:ctl use constant struct size

Make size of dm_ioctl struct always 312 bytes on all supported
architectures.

This change retains compatibility with already-compiled code because
it uses an embedded offset to locate the payload that follows the
structure.

On 64-bit architectures there is no change at all; on 32-bit
we are increasing the size of dm-ioctl from 308 to 312 bytes.

Currently with 32-bit userspace / 64-bit kernel on x86_64
some ioctls (including rename, message) are incorrectly rejected
by the comparison against 'param + 1'.  This breaks userspace
lvrename and multipath 'fail_if_no_path' changes, for example.

(BTW Device-mapper uses its own versioning and ignores the ioctl
size bits.  Only the generic ioctl compat code on mixed arches
checks them, and that will continue to accept both sizes for now,
but we intend to list 308 as deprecated and eventually remove it.)

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: Guido Guenther <agx@sigxcpu.org>
Cc: Kevin Corry <kevcorry@us.ibm.com>
Cc: stable@kernel.org
17 years agodm mpath: rdac fix init race
Bryn M. Reeves [Fri, 19 Oct 2007 21:29:32 +0000 (22:29 +0100)]
dm mpath: rdac fix init race

Re-order the initialisation of dm-rdac to avoid registering the hw
handler before the workqueue has been initialised. Closes a race
that would potentially give an oops.

Signed-off-by: Bryn M. Reeves <breeves@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>