]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
13 years agoMerge branch 'quilt/i2c'
Stephen Rothwell [Fri, 23 Sep 2011 01:21:18 +0000 (11:21 +1000)]
Merge branch 'quilt/i2c'

13 years agoMerge remote-tracking branch 'hid/for-next'
Stephen Rothwell [Fri, 23 Sep 2011 01:19:58 +0000 (11:19 +1000)]
Merge remote-tracking branch 'hid/for-next'

13 years agoMerge remote-tracking branch 'xfs/master'
Stephen Rothwell [Fri, 23 Sep 2011 01:18:31 +0000 (11:18 +1000)]
Merge remote-tracking branch 'xfs/master'

Conflicts:
fs/xfs/xfs_aops.c
fs/xfs/xfs_super.c

13 years agoMerge remote-tracking branch 'v9fs/for-next'
Stephen Rothwell [Fri, 23 Sep 2011 01:17:19 +0000 (11:17 +1000)]
Merge remote-tracking branch 'v9fs/for-next'

13 years agoMerge remote-tracking branch 'ocfs2/linux-next'
Stephen Rothwell [Fri, 23 Sep 2011 01:15:52 +0000 (11:15 +1000)]
Merge remote-tracking branch 'ocfs2/linux-next'

13 years agoMerge remote-tracking branch 'nfsd/nfsd-next'
Stephen Rothwell [Fri, 23 Sep 2011 01:09:56 +0000 (11:09 +1000)]
Merge remote-tracking branch 'nfsd/nfsd-next'

13 years agoMerge remote-tracking branch 'logfs/master'
Stephen Rothwell [Fri, 23 Sep 2011 01:08:42 +0000 (11:08 +1000)]
Merge remote-tracking branch 'logfs/master'

13 years agoMerge remote-tracking branch 'gfs2/master'
Stephen Rothwell [Fri, 23 Sep 2011 01:07:27 +0000 (11:07 +1000)]
Merge remote-tracking branch 'gfs2/master'

13 years agoMerge remote-tracking branch 'ext4/dev'
Stephen Rothwell [Fri, 23 Sep 2011 01:06:08 +0000 (11:06 +1000)]
Merge remote-tracking branch 'ext4/dev'

13 years agoMerge remote-tracking branch 'ceph/for-next'
Stephen Rothwell [Fri, 23 Sep 2011 01:04:50 +0000 (11:04 +1000)]
Merge remote-tracking branch 'ceph/for-next'

13 years agoMerge remote-tracking branch 'xtensa/master'
Stephen Rothwell [Fri, 23 Sep 2011 01:03:39 +0000 (11:03 +1000)]
Merge remote-tracking branch 'xtensa/master'

13 years agoMerge remote-tracking branch 'unicore32/unicore32'
Stephen Rothwell [Fri, 23 Sep 2011 01:02:28 +0000 (11:02 +1000)]
Merge remote-tracking branch 'unicore32/unicore32'

13 years agoMerge remote-tracking branch 'tile/master'
Stephen Rothwell [Fri, 23 Sep 2011 01:01:16 +0000 (11:01 +1000)]
Merge remote-tracking branch 'tile/master'

13 years agoMerge remote-tracking branch 'rmobile/rmobile-latest'
Stephen Rothwell [Fri, 23 Sep 2011 01:00:04 +0000 (11:00 +1000)]
Merge remote-tracking branch 'rmobile/rmobile-latest'

13 years agoMerge remote-tracking branch 'sh/sh-latest'
Stephen Rothwell [Fri, 23 Sep 2011 00:58:52 +0000 (10:58 +1000)]
Merge remote-tracking branch 'sh/sh-latest'

13 years agoMerge remote-tracking branch 's390/features'
Stephen Rothwell [Fri, 23 Sep 2011 00:52:35 +0000 (10:52 +1000)]
Merge remote-tracking branch 's390/features'

13 years agoMerge remote-tracking branch '52xx-and-virtex/powerpc/next'
Stephen Rothwell [Fri, 23 Sep 2011 00:51:19 +0000 (10:51 +1000)]
Merge remote-tracking branch '52xx-and-virtex/powerpc/next'

13 years agoMerge remote-tracking branch 'powerpc/next'
Stephen Rothwell [Fri, 23 Sep 2011 00:45:03 +0000 (10:45 +1000)]
Merge remote-tracking branch 'powerpc/next'

13 years agoMerge remote-tracking branch 'mips/mips-for-linux-next'
Stephen Rothwell [Fri, 23 Sep 2011 00:43:45 +0000 (10:43 +1000)]
Merge remote-tracking branch 'mips/mips-for-linux-next'

13 years agoMerge remote-tracking branch 'm68knommu/for-next'
Stephen Rothwell [Fri, 23 Sep 2011 00:42:26 +0000 (10:42 +1000)]
Merge remote-tracking branch 'm68knommu/for-next'

13 years agoMerge remote-tracking branch 'm68k/for-next'
Stephen Rothwell [Fri, 23 Sep 2011 00:41:15 +0000 (10:41 +1000)]
Merge remote-tracking branch 'm68k/for-next'

13 years agoMerge remote-tracking branch 'ia64/test'
Stephen Rothwell [Fri, 23 Sep 2011 00:39:57 +0000 (10:39 +1000)]
Merge remote-tracking branch 'ia64/test'

13 years agoMerge branch 'quilt/hexagon'
Stephen Rothwell [Fri, 23 Sep 2011 00:38:39 +0000 (10:38 +1000)]
Merge branch 'quilt/hexagon'

13 years agoMerge remote-tracking branch 'cris/for-next'
Stephen Rothwell [Fri, 23 Sep 2011 00:37:23 +0000 (10:37 +1000)]
Merge remote-tracking branch 'cris/for-next'

13 years agoMerge remote-tracking branch 'blackfin/for-linus'
Stephen Rothwell [Fri, 23 Sep 2011 00:36:11 +0000 (10:36 +1000)]
Merge remote-tracking branch 'blackfin/for-linus'

13 years agoMerge remote-tracking branch 'ux500-core/ux500-core'
Stephen Rothwell [Fri, 23 Sep 2011 00:36:10 +0000 (10:36 +1000)]
Merge remote-tracking branch 'ux500-core/ux500-core'

Conflicts:
arch/arm/mach-ux500/cache-l2x0.c

13 years agoMerge remote-tracking branch 's5p/for-next'
Stephen Rothwell [Fri, 23 Sep 2011 00:25:28 +0000 (10:25 +1000)]
Merge remote-tracking branch 's5p/for-next'

Conflicts:
drivers/gpio/Makefile

13 years agoMerge remote-tracking branch 'i.MX/for-next'
Stephen Rothwell [Fri, 23 Sep 2011 00:24:10 +0000 (10:24 +1000)]
Merge remote-tracking branch 'i.MX/for-next'

Conflicts:
arch/arm/mach-imx/Makefile

13 years agoMerge remote-tracking branch 'at91/at91-next'
Stephen Rothwell [Fri, 23 Sep 2011 00:22:47 +0000 (10:22 +1000)]
Merge remote-tracking branch 'at91/at91-next'

13 years agoMerge remote-tracking branch 'arm-soc/for-next'
Stephen Rothwell [Fri, 23 Sep 2011 00:21:33 +0000 (10:21 +1000)]
Merge remote-tracking branch 'arm-soc/for-next'

Conflicts:
Documentation/devicetree/bindings/arm/l2cc.txt
arch/arm/mach-at91/board-usb-a9260.c
arch/arm/mach-msm/board-msm8x60.c
arch/arm/mach-mxs/include/mach/gpio.h
arch/arm/mach-nuc93x/Makefile.boot
arch/arm/mach-u300/Makefile.boot
arch/arm/mm/cache-l2x0.c
arch/arm/plat-mxc/include/mach/gpio.h

13 years agoMerge remote-tracking branch 'arm-lpae/for-next'
Stephen Rothwell [Fri, 23 Sep 2011 00:14:57 +0000 (10:14 +1000)]
Merge remote-tracking branch 'arm-lpae/for-next'

Conflicts:
arch/arm/include/asm/page.h
arch/arm/include/asm/pgalloc.h
arch/arm/include/asm/pgtable-hwdef.h
arch/arm/include/asm/pgtable.h
arch/arm/include/asm/tlb.h
arch/arm/kernel/head.S
arch/arm/kernel/sleep.S
arch/arm/mm/dma-mapping.c
arch/arm/mm/mmu.c

13 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Fri, 23 Sep 2011 00:13:40 +0000 (10:13 +1000)]
Merge remote-tracking branch 'arm/for-next'

Conflicts:
arch/arm/mach-integrator/integrator_ap.c

13 years agoMerge remote-tracking branch 'spi-current/spi/merge'
Stephen Rothwell [Fri, 23 Sep 2011 00:07:36 +0000 (10:07 +1000)]
Merge remote-tracking branch 'spi-current/spi/merge'

13 years agoMerge remote-tracking branch 'wireless-current/master'
Stephen Rothwell [Fri, 23 Sep 2011 00:07:24 +0000 (10:07 +1000)]
Merge remote-tracking branch 'wireless-current/master'

13 years agoMerge remote-tracking branch 'pci-current/for-linus'
Stephen Rothwell [Fri, 23 Sep 2011 00:07:23 +0000 (10:07 +1000)]
Merge remote-tracking branch 'pci-current/for-linus'

13 years agoMerge remote-tracking branch 'scsi-rc-fixes/master'
Stephen Rothwell [Fri, 23 Sep 2011 00:07:22 +0000 (10:07 +1000)]
Merge remote-tracking branch 'scsi-rc-fixes/master'

13 years agoMerge remote-tracking branch 'arm-current/fixes'
Stephen Rothwell [Fri, 23 Sep 2011 00:07:19 +0000 (10:07 +1000)]
Merge remote-tracking branch 'arm-current/fixes'

13 years agopowerpc: update 512x-defconfig
Wolfram Sang [Wed, 21 Sep 2011 10:49:21 +0000 (12:49 +0200)]
powerpc: update 512x-defconfig

Activate all MPC512x related boards. Also enable GPIO-driver, SPI driver
and at25 to test SPI. Enable DEVTMPFS. Bump to 3.1-rc6.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
13 years agogpio: move mpc8xxx/512x gpio driver to drivers/gpio
Wolfram Sang [Wed, 21 Sep 2011 10:49:20 +0000 (12:49 +0200)]
gpio: move mpc8xxx/512x gpio driver to drivers/gpio

Move the driver to the place where it is expected to be nowadays. Also
rename its CONFIG-name to match the rest and adapt the defconfigs.
Finally, move selection of REQUIRE_GPIOLIB or WANTS_OPTIONAL_GPIOLIB to
the platforms, because this option is per-platform and not per-driver.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
13 years agopowerpc/5200: enable audio in the defconfig
Timur Tabi [Thu, 1 Sep 2011 22:31:22 +0000 (17:31 -0500)]
powerpc/5200: enable audio in the defconfig

Audio support for the MPC5200 exists, so enable it by default.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
13 years agopowerpc/5200: dts: digsy_mtc.dts: enable both MSCAN nodes
Anatolij Gustschin [Thu, 7 Jul 2011 12:49:50 +0000 (14:49 +0200)]
powerpc/5200: dts: digsy_mtc.dts: enable both MSCAN nodes

We use both MSCAN controllers on this board, so do not disable
them in the device tree.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
13 years agopowerpc/5200: dts: digsy_mtc.dts: add timer0 and timer1 gpio properties
Anatolij Gustschin [Mon, 6 Jun 2011 22:27:05 +0000 (00:27 +0200)]
powerpc/5200: dts: digsy_mtc.dts: add timer0 and timer1 gpio properties

timer0 and timer1 pins are used as simple GPIO on this board.
Add gpio-controller and #gpio-cells properties to timer nodes
so that we can control gpio lines using available MPC52xx
GPT driver.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
13 years agopowerpc/5200: dts: digsy_mtc.dts: update to add can, pci, serial and spi
Anatolij Gustschin [Mon, 16 May 2011 16:02:44 +0000 (18:02 +0200)]
powerpc/5200: dts: digsy_mtc.dts: update to add can, pci, serial and spi

Add new nodes to describe more hardware the board is
equipped with:
 - two can nodes for SJA1000 on localbus
 - pci node to support Coral-PA graphics controller
 - serial node for SC28L92 DUART on localbus
 - spi node for MSP430 device

Also correct i2c eeprom node name.

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
13 years agopowerpc/5200: mpc5200b.dtsi: add spi node address- and size-cells properties
Anatolij Gustschin [Mon, 16 May 2011 16:02:43 +0000 (18:02 +0200)]
powerpc/5200: mpc5200b.dtsi: add spi node address- and size-cells properties

Both, #address-cells and #size-cells properties are required
for spi bus node, so add them.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
13 years agoMerge branch 'next/pm' into for-next
Arnd Bergmann [Thu, 22 Sep 2011 15:24:09 +0000 (15:24 +0000)]
Merge branch 'next/pm' into for-next

13 years agoMerge branch 'next/fixes' into for-next
Arnd Bergmann [Thu, 22 Sep 2011 14:45:16 +0000 (14:45 +0000)]
Merge branch 'next/fixes' into for-next

13 years agoMerge branch 'tegra/fixes' into next/fixes
Arnd Bergmann [Thu, 22 Sep 2011 14:45:01 +0000 (14:45 +0000)]
Merge branch 'tegra/fixes' into next/fixes

13 years agoarm/dt: Tegra: Add support-8bit to SDHCI nodes
Stephen Warren [Tue, 20 Sep 2011 16:46:26 +0000 (10:46 -0600)]
arm/dt: Tegra: Add support-8bit to SDHCI nodes

For Seaboard's internal eMMC, this makes the difference between a
5.5MB/s and 10.2MB/s transfer rate. On Harmony, there wasn't any
measurable difference on my cheap/slow ~2MB/s card.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
13 years agoMerge branch 'next/fixes' into for-next
Arnd Bergmann [Thu, 22 Sep 2011 14:14:13 +0000 (14:14 +0000)]
Merge branch 'next/fixes' into for-next

Conflicts:
arch/arm/boot/dts/tegra-harmony.dts
arch/arm/boot/dts/tegra-seaboard.dts
arch/arm/mach-ux500/cpu.c

13 years agoMerge branch 'next/deletion' into for-next
Arnd Bergmann [Thu, 22 Sep 2011 14:03:20 +0000 (14:03 +0000)]
Merge branch 'next/deletion' into for-next

13 years agoARM: mach-nuc93x: delete
Nicolas Pitre [Wed, 3 Aug 2011 14:50:38 +0000 (15:50 +0100)]
ARM: mach-nuc93x: delete

This architecture received only generic maintenance since December 2009
when it was originally submitted, and no actual additional support since
then.  It has no defconfig entry either, meaning that it was never built
by the ARM KAutobuild.  Incidentally it currently doesn't build either
when CONFIG_MACH_NUC932EVB is selected which is the only possible config
choice.

This is therefore dead code and should be removed.  If someone wants to
revive this code, it could be retrieved from the Git repository, and
ideally be merged in mach-w90x900/ instead.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
13 years agoARM: mach-ux500: unlock I&D l2x0 caches before init
Linus Walleij [Fri, 12 Aug 2011 11:54:42 +0000 (13:54 +0200)]
ARM: mach-ux500: unlock I&D l2x0 caches before init

Apparently U8500 U-Boot versions may leave the l2x0 locked down
before executing the kernel. Make sure we unlock it before we
initialize the l2x0. This fixes a performance problem reported
by Jan Rinze.

The l2x0 core has been modified to unlock the l2x0 by default,
but it will not touch the locking registers if the l2x0 was
already enabled, as on the ux500, so we need this quirk to
make sure it is properly turned off.

Cc: stable@kernel.org
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Rabin Vincent <rabin.vincent@stericsson.com>
Cc: Adrian Bunk <adrian.bunk@movial.com>
Reported-by: Jan Rinze <janrinze@gmail.com>
Tested-by: Robert Marklund <robert.marklund@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
13 years agoARM: mach-ux500: enable fix for ARM errata 754322
srinidhi kasagar [Tue, 20 Sep 2011 05:45:46 +0000 (11:15 +0530)]
ARM: mach-ux500: enable fix for ARM errata 754322

This applies ARM errata fix 754322 for all ux500 platforms.

Cc: stable@kernel.org
Signed-off-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
13 years ago[SCSI] 3w-9xxx: fix iommu_iova leak
James Bottomley [Sun, 18 Sep 2011 14:56:20 +0000 (18:56 +0400)]
[SCSI] 3w-9xxx: fix iommu_iova leak

Following reports on the list, it looks like the 3e-9xxx driver will leak dma
mappings every time we get a transient queueing error back from the card.
This is because it maps the sg list in the routine that sends the command, but
doesn't unmap again in the transient failure path (even though the command is
sent back to the block layer).  Fix by unmapping before returning the status.

Reported-by: Chris Boot <bootc@bootc.net>
Tested-by: Chris Boot <bootc@bootc.net>
Acked-by: Adam Radford <aradford@gmail.com>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years agoMerge branch 'logitech' into for-next
Jiri Kosina [Thu, 22 Sep 2011 09:03:35 +0000 (11:03 +0200)]
Merge branch 'logitech' into for-next

13 years agoHID: "hid-logitech" driver with Logitech Driving Force GT
Michal Malý [Sat, 10 Sep 2011 19:28:23 +0000 (21:28 +0200)]
HID: "hid-logitech" driver with Logitech Driving Force GT

There's been a small oversight when adding support for Logitech Driving Force
GT. Entry in hid-core was missing so the generic driver instead of hid-logitech
was being used.

Signed-off-by: Michal Malý <madcatxster@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
13 years ago[SCSI] cxgb3i: convert cdev->l2opt to use rcu to prevent NULL dereference (v2)
Neil Horman [Tue, 6 Sep 2011 17:59:13 +0000 (13:59 -0400)]
[SCSI] cxgb3i: convert cdev->l2opt to use rcu to prevent NULL dereference (v2)

This oops was reported recently:
d:mon> e
cpu 0xd: Vector: 300 (Data Access) at [c0000000fd4c7120]
    pc: d00000000076f194: .t3_l2t_get+0x44/0x524 [cxgb3]
    lr: d000000000b02108: .init_act_open+0x150/0x3d4 [cxgb3i]
    sp: c0000000fd4c73a0
   msr: 8000000000009032
   dar: 0
 dsisr: 40000000
  current = 0xc0000000fd640d40
  paca    = 0xc00000000054ff80
    pid   = 5085, comm = iscsid
d:mon> t
[c0000000fd4c7450d000000000b02108 .init_act_open+0x150/0x3d4 [cxgb3i]
[c0000000fd4c7500d000000000e45378 .cxgbi_ep_connect+0x784/0x8e8 [libcxgbi]
[c0000000fd4c7650d000000000db33f0 .iscsi_if_rx+0x71c/0xb18
[scsi_transport_iscsi2]
[c0000000fd4c7740c000000000370c9c .netlink_data_ready+0x40/0xa4
[c0000000fd4c77c0c00000000036f010 .netlink_sendskb+0x4c/0x9c
[c0000000fd4c7850c000000000370c18 .netlink_sendmsg+0x358/0x39c
[c0000000fd4c7950c00000000033be24 .sock_sendmsg+0x114/0x1b8
[c0000000fd4c7b50c00000000033d208 .sys_sendmsg+0x218/0x2ac
[c0000000fd4c7d70c00000000033f55c .sys_socketcall+0x228/0x27c
[c0000000fd4c7e30c0000000000086a4 syscall_exit+0x0/0x40
--- Exception: c01 (System Call) at 00000080da560cfc

The root cause was an EEH error, which sent us down the offload_close path in
the cxgb3 driver, which in turn sets cdev->l2opt to NULL, without regard for
upper layer driver (like the cxgbi drivers) which might have execution contexts
in the middle of its use. The result is the oops above, when t3_l2t_get attempts
to dereference L2DATA(cdev)->nentries in arp_hash right after the EEH error handler sets it to NULL.

The fix is to prevent the setting of the NULL pointer until after there are no
further users of it.  The t3cdev->l2opt pointer is now converted to be an rcu
pointer and the L2DATA macro is now called under the protection of the
rcu_read_lock().  When the EEH error path:
t3_adapter_error->offload_close->cxgb3_offload_deactivate
Is exectured, setting of that l2opt pointer to NULL, is now gated on an rcu
quiescence point, preventing, allowing L2DATA callers to safely check for a NULL
pointer without concern that the underlying data will be freeded before the
pointer is dereferenced.

This has been tested by the reporter and shown to fix the reproted oops

Note: I had attempted to post a fix for this bug previously.  While it solved
the issue, James B. pointed out that it really didn't make much sense, and on
closer inspection I agree. Some internal structures to this affected pointer are
already refcounted and so all we should need to do is prevent the race that
arises between the reading of the affected pointer and its setting to NULL.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Karen Xie <kxie@chelsio.com>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] scsi: qla4xxx needs libiscsi.o
Randy Dunlap [Wed, 31 Aug 2011 22:02:00 +0000 (15:02 -0700)]
[SCSI] scsi: qla4xxx needs libiscsi.o

qla4xxx driver needs to be linked with libiscsi.o to fix
build errors.  This happens when no other drivers that use
libiscsi.o are enabled.

ERROR: "iscsi_conn_stop" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_conn_get_addr_param" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_session_teardown" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_host_alloc" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_conn_start" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_conn_send_pdu" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_session_get_param" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_conn_get_param" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_set_param" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_session_failure" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_complete_pdu" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_session_setup" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_conn_bind" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_conn_setup" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_itt_to_task" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] libsas: fix failure to revalidate domain for anything but the first expander...
Mark Salyzyn [Thu, 1 Sep 2011 13:11:17 +0000 (06:11 -0700)]
[SCSI] libsas: fix failure to revalidate domain for anything but the first expander child.

In an enclosure model where there are chaining expanders to a large body
of storage, it was discovered that libsas, responding to a broadcast
event change, would only revalidate the domain of first child expander
in the list.

The issue is that the pointer value to the discovered source device was
used to break out of the loop, rather than the content of the pointer.

This still remains non-compliant as the revalidate domain code is
supposed to loop through all child expanders, and not stop at the first
one it finds that reports a change count. However, the design of this
routine does not allow multiple device discoveries and that would be a
more complicated set of patches reserved for another day. We are fixing
the glaring bug rather than refactoring the code.

Signed-off-by: Mark Salyzyn <msalyzyn@us.xyratex.com>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] aacraid: reset should disable MSI interrupt
Vasily Averin [Fri, 2 Sep 2011 15:31:46 +0000 (19:31 +0400)]
[SCSI] aacraid: reset should disable MSI interrupt

scsi reset on hardware with enabled MSI interrupts generates WARNING message

[11027.798722] aacraid: Host adapter abort request (0,0,0,0)
[11027.798814] aacraid: Host adapter reset request. SCSI hang ?
[11087.762237] aacraid: SCSI bus appears hung
[11135.082543] ------------[ cut here ]------------
[11135.082646] WARNING: at drivers/pci/msi.c:658 pci_enable_msi_block+0x251/0x290()

Signed-off-by: Vasily Averin <vvs@sw.ru>
Acked-by: Mark Salyzyn <mark_salyzyn@us.xyratex.com>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years agoLinux 3.1-rc7 v3.1-rc7
Linus Torvalds [Wed, 21 Sep 2011 23:58:15 +0000 (16:58 -0700)]
Linux 3.1-rc7

13 years agoXZ: Fix incorrect XZ_BUF_ERROR
Lasse Collin [Wed, 21 Sep 2011 14:30:50 +0000 (17:30 +0300)]
XZ: Fix incorrect XZ_BUF_ERROR

xz_dec_run() could incorrectly return XZ_BUF_ERROR if all of the
following was true:

 - The caller knows how many bytes of output to expect and only provides
   that much output space.

 - When the last output bytes are decoded, the caller-provided input
   buffer ends right before the LZMA2 end of payload marker.  So LZMA2
   won't provide more output anymore, but it won't know it yet and thus
   won't return XZ_STREAM_END yet.

 - A BCJ filter is in use and it hasn't left any unfiltered bytes in the
   temp buffer.  This can happen with any BCJ filter, but in practice
   it's more likely with filters other than the x86 BCJ.

This fixes <https://bugzilla.redhat.com/show_bug.cgi?id=735408> where
Squashfs thinks that a valid file system is corrupt.

This also fixes a similar bug in single-call mode where the uncompressed
size of a block using BCJ + LZMA2 was 0 bytes and caller provided no
output space.  Many empty .xz files don't contain any blocks and thus
don't trigger this bug.

This also tweaks a closely related detail: xz_dec_bcj_run() could call
xz_dec_lzma2_run() to decode into temp buffer when it was known to be
useless.  This was harmless although it wasted a minuscule number of CPU
cycles.

Signed-off-by: Lasse Collin <lasse.collin@tukaani.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge git://github.com/davem330/net
Linus Torvalds [Wed, 21 Sep 2011 20:35:00 +0000 (13:35 -0700)]
Merge git://github.com/davem330/net

* git://github.com/davem330/net: (27 commits)
  xfrm: Perform a replay check after return from async codepaths
  fib:fix BUG_ON in fib_nl_newrule when add new fib rule
  ixgbe: fix possible null buffer error
  tg3: fix VLAN tagging regression
  net: pxa168: Fix build errors by including interrupt.h
  netconsole: switch init_netconsole() to late_initcall
  gianfar: Fix overflow check and return value for gfar_get_cls_all()
  ppp_generic: fix multilink fragment MTU calculation (again)
  GRETH: avoid overwrite IP-stack's IP-frags checksum
  GRETH: RX/TX bytes were never increased
  ipv6: fix a possible double free
  b43: Fix beacon problem in ad-hoc mode
  Bluetooth: add support for 2011 mac mini
  Bluetooth: Add MacBookAir4,1 support
  Bluetooth: Fixed BT ST Channel reg order
  r8169: do not enable the TBI for anything but the original 8169.
  r8169: remove erroneous processing of always set bit.
  r8169: fix WOL setting for 8105 and 8111evl
  r8169: add MODULE_FIRMWARE for the firmware of 8111evl
  r8169: fix the reset setting for 8111evl
  ...

13 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Wed, 21 Sep 2011 20:20:21 +0000 (13:20 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

* 'for-linus' of git://git.kernel.dk/linux-block:
  floppy: use del_timer_sync() in init cleanup
  blk-cgroup: be able to remove the record of unplugged device
  block: Don't check QUEUE_FLAG_SAME_COMP in __blk_complete_request
  mm: Add comment explaining task state setting in bdi_forker_thread()
  mm: Cleanup clearing of BDI_pending bit in bdi_forker_thread()
  block: simplify force plug flush code a little bit
  block: change force plug flush call order
  block: Fix queue_flag update when rq_affinity goes from 2 to 1
  block: separate priority boosting from REQ_META
  block: remove READ_META and WRITE_META
  xen-blkback: fixed indentation and comments
  xen-blkback: Don't disconnect backend until state switched to XenbusStateClosed.

13 years agoinit: carefully handle loglevel option on kernel cmdline.
Alexander Sverdlin [Wed, 21 Sep 2011 07:51:40 +0000 (09:51 +0200)]
init: carefully handle loglevel option on kernel cmdline.

When a malformed loglevel value (for example "${abc}") is passed on the
kernel cmdline, the loglevel itself is being set to 0.

That then suppresses all following messages, including all the errors
and crashes caused by other malformed cmdline options.  This could make
debugging process quite tricky.

This patch leaves the previous value of loglevel if the new value is
incorrect and reports an error code in this case.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@sysgo.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoteach /proc/$pid/numa_maps about transparent hugepages
Dave Hansen [Tue, 20 Sep 2011 22:19:41 +0000 (15:19 -0700)]
teach /proc/$pid/numa_maps about transparent hugepages

This is modeled after the smaps code.

It detects transparent hugepages and then does a single gather_stats()
for the page as a whole.  This has two benifits:
 1. It is more efficient since it does many pages in a single shot.
 2. It does not have to break down the huge page.

Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
Acked-by: Hugh Dickins <hughd@google.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agobreak out numa_maps gather_pte_stats() checks
Dave Hansen [Tue, 20 Sep 2011 22:19:39 +0000 (15:19 -0700)]
break out numa_maps gather_pte_stats() checks

gather_pte_stats() does a number of checks on a target page
to see whether it should even be considered for statistics.
This breaks that code out in to a separate function so that
we can use it in the transparent hugepage case in the next
patch.

Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
Acked-by: Hugh Dickins <hughd@google.com>
Reviewed-by: Christoph Lameter <cl@gentwo.org>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agomake /proc/$pid/numa_maps gather_stats() take variable page size
Dave Hansen [Tue, 20 Sep 2011 22:19:38 +0000 (15:19 -0700)]
make /proc/$pid/numa_maps gather_stats() take variable page size

We need to teach the numa_maps code about transparent huge pages.  The
first step is to teach gather_stats() that the pte it is dealing with
might represent more than one page.

Note that will we use this in a moment for transparent huge pages since
they have use a single pmd_t which _acts_ as a "surrogate" for a bunch
of smaller pte_t's.

I'm a _bit_ unhappy that this interface counts in hugetlbfs page sizes
for hugetlbfs pages and PAGE_SIZE for normal pages.  That means that to
figure out how many _bytes_ "dirty=1" means, you must first know the
hugetlbfs page size.  That's easier said than done especially if you
don't have visibility in to the mount.

But, that's probably a discussion for another day especially since it
would change behavior to fix it.  But, just in case anyone wonders why
this patch only passes a '1' in the hugetlb case...

Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
Acked-by: Hugh Dickins <hughd@google.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agocfg80211: Fix validation of AKM suites
Jouni Malinen [Wed, 21 Sep 2011 13:13:07 +0000 (16:13 +0300)]
cfg80211: Fix validation of AKM suites

Incorrect variable was used in validating the akm_suites array from
NL80211_ATTR_AKM_SUITES. In addition, there was no explicit
validation of the array length (we only have room for
NL80211_MAX_NR_AKM_SUITES).

This can result in a buffer write overflow for stack variables with
arbitrary data from user space. The nl80211 commands using the affected
functionality require GENL_ADMIN_PERM, so this is only exposed to admin
users.

Cc: stable@kernel.org
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: do not use interruptible waits
Stanislaw Gruszka [Tue, 20 Sep 2011 14:49:03 +0000 (16:49 +0200)]
iwlegacy: do not use interruptible waits

iwlegacy version of fix:

commit effd4d9aece9184f526e6556786a94d335e38b71
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Thu Sep 15 11:46:52 2011 -0700

    iwlagn: do not use interruptible waits

    Since the dawn of its time, iwlwifi has used
    interruptible waits to wait for synchronous
    commands and firmware loading.

    This leads to "interesting" bugs, because it
    can't actually handle the interruptions; for
    example when a command sending is interrupted
    it will assume the command completed fully,
    and then leave it pending, which leads to all
    kinds of trouble when the command finishes
    later.

    Since there's no easy way to gracefully deal
    with interruptions, fix the driver to not use
    interruptible waits.

    This at least fixes the error
    iwlagn 0000:02:00.0: Error: Response NULL in  'REPLY_SCAN_ABORT_CMD'

    I have seen in P2P testing, but it is likely
    that there are other errors caused by this.

Cc: stable@kernel.org # 2.6.39+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: fix command queue timeout
Stanislaw Gruszka [Tue, 20 Sep 2011 14:46:36 +0000 (16:46 +0200)]
iwlegacy: fix command queue timeout

iwlegacy version of fix:

commit 282cdb325aea4ebbc42ce753b47cc96145eb54bc
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Mon Sep 12 12:09:10 2011 -0700

    iwlagn: fix command queue timeout

    If the command queue is constantly busy,
    which can happen in P2P, the hangcheck
    timer will frequently find a command in
    it and will eventually reset the device
    because nothing sets the timestamp for
    this queue when commands are processed.

    Fix this by setting the timestamp when
    a command completes.

iwlegacy does not support P2P, but this patch fix possible
unneeded hardware resets, hence is needed.

Cc: stable@kernel.org # 2.6.39+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Fix Rx DMA stuck for AR9003 chips
Rajkumar Manoharan [Tue, 20 Sep 2011 10:53:51 +0000 (16:23 +0530)]
ath9k_hw: Fix Rx DMA stuck for AR9003 chips

During the endurance testing, rx frames are not getting DMAd from
MAC whereas pcu rx frame counters are getting updated properly.
As per systems team input updated the initval to fix rx dma stuck
issue.

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoxfrm: Perform a replay check after return from async codepaths
Steffen Klassert [Tue, 20 Sep 2011 23:38:58 +0000 (23:38 +0000)]
xfrm: Perform a replay check after return from async codepaths

When asyncronous crypto algorithms are used, there might be many
packets that passed the xfrm replay check, but the replay advance
function is not called yet for these packets. So the replay check
function would accept a replay of all of these packets. Also the
system might crash if there are more packets in async processing
than the size of the anti replay window, because the replay advance
function would try to update the replay window beyond the bounds.

This pach adds a second replay check after resuming from the async
processing to fix these issues.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agofib:fix BUG_ON in fib_nl_newrule when add new fib rule
Gao feng [Sun, 11 Sep 2011 15:36:05 +0000 (15:36 +0000)]
fib:fix BUG_ON in fib_nl_newrule when add new fib rule

add new fib rule can cause BUG_ON happen
the reproduce shell is
ip rule add pref 38
ip rule add pref 38
ip rule add to 192.168.3.0/24 goto 38
ip rule del pref 38
ip rule add to 192.168.3.0/24 goto 38
ip rule add pref 38

then the BUG_ON will happen
del BUG_ON and use (ctarget == NULL) identify whether this rule is unresolved

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfs: cleanup xfs_bmap.h
Christoph Hellwig [Sun, 18 Sep 2011 20:41:07 +0000 (20:41 +0000)]
xfs: cleanup xfs_bmap.h

Convert all function prototypes to the short form used elsewhere,
and remove duplicates of comments already placed at the function
body.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: dont ignore error code from xfs_bmbt_update
Christoph Hellwig [Sun, 18 Sep 2011 20:41:06 +0000 (20:41 +0000)]
xfs: dont ignore error code from xfs_bmbt_update

Fix a case in xfs_bmap_add_extent_unwritten_real where we aren't
passing the returned error on.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: pass bmalloca to xfs_bmap_add_extent_hole_real
Christoph Hellwig [Sun, 18 Sep 2011 20:41:05 +0000 (20:41 +0000)]
xfs: pass bmalloca to xfs_bmap_add_extent_hole_real

All the parameters passed to xfs_bmap_add_extent_hole_real() are in
the xfs_bmalloca structure now. Just pass the bmalloca parameter to
the function instead of 8 separate parameters.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: pass bmalloca to xfs_bmap_add_extent_delay_real
Christoph Hellwig [Sun, 18 Sep 2011 20:41:04 +0000 (20:41 +0000)]
xfs: pass bmalloca to xfs_bmap_add_extent_delay_real

All the parameters passed to xfs_bmap_add_extent_delay_real() are in
the xfs_bmalloca structure now. Just pass the bmalloca parameter to
the function instead of 8 separate parameters.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: move logflags into bmalloca
Christoph Hellwig [Sun, 18 Sep 2011 20:41:02 +0000 (20:41 +0000)]
xfs: move logflags into bmalloca

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: move lastx and nallocs into bmalloca
Dave Chinner [Sun, 18 Sep 2011 20:41:01 +0000 (20:41 +0000)]
xfs: move lastx and nallocs into bmalloca

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: move btree cursor into bmalloca
Dave Chinner [Sun, 18 Sep 2011 20:41:00 +0000 (20:41 +0000)]
xfs: move btree cursor into bmalloca

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: do not keep local copies of allocation ranges in xfs_bmapi_allocate
Dave Chinner [Sun, 18 Sep 2011 20:40:59 +0000 (20:40 +0000)]
xfs: do not keep local copies of allocation ranges in xfs_bmapi_allocate

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: rename allocation range fields in struct xfs_bmalloca
Dave Chinner [Sun, 18 Sep 2011 20:40:58 +0000 (20:40 +0000)]
xfs: rename allocation range fields in struct xfs_bmalloca

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: move firstblock and bmap freelist cursor into bmalloca structure
Dave Chinner [Sun, 18 Sep 2011 20:40:57 +0000 (20:40 +0000)]
xfs: move firstblock and bmap freelist cursor into bmalloca structure

Rather than passing the firstblock and freelist structure around,
embed it into the bmalloca structure and remove it from the function
parameters.

This also enables the minleft parameter to be set only once in
xfs_bmapi_write(), and the freelist cursor directly queried in
xfs_bmapi_allocate to clear it when the lowspace algorithm is
activated.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: move extent records into bmalloca structure
Dave Chinner [Sun, 18 Sep 2011 20:40:56 +0000 (20:40 +0000)]
xfs: move extent records into bmalloca structure

Rather that putting extent records on the stack and then pointing to
them in the bmalloca structure which is in the same stack frame, put
the extent records directly in the bmalloca structure. This reduces
the number of args that need to be passed around.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: pass bmalloca structure to xfs_bmap_isaeof
Dave Chinner [Sun, 18 Sep 2011 20:40:55 +0000 (20:40 +0000)]
xfs: pass bmalloca structure to xfs_bmap_isaeof

All the variables xfs_bmap_isaeof() is passed are contained within
the xfs_bmalloca structure. Pass that instead.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: remove xfs_bmap_add_extent
Christoph Hellwig [Sun, 18 Sep 2011 20:40:54 +0000 (20:40 +0000)]
xfs: remove xfs_bmap_add_extent

There is no real need to the xfs_bmap_add_extent, as the callers
know what kind of extents they need to it.  Removing it means
duplicating the extents to btree conversion logic in three places,
but overall it's still much simpler code and quite a bit less code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: introduce xfs_bmap_last_extent
Christoph Hellwig [Sun, 18 Sep 2011 20:40:53 +0000 (20:40 +0000)]
xfs: introduce xfs_bmap_last_extent

Add a common helper for finding the last extent in a file.

Largely based on a patch from Dave Chinner.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: rename xfs_bmapi to xfs_bmapi_write
Dave Chinner [Sun, 18 Sep 2011 20:40:52 +0000 (20:40 +0000)]
xfs: rename xfs_bmapi to xfs_bmapi_write

Now that all the read-only users of xfs_bmapi have been converted to
use xfs_bmapi_read(), we can remove all the read-only handling cases
from xfs_bmapi().

Once this is done, rename xfs_bmapi to xfs_bmapi_write to reflect
the fact it is for allocation only. This enables us to kill the
XFS_BMAPI_WRITE flag as well.

Also clean up xfs_bmapi_write to the style used in the newly added
xfs_bmapi_read/delay functions.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: factor unwritten extent map manipulations out of xfs_bmapi
Dave Chinner [Sun, 18 Sep 2011 20:40:51 +0000 (20:40 +0000)]
xfs: factor unwritten extent map manipulations out of xfs_bmapi

To further improve the readability of xfs_bmapi(), factor the
unwritten extent conversion out into a separate function. This
removes large block of logic from the xfs_bmapi() code loop and
makes it easier to see the operational logic flow for xfs_bmapi().

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: factor extent allocation out of xfs_bmapi
Dave Chinner [Sun, 18 Sep 2011 20:40:50 +0000 (20:40 +0000)]
xfs: factor extent allocation out of xfs_bmapi

To further improve the readability of xfs_bmapi(), factor the extent
allocation out into a separate function. This removes a large block
of logic from the xfs_bmapi() code loop and makes it easier to see
the operational logic flow for xfs_bmapi().

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: do not use xfs_bmap_add_extent for adding delalloc extents
Christoph Hellwig [Sun, 18 Sep 2011 20:40:49 +0000 (20:40 +0000)]
xfs: do not use xfs_bmap_add_extent for adding delalloc extents

We can just call xfs_bmap_add_extent_hole_delay directly to add a
delayed allocated regions to the extent tree, instead of going
through all the complexities of xfs_bmap_add_extent that aren't
needed for this simple case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: introduce xfs_bmapi_delay()
Christoph Hellwig [Sun, 18 Sep 2011 20:40:48 +0000 (20:40 +0000)]
xfs: introduce xfs_bmapi_delay()

Delalloc reservations are much simpler than allocations, so give
them a separate bmapi-level interface.  Using the previously added
xfs_bmapi_reserve_delalloc we get a function that is only minimally
more complicated than xfs_bmapi_read, which is far from the complexity
in xfs_bmapi.  Also remove the XFS_BMAPI_DELAY code after switching
over the only user to xfs_bmapi_delay.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: factor delalloc reservations out of xfs_bmapi
Christoph Hellwig [Sun, 18 Sep 2011 20:40:47 +0000 (20:40 +0000)]
xfs: factor delalloc reservations out of xfs_bmapi

Move the reservation of delayed allocations, and addition of delalloc
regions to the extent trees into a new helper function.  For now
this adds some twisted goto logic to xfs_bmapi, but that will be
cleaned up in the following patches.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: remove xfs_bmapi_single()
Dave Chinner [Sun, 18 Sep 2011 20:40:46 +0000 (20:40 +0000)]
xfs: remove xfs_bmapi_single()

Now we have xfs_bmapi_read, there is no need for xfs_bmapi_single().
Change the remaining caller over and kill the function.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: introduce xfs_bmapi_read()
Dave Chinner [Sun, 18 Sep 2011 20:40:45 +0000 (20:40 +0000)]
xfs: introduce xfs_bmapi_read()

xfs_bmapi() currently handles both extent map reading and
allocation. As a result, the code is littered with "if (wr)"
branches to conditionally do allocation operations if required.
This makes the code much harder to follow and causes significant
indent issues with the code.

Given that read mapping is much simpler than allocation, we can
split out read mapping from xfs_bmapi() and reuse the logic that
we have already factored out do do all the hard work of handling the
extent map manipulations. The results in a much simpler function for
the common extent read operations, and will allow the allocation
code to be simplified in another commit.

Once xfs_bmapi_read() is implemented, convert all the callers of
xfs_bmapi() that are only reading extents to use the new function.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: factor extent map manipulations out of xfs_bmapi
Dave Chinner [Sun, 18 Sep 2011 20:40:44 +0000 (20:40 +0000)]
xfs: factor extent map manipulations out of xfs_bmapi

To further improve the readability of xfs_bmapi(), factor the pure
extent map manipulations out into separate functions. This removes
large blocks of logic from the xfs_bmapi() code loop and makes it
easier to see the operational logic flow for xfs_bmapi().

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: remove the nextents variable in xfs_bmapi
Christoph Hellwig [Sun, 18 Sep 2011 20:40:43 +0000 (20:40 +0000)]
xfs: remove the nextents variable in xfs_bmapi

Instead of using a local variable that needs to updated when we modify
the extent map just check ifp->if_bytes directly where we use it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: remove impossible to read code in xfs_bmap_add_extent_delay_real
Christoph Hellwig [Sun, 18 Sep 2011 20:40:42 +0000 (20:40 +0000)]
xfs: remove impossible to read code in xfs_bmap_add_extent_delay_real

We already have the worst case blocks reserved, so xfs_icsb_modify_counters
won't fail in xfs_bmap_add_extent_delay_real.  In fact we've had an assert
to catch this case since day and it never triggered.  So remove the code
to try smaller reservations, and just return the error for that case in
addition to keeping the assert.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfs: remove the first extent special case in xfs_bmap_add_extent
Christoph Hellwig [Sun, 18 Sep 2011 20:40:41 +0000 (20:40 +0000)]
xfs: remove the first extent special case in xfs_bmap_add_extent

Both xfs_bmap_add_extent_hole_delay and xfs_bmap_add_extent_hole_real
already contain code to handle the case where there is no extent to
merge with, which is effectively the same as the code duplicated here.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>