Merge branch 'for-3.11/drivers' of git://git.kernel.dk/linux-block
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 23 Jul 2013 02:02:52 +0000 (19:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 23 Jul 2013 02:02:52 +0000 (19:02 -0700)
Pull block IO driver bits from Jens Axboe:
 "As I mentioned in the core block pull request, due to real life
  circumstances the driver pull request would be late.  Now it looks
  like -rc2 late...  On the plus side, apart form the rsxx update, these
  are all things that I could argue could go in later in the cycle as
  they are fixes and not features.  So even though things are late, it's
  not ALL bad.

  The pull request contains:

   - Updates to bcache, all bug fixes, from Kent.

   - A pile of drbd bug fixes (no big features this time!).

   - xen blk front/back fixes.

   - rsxx driver updates, some of them deferred form 3.10.  So should be
     well cooked by now"

* 'for-3.11/drivers' of git://git.kernel.dk/linux-block: (63 commits)
  bcache: Allocation kthread fixes
  bcache: Fix GC_SECTORS_USED() calculation
  bcache: Journal replay fix
  bcache: Shutdown fix
  bcache: Fix a sysfs splat on shutdown
  bcache: Advertise that flushes are supported
  bcache: check for allocation failures
  bcache: Fix a dumb race
  bcache: Use standard utility code
  bcache: Update email address
  bcache: Delete fuzz tester
  bcache: Document shrinker reserve better
  bcache: FUA fixes
  drbd: Allow online change of al-stripes and al-stripe-size
  drbd: Constants should be UPPERCASE
  drbd: Ignore the exit code of a fence-peer handler if it returns too late
  drbd: Fix rcu_read_lock balance on error path
  drbd: fix error return code in drbd_init()
  drbd: Do not sleep inside rcu
  bcache: Refresh usage docs
  ...

1  2 
MAINTAINERS
drivers/block/xen-blkback/xenbus.c
drivers/md/bcache/bset.c

diff --combined MAINTAINERS
index bf61e04291abb2f2200544517ab144c89cb3ab8e,a0a76fb7323f0075361d51b0796c0067f7d29ffd..5d3facfd78993eeda6d4484f44675471b32f545a
@@@ -180,11 -180,6 +180,11 @@@ T:       git git://git.kernel.org/pub/scm/lin
  S:    Maintained
  F:    Documentation/filesystems/9p.txt
  F:    fs/9p/
 +F:    net/9p/
 +F:    include/net/9p/
 +F:    include/uapi/linux/virtio_9p.h
 +F:    include/trace/events/9p.h
 +
  
  A8293 MEDIA DRIVER
  M:    Antti Palosaari <crope@iki.fi>
@@@ -247,11 -242,6 +247,11 @@@ F:       drivers/acpi
  F:    drivers/pnp/pnpacpi/
  F:    include/linux/acpi.h
  F:    include/acpi/
 +F:    Documentation/acpi
 +F:    Documentation/ABI/testing/sysfs-bus-acpi
 +F:    drivers/pci/*acpi*
 +F:    drivers/pci/*/*acpi*
 +F:    drivers/pci/*/*/*acpi*
  
  ACPI FAN DRIVER
  M:    Zhang Rui <rui.zhang@intel.com>
@@@ -752,7 -742,7 +752,7 @@@ S: Maintaine
  F:    arch/arm/mach-highbank/
  
  ARM/CAVIUM NETWORKS CNS3XXX MACHINE SUPPORT
 -M:    Anton Vorontsov <avorontsov@mvista.com>
 +M:    Anton Vorontsov <anton@enomsg.org>
  S:    Maintained
  F:    arch/arm/mach-cns3xxx/
  T:    git git://git.infradead.org/users/cbou/linux-cns3xxx.git
@@@ -807,7 -797,6 +807,7 @@@ F: arch/arm/mach-gemini
  ARM/CSR SIRFPRIMA2 MACHINE SUPPORT
  M:    Barry Song <baohua.song@csr.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/baohua/linux.git
  S:    Maintained
  F:    arch/arm/mach-prima2/
  F:    drivers/dma/sirf-dma.c
@@@ -1146,7 -1135,6 +1146,7 @@@ L:      linux-samsung-soc@vger.kernel.org (m
  S:    Maintained
  F:    arch/arm/mach-s5p*/
  F:    arch/arm/mach-exynos*/
 +N:    exynos
  
  ARM/SAMSUNG MOBILE MACHINE SUPPORT
  M:    Kyungmin Park <kyungmin.park@samsung.com>
@@@ -1165,6 -1153,15 +1165,6 @@@ L:     linux-media@vger.kernel.or
  S:    Maintained
  F:    drivers/media/platform/s5p-g2d/
  
 -ARM/SAMSUNG S5P SERIES FIMC SUPPORT
 -M:    Kyungmin Park <kyungmin.park@samsung.com>
 -M:    Sylwester Nawrocki <s.nawrocki@samsung.com>
 -L:    linux-arm-kernel@lists.infradead.org
 -L:    linux-media@vger.kernel.org
 -S:    Maintained
 -F:    arch/arm/plat-samsung/include/plat/*fimc*
 -F:    drivers/media/platform/s5p-fimc/
 -
  ARM/SAMSUNG S5P SERIES Multi Format Codec (MFC) SUPPORT
  M:    Kyungmin Park <kyungmin.park@samsung.com>
  M:    Kamil Debski <k.debski@samsung.com>
@@@ -1204,15 -1201,6 +1204,15 @@@ M:    Dinh Nguyen <dinguyen@altera.com
  S:    Maintained
  F:    drivers/clk/socfpga/
  
 +ARM/STI ARCHITECTURE
 +M:    Srinivas Kandagatla <srinivas.kandagatla@st.com>
 +M:    Stuart Menefy <stuart.menefy@st.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +L:    kernel@stlinux.com
 +W:    http://www.stlinux.com
 +S:    Maintained
 +F:    arch/arm/mach-sti/
 +
  ARM/TECHNOLOGIC SYSTEMS TS7250 MACHINE SUPPORT
  M:    Lennert Buytenhek <kernel@wantstofly.org>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -1297,7 -1285,6 +1297,7 @@@ S:      Maintaine
  F:    arch/arm/mach-vt8500/
  F:    drivers/clocksource/vt8500_timer.c
  F:    drivers/gpio/gpio-vt8500.c
 +F:    drivers/i2c/busses/i2c-wmt.c
  F:    drivers/mmc/host/wmt-sdmmc.c
  F:    drivers/pwm/pwm-vt8500.c
  F:    drivers/rtc/rtc-vt8500.c
@@@ -1322,13 -1309,6 +1322,13 @@@ W:    http://wiki.xilinx.co
  T:    git git://git.xilinx.com/linux-xlnx.git
  S:    Supported
  F:    arch/arm/mach-zynq/
 +F:    drivers/cpuidle/cpuidle-zynq.c
 +
 +ARM SMMU DRIVER
 +M:    Will Deacon <will.deacon@arm.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    drivers/iommu/arm-smmu.c
  
  ARM64 PORT (AARCH64 ARCHITECTURE)
  M:    Catalin Marinas <catalin.marinas@arm.com>
@@@ -1586,7 -1566,7 +1586,7 @@@ F:      include/net/ax25.
  F:    net/ax25/
  
  AZ6007 DVB DRIVER
 -M:    Mauro Carvalho Chehab <mchehab@redhat.com>
 +M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
@@@ -1620,7 -1600,6 +1620,7 @@@ F:      drivers/net/wireless/b43legacy
  
  BACKLIGHT CLASS/SUBSYSTEM
  M:    Richard Purdie <rpurdie@rpsys.net>
 +M:    Jingoo Han <jg1.han@samsung.com>
  S:    Maintained
  F:    drivers/video/backlight/
  F:    include/linux/backlight.h
@@@ -1642,7 -1621,7 +1642,7 @@@ S:      Maintaine
  F:    drivers/net/hamradio/baycom*
  
  BCACHE (BLOCK LAYER CACHE)
- M:    Kent Overstreet <koverstreet@google.com>
+ M:    Kent Overstreet <kmo@daterainc.com>
  L:    linux-bcache@vger.kernel.org
  W:    http://bcache.evilpiepirate.org
  S:    Maintained:
@@@ -1871,7 -1850,7 +1871,7 @@@ F:      Documentation/filesystems/btrfs.tx
  F:    fs/btrfs/
  
  BTTV VIDEO4LINUX DRIVER
 -M:    Mauro Carvalho Chehab <mchehab@redhat.com>
 +M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
@@@ -1879,13 -1858,6 +1879,13 @@@ S:    Odd fixe
  F:    Documentation/video4linux/bttv/
  F:    drivers/media/pci/bt8xx/bttv*
  
 +BUSLOGIC SCSI DRIVER
 +M:    Khalid Aziz <khalid@gonehiking.org>
 +L:    linux-scsi@vger.kernel.org
 +S:    Maintained
 +F:    drivers/scsi/BusLogic.*
 +F:    drivers/scsi/FlashPoint.*
 +
  C-MEDIA CMI8788 DRIVER
  M:    Clemens Ladisch <clemens@ladisch.de>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
@@@ -2126,12 -2098,9 +2126,12 @@@ COCCINELLE/Semantic Patches (SmPL
  M:    Julia Lawall <Julia.Lawall@lip6.fr>
  M:    Gilles Muller <Gilles.Muller@lip6.fr>
  M:    Nicolas Palix <nicolas.palix@imag.fr>
 +M:    Michal Marek <mmarek@suse.cz>
  L:    cocci@systeme.lip6.fr (moderated for non-subscribers)
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild.git misc
  W:    http://coccinelle.lip6.fr/
  S:    Supported
 +F:    Documentation/coccinelle.txt
  F:    scripts/coccinelle/
  F:    scripts/coccicheck
  
@@@ -2151,10 -2120,9 +2151,10 @@@ M:    Mike Turquette <mturquette@linaro.or
  L:    linux-arm-kernel@lists.infradead.org (same as CLK API & CLKDEV)
  T:    git git://git.linaro.org/people/mturquette/linux.git
  S:    Maintained
 -F:    drivers/clk/clk.c
 -F:    drivers/clk/clk-*
 +F:    drivers/clk/
 +X:    drivers/clk/clkdev.c
  F:    include/linux/clk-pr*
 +F:    include/linux/clk/
  
  COMMON INTERNET FILE SYSTEM (CIFS)
  M:    Steve French <sfrench@samba.org>
@@@ -2247,8 -2215,7 +2247,8 @@@ M:      Viresh Kumar <viresh.kumar@linaro.or
  L:    cpufreq@vger.kernel.org
  L:    linux-pm@vger.kernel.org
  S:    Maintained
 -T:    git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
 +T:    git git://git.linaro.org/people/vireshk/linux.git (For ARM Updates)
  F:    drivers/cpufreq/
  F:    include/linux/cpufreq.h
  
@@@ -2332,11 -2299,6 +2332,11 @@@ M:    Jaya Kumar <jayakumar.alsa@gmail.com
  S:    Maintained
  F:    sound/pci/cs5535audio/
  
 +CW1200 WLAN driver
 +M:     Solomon Peachy <pizza@shaftnet.org>
 +S:     Maintained
 +F:     drivers/net/wireless/cw1200/
 +
  CX18 VIDEO4LINUX DRIVER
  M:    Andy Walls <awalls@md.metrocast.net>
  L:    ivtv-devel@ivtvdriver.org (moderated for non-subscribers)
@@@ -2359,7 -2321,7 +2359,7 @@@ F:      drivers/media/common/cx2341x
  F:    include/media/cx2341x*
  
  CX88 VIDEO4LINUX DRIVER
 -M:    Mauro Carvalho Chehab <mchehab@redhat.com>
 +M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
@@@ -2554,7 -2516,7 +2554,7 @@@ F:      drivers/usb/dwc3
  DEVICE FREQUENCY (DEVFREQ)
  M:    MyungJoo Ham <myungjoo.ham@samsung.com>
  M:    Kyungmin Park <kyungmin.park@samsung.com>
 -L:    linux-kernel@vger.kernel.org
 +L:    linux-pm@vger.kernel.org
  S:    Maintained
  F:    drivers/devfreq/
  
@@@ -2565,7 -2527,6 +2565,7 @@@ S:      Maintaine
  
  DEVICE-MAPPER  (LVM)
  M:    Alasdair Kergon <agk@redhat.com>
 +M:    Mike Snitzer <snitzer@redhat.com>
  M:    dm-devel@redhat.com
  L:    dm-devel@redhat.com
  W:    http://sources.redhat.com/dm
@@@ -2577,7 -2538,6 +2577,7 @@@ F:      drivers/md/dm
  F:    drivers/md/persistent-data/
  F:    include/linux/device-mapper.h
  F:    include/linux/dm-*.h
 +F:    include/uapi/linux/dm-*.h
  
  DIOLAN U2C-12 I2C DRIVER
  M:    Guenter Roeck <linux@roeck-us.net>
@@@ -2737,14 -2697,12 +2737,14 @@@ F:   include/drm/exynos
  F:    include/uapi/drm/exynos*
  
  DRM DRIVERS FOR NVIDIA TEGRA
 -M:    Thierry Reding <thierry.reding@avionic-design.de>
 +M:    Thierry Reding <thierry.reding@gmail.com>
 +M:    Terje Bergström <tbergstrom@nvidia.com>
  L:    dri-devel@lists.freedesktop.org
  L:    linux-tegra@vger.kernel.org
 -T:    git git://gitorious.org/thierryreding/linux.git
 +T:    git git://anongit.freedesktop.org/tegra/linux.git
  S:    Maintained
 -F:    drivers/gpu/drm/tegra/
 +F:    drivers/gpu/host1x/
 +F:    include/uapi/drm/tegra_drm.h
  F:    Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt
  
  DSBR100 USB FM RADIO DRIVER
@@@ -2981,7 -2939,7 +2981,7 @@@ S:      Maintaine
  F:    drivers/edac/e7xxx_edac.c
  
  EDAC-GHES
 -M:    Mauro Carvalho Chehab <mchehab@redhat.com>
 +M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
  L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Maintained
@@@ -3009,21 -2967,21 +3009,21 @@@ S:   Maintaine
  F:    drivers/edac/i5000_edac.c
  
  EDAC-I5400
 -M:    Mauro Carvalho Chehab <mchehab@redhat.com>
 +M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
  L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Maintained
  F:    drivers/edac/i5400_edac.c
  
  EDAC-I7300
 -M:    Mauro Carvalho Chehab <mchehab@redhat.com>
 +M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
  L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Maintained
  F:    drivers/edac/i7300_edac.c
  
  EDAC-I7CORE
 -M:    Mauro Carvalho Chehab <mchehab@redhat.com>
 +M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
  L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Maintained
@@@ -3052,7 -3010,7 +3052,7 @@@ S:      Maintaine
  F:    drivers/edac/r82600_edac.c
  
  EDAC-SBRIDGE
 -M:    Mauro Carvalho Chehab <mchehab@redhat.com>
 +M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
  L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Maintained
@@@ -3112,7 -3070,7 +3112,7 @@@ S:      Maintaine
  F:    drivers/net/ethernet/ibm/ehea/
  
  EM28XX VIDEO4LINUX DRIVER
 -M:    Mauro Carvalho Chehab <mchehab@redhat.com>
 +M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
@@@ -3145,13 -3103,6 +3145,13 @@@ M:    Maxim Levitsky <maximlevitsky@gmail.
  S:    Maintained
  F:    drivers/media/rc/ene_ir.*
  
 +ENHANCED ERROR HANDLING (EEH)
 +M:    Gavin Shan <shangw@linux.vnet.ibm.com>
 +L:    linuxppc-dev@lists.ozlabs.org
 +S:    Supported
 +F:    Documentation/powerpc/eeh-pci-error-recovery.txt
 +F:    arch/powerpc/kernel/eeh*.c
 +
  EPSON S1D13XXX FRAMEBUFFER DRIVER
  M:    Kristoffer Ericson <kristoffer.ericson@gmail.com>
  S:    Maintained
@@@ -3269,7 -3220,7 +3269,7 @@@ F:      lib/fault-inject.
  
  FCOE SUBSYSTEM (libfc, libfcoe, fcoe)
  M:    Robert Love <robert.w.love@intel.com>
 -L:    devel@open-fcoe.org
 +L:    fcoe-devel@open-fcoe.org
  W:    www.Open-FCoE.org
  S:    Supported
  F:    drivers/scsi/libfc/
@@@ -3346,7 -3297,7 +3346,7 @@@ F:      Documentation/firmware_class
  F:    drivers/base/firmware*.c
  F:    include/linux/firmware.h
  
- FLASHSYSTEM DRIVER (IBM FlashSystem 70/80 PCI SSD Flash Card)
+ FLASH ADAPTER DRIVER (IBM Flash Adapter 900GB Full Height PCI Flash Card)
  M:    Joshua Morris <josh.h.morris@us.ibm.com>
  M:    Philip Kelleher <pjk1939@linux.vnet.ibm.com>
  S:    Maintained
@@@ -3358,15 -3309,6 +3358,15 @@@ T:    git git://git.kernel.org/pub/scm/lin
  S:    Odd fixes
  F:    drivers/block/floppy.c
  
 +FMC SUBSYSTEM
 +M:    Alessandro Rubini <rubini@gnudd.com>
 +W:    http://www.ohwr.org/projects/fmc-bus
 +S:    Supported
 +F:    drivers/fmc/
 +F:    include/linux/fmc*.h
 +F:    include/linux/ipmi-fru.h
 +K:    fmc_d.*register
 +
  FPU EMULATOR
  M:    Bill Metzenthen <billm@melbpc.org.au>
  W:    http://floatingpoint.sourceforge.net/emulator/index.html
@@@ -3625,7 -3567,6 +3625,7 @@@ GPIO SUBSYSTE
  M:    Grant Likely <grant.likely@linaro.org>
  M:    Linus Walleij <linus.walleij@linaro.org>
  S:    Maintained
 +L:    linux-gpio@vger.kernel.org
  T:    git git://git.secretlab.ca/git/linux-2.6.git
  F:    Documentation/gpio.txt
  F:    drivers/gpio/
@@@ -4038,8 -3979,7 +4038,8 @@@ S:      Maintaine
  F:    arch/ia64/
  
  IBM Power in-Nest Crypto Acceleration
 -M:    Kent Yoder <key@linux.vnet.ibm.com>
 +M:    Marcelo Henrique Cerri <mhcerri@linux.vnet.ibm.com>
 +M:    Fionnuala Gunter <fin@linux.vnet.ibm.com>
  L:    linux-crypto@vger.kernel.org
  S:    Supported
  F:    drivers/crypto/nx/
@@@ -4168,7 -4108,6 +4168,7 @@@ F:      drivers/ipack
  
  INTEGRITY MEASUREMENT ARCHITECTURE (IMA)
  M:    Mimi Zohar <zohar@us.ibm.com>
 +M:    Dmitry Kasatkin <d.kasatkin@samsung.com>
  S:    Supported
  F:    security/integrity/ima/
  
@@@ -4638,7 -4577,7 +4638,7 @@@ F:      fs/jbd2
  F:    include/linux/jbd2.h
  
  JSM Neo PCI based serial card
 -M:    Lucas Tavares <lucaskt@linux.vnet.ibm.com>
 +M:    Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
  L:    linux-serial@vger.kernel.org
  S:    Maintained
  F:    drivers/tty/serial/jsm/
@@@ -4772,23 -4711,14 +4772,23 @@@ F:   arch/s390/kvm
  F:    drivers/s390/kvm/
  
  KERNEL VIRTUAL MACHINE (KVM) FOR ARM
 -M:    Christoffer Dall <cdall@cs.columbia.edu>
 +M:    Christoffer Dall <christoffer.dall@linaro.org>
  L:    kvmarm@lists.cs.columbia.edu
  W:    http://systems.cs.columbia.edu/projects/kvm-arm
 -S:    Maintained
 +S:    Supported
  F:    arch/arm/include/uapi/asm/kvm*
  F:    arch/arm/include/asm/kvm*
  F:    arch/arm/kvm/
  
 +KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64)
 +M:    Marc Zyngier <marc.zyngier@arm.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +L:    kvmarm@lists.cs.columbia.edu
 +S:    Maintained
 +F:    arch/arm64/include/uapi/asm/kvm*
 +F:    arch/arm64/include/asm/kvm*
 +F:    arch/arm64/kvm/
 +
  KEXEC
  M:    Eric Biederman <ebiederm@xmission.com>
  W:    http://kernel.org/pub/linux/utils/kernel/kexec/
@@@ -5308,7 -5238,7 +5308,7 @@@ S:      Maintaine
  F:    drivers/media/radio/radio-maxiradio*
  
  MEDIA INPUT INFRASTRUCTURE (V4L/DVB)
 -M:    Mauro Carvalho Chehab <mchehab@redhat.com>
 +M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
  P:    LinuxTV.org Project
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
@@@ -5387,12 -5317,6 +5387,12 @@@ F:    drivers/mtd
  F:    include/linux/mtd/
  F:    include/uapi/mtd/
  
 +MEN A21 WATCHDOG DRIVER
 +M:    Johannes Thumshirn <johannes.thumshirn@men.de>
 +L:    linux-watchdog@vger.kernel.org
 +S:    Supported
 +F:    drivers/watchdog/mena21_wdt.c
 +
  METAG ARCHITECTURE
  M:    James Hogan <james.hogan@imgtec.com>
  S:    Supported
@@@ -5436,28 -5360,6 +5436,28 @@@ W:    http://linuxtv.or
  S:    Odd Fixes
  F:    drivers/media/radio/radio-miropcm20*
  
 +Mellanox MLX5 core VPI driver
 +M:    Eli Cohen <eli@mellanox.com>
 +L:    netdev@vger.kernel.org
 +L:    linux-rdma@vger.kernel.org
 +W:    http://www.mellanox.com
 +Q:    http://patchwork.ozlabs.org/project/netdev/list/
 +Q:    http://patchwork.kernel.org/project/linux-rdma/list/
 +T:    git://openfabrics.org/~eli/connect-ib.git
 +S:    Supported
 +F:    drivers/net/ethernet/mellanox/mlx5/core/
 +F:    include/linux/mlx5/
 +
 +Mellanox MLX5 IB driver
 +M:      Eli Cohen <eli@mellanox.com>
 +L:      linux-rdma@vger.kernel.org
 +W:      http://www.mellanox.com
 +Q:      http://patchwork.kernel.org/project/linux-rdma/list/
 +T:      git://openfabrics.org/~eli/connect-ib.git
 +S:      Supported
 +F:      include/linux/mlx5/
 +F:      drivers/infiniband/hw/mlx5/
 +
  MODULE SUPPORT
  M:    Rusty Russell <rusty@rustcorp.com.au>
  S:    Maintained
@@@ -5530,12 -5432,9 +5530,12 @@@ F:    include/media/mt9v032.
  
  MULTIFUNCTION DEVICES (MFD)
  M:    Samuel Ortiz <sameo@linux.intel.com>
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6.git
 +M:    Lee Jones <lee.jones@linaro.org>
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-fixes.git
  S:    Supported
  F:    drivers/mfd/
 +F:    include/linux/mfd/
  
  MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND SDIO SUBSYSTEM
  M:    Chris Ball <cjb@laptop.org>
@@@ -6035,10 -5934,8 +6035,10 @@@ M:    Willem Riede <osst@riede.org
  L:    osst-users@lists.sourceforge.net
  L:    linux-scsi@vger.kernel.org
  S:    Maintained
 -F:    drivers/scsi/osst*
 -F:    drivers/scsi/st*
 +F:    Documentation/scsi/osst.txt
 +F:    drivers/scsi/osst.*
 +F:    drivers/scsi/osst_*.h
 +F:    drivers/scsi/st.h
  
  OPENCORES I2C BUS DRIVER
  M:    Peter Korsgaard <jacmet@sunsite.dk>
@@@ -6252,6 -6149,7 +6252,6 @@@ M:      Linas Vepstas <linasvepstas@gmail.co
  L:    linux-pci@vger.kernel.org
  S:    Supported
  F:    Documentation/PCI/pci-error-recovery.txt
 -F:    Documentation/powerpc/eeh-pci-error-recovery.txt
  
  PCI SUBSYSTEM
  M:    Bjorn Helgaas <bhelgaas@google.com>
@@@ -6367,16 -6265,6 +6367,16 @@@ L:    linux-arm-kernel@lists.infradead.or
  S:    Maintained
  F:    drivers/pinctrl/pinctrl-at91.c
  
 +PIN CONTROLLER - SAMSUNG
 +M:    Tomasz Figa <t.figa@samsung.com>
 +M:    Thomas Abraham <thomas.abraham@linaro.org>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +L:    linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    drivers/pinctrl/pinctrl-exynos.*
 +F:    drivers/pinctrl/pinctrl-s3c*
 +F:    drivers/pinctrl/pinctrl-samsung.*
 +
  PIN CONTROLLER - ST SPEAR
  M:    Viresh Kumar <viresh.linux@gmail.com>
  L:    spear-devel@list.st.com
@@@ -6436,7 -6324,7 +6436,7 @@@ F:      include/linux/timer
  F:    kernel/*timer*
  
  POWER SUPPLY CLASS/SUBSYSTEM and DRIVERS
 -M:    Anton Vorontsov <cbou@mail.ru>
 +M:    Anton Vorontsov <anton@enomsg.org>
  M:    David Woodhouse <dwmw2@infradead.org>
  T:    git git://git.infradead.org/battery-2.6.git
  S:    Maintained
@@@ -6546,7 -6434,7 +6546,7 @@@ S:      Maintaine
  F:    drivers/block/ps3vram.c
  
  PSTORE FILESYSTEM
 -M:    Anton Vorontsov <cbouatmailru@gmail.com>
 +M:    Anton Vorontsov <anton@enomsg.org>
  M:    Colin Cross <ccross@android.com>
  M:    Kees Cook <keescook@chromium.org>
  M:    Tony Luck <tony.luck@intel.com>
@@@ -6598,8 -6486,8 +6598,8 @@@ S:      Maintaine
  F:    drivers/media/usb/pwc/*
  
  PWM SUBSYSTEM
 -M:    Thierry Reding <thierry.reding@avionic-design.de>
 -L:    linux-kernel@vger.kernel.org
 +M:    Thierry Reding <thierry.reding@gmail.com>
 +L:    linux-pwm@vger.kernel.org
  S:    Maintained
  W:    http://gitorious.org/linux-pwm
  T:    git git://gitorious.org/linux-pwm/linux-pwm.git
@@@ -6681,12 -6569,10 +6681,12 @@@ F:   Documentation/networking/LICENSE.qla
  F:    drivers/net/ethernet/qlogic/qla3xxx.*
  
  QLOGIC QLCNIC (1/10)Gb ETHERNET DRIVER
 +M:    Himanshu Madhani <himanshu.madhani@qlogic.com>
  M:    Rajesh Borundia <rajesh.borundia@qlogic.com>
  M:    Shahed Shaikh <shahed.shaikh@qlogic.com>
  M:    Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
  M:    Sony Chacko <sony.chacko@qlogic.com>
 +M:    Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
  M:    linux-driver@qlogic.com
  L:    netdev@vger.kernel.org
  S:    Supported
@@@ -7034,7 -6920,7 +7034,7 @@@ S:      Odd Fixe
  F:    drivers/media/i2c/saa6588*
  
  SAA7134 VIDEO4LINUX DRIVER
 -M:    Mauro Carvalho Chehab <mchehab@redhat.com>
 +M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
@@@ -7079,15 -6965,6 +7079,15 @@@ F:    drivers/regulator/s5m*.
  F:    drivers/rtc/rtc-sec.c
  F:    include/linux/mfd/samsung/
  
 +SAMSUNG S5P/EXYNOS4 SOC SERIES CAMERA SUBSYSTEM DRIVERS
 +M:    Kyungmin Park <kyungmin.park@samsung.com>
 +M:    Sylwester Nawrocki <s.nawrocki@samsung.com>
 +L:    linux-media@vger.kernel.org
 +Q:    https://patchwork.linuxtv.org/project/linux-media/list/
 +S:    Supported
 +F:    drivers/media/platform/exynos4-is/
 +F:    include/media/s5p_fimc.h
 +
  SAMSUNG S3C24XX/S3C64XX SOC SERIES CAMIF DRIVER
  M:    Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
  L:    linux-media@vger.kernel.org
@@@ -7113,7 -6990,8 +7113,7 @@@ SYNOPSYS DESIGNWARE DMAC DRIVE
  M:    Viresh Kumar <viresh.linux@gmail.com>
  S:    Maintained
  F:    include/linux/dw_dmac.h
 -F:    drivers/dma/dw_dmac_regs.h
 -F:    drivers/dma/dw_dmac.c
 +F:    drivers/dma/dw/
  
  SYNOPSYS DESIGNWARE MMC/SD/SDIO DRIVER
  M:    Seungwon Jeon <tgih.jun@samsung.com>
@@@ -7205,8 -7083,7 +7205,8 @@@ M:      Kai Mäkisara <Kai.Makisara@kolumbus
  L:    linux-scsi@vger.kernel.org
  S:    Maintained
  F:    Documentation/scsi/st.txt
 -F:    drivers/scsi/st*
 +F:    drivers/scsi/st.*
 +F:    drivers/scsi/st_*.h
  
  SCTP PROTOCOL
  M:    Vlad Yasevich <vyasevich@gmail.com>
@@@ -7255,7 -7132,7 +7255,7 @@@ F:      drivers/mmc/host/sdhci.
  F:    drivers/mmc/host/sdhci-pltfm.[ch]
  
  SECURE DIGITAL HOST CONTROLLER INTERFACE, OPEN FIRMWARE BINDINGS (SDHCI-OF)
 -M:    Anton Vorontsov <avorontsov@ru.mvista.com>
 +M:    Anton Vorontsov <anton@enomsg.org>
  L:    linuxppc-dev@lists.ozlabs.org
  L:    linux-mmc@vger.kernel.org
  S:    Maintained
@@@ -7405,7 -7282,7 +7405,7 @@@ S:      Odd Fixe
  F:    drivers/media/radio/radio-si4713.h
  
  SIANO DVB DRIVER
 -M:    Mauro Carvalho Chehab <mchehab@redhat.com>
 +M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
@@@ -7790,7 -7667,6 +7790,7 @@@ STABLE BRANC
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  L:    stable@vger.kernel.org
  S:    Supported
 +F:    Documentation/stable_kernel_rules.txt
  
  STAGING SUBSYSTEM
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
@@@ -7907,7 -7783,7 +7907,7 @@@ F:      drivers/staging/media/solo6x10
  STAGING - SPEAKUP CONSOLE SPEECH DRIVER
  M:    William Hubbs <w.d.hubbs@gmail.com>
  M:    Chris Brannon <chris@the-brannons.com>
 -M:    Kirk Reiser <kirk@braille.uwo.ca>
 +M:    Kirk Reiser <kirk@reisers.ca>
  M:    Samuel Thibault <samuel.thibault@ens-lyon.org>
  L:    speakup@braille.uwo.ca
  W:    http://www.linux-speakup.org/
@@@ -8110,7 -7986,7 +8110,7 @@@ S:      Maintaine
  F:    drivers/media/i2c/tda9840*
  
  TEA5761 TUNER DRIVER
 -M:    Mauro Carvalho Chehab <mchehab@redhat.com>
 +M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
@@@ -8118,7 -7994,7 +8118,7 @@@ S:      Odd fixe
  F:    drivers/media/tuners/tea5761.*
  
  TEA5767 TUNER DRIVER
 -M:    Mauro Carvalho Chehab <mchehab@redhat.com>
 +M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
@@@ -8191,7 -8067,6 +8191,7 @@@ M:      Zhang Rui <rui.zhang@intel.com
  M:      Eduardo Valentin <eduardo.valentin@ti.com>
  L:      linux-pm@vger.kernel.org
  T:      git git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git
 +T:      git git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git
  Q:      https://patchwork.kernel.org/project/linux-pm/list/
  S:      Supported
  F:      drivers/thermal/
@@@ -8216,8 -8091,8 +8216,8 @@@ F:      drivers/platform/x86/thinkpad_acpi.
  TI BANDGAP AND THERMAL DRIVER
  M:    Eduardo Valentin <eduardo.valentin@ti.com>
  L:    linux-pm@vger.kernel.org
 -S:    Maintained
 -F:    drivers/staging/omap-thermal/
 +S:    Supported
 +F:    drivers/thermal/ti-soc-thermal/
  
  TI FLASH MEDIA INTERFACE DRIVER
  M:    Alex Dubov <oakad@yahoo.com>
@@@ -8357,7 -8232,7 +8357,7 @@@ F:      include/linux/shmem_fs.
  F:    mm/shmem.c
  
  TM6000 VIDEO4LINUX DRIVER
 -M:    Mauro Carvalho Chehab <mchehab@redhat.com>
 +M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
@@@ -8365,8 -8240,7 +8365,8 @@@ S:      Odd fixe
  F:    drivers/media/usb/tm6000/
  
  TPM DEVICE DRIVER
 -M:    Kent Yoder <key@linux.vnet.ibm.com>
 +M:    Leonidas Da Silva Barbosa <leosilva@linux.vnet.ibm.com>
 +M:    Ashley Lai <ashley@ashleylai.com>
  M:    Rajiv Andrade <mail@srajiv.net>
  W:    http://tpmdd.sourceforge.net
  M:    Marcel Selhorst <tpmdd@selhorst.net>
@@@ -8926,7 -8800,6 +8926,7 @@@ M:      "Michael S. Tsirkin" <mst@redhat.com
  L:    virtualization@lists.linux-foundation.org
  S:    Maintained
  F:    drivers/virtio/
 +F:    tools/virtio/
  F:    drivers/net/virtio_net.c
  F:    drivers/block/virtio_blk.c
  F:    include/linux/virtio_*.h
@@@ -9022,7 -8895,7 +9022,7 @@@ M:      Liam Girdwood <lgirdwood@gmail.com
  M:    Mark Brown <broonie@kernel.org>
  W:    http://opensource.wolfsonmicro.com/node/15
  W:    http://www.slimlogic.co.uk/?p=48
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lrg/regulator.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git
  S:    Supported
  F:    drivers/regulator/
  F:    include/linux/regulator/
@@@ -9214,7 -9087,7 +9214,7 @@@ S:      Maintaine
  F:    arch/x86/kernel/cpu/mcheck/*
  
  XC2028/3028 TUNER DRIVER
 -M:    Mauro Carvalho Chehab <mchehab@redhat.com>
 +M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
@@@ -9241,13 -9114,6 +9241,13 @@@ S:    Supporte
  F:    arch/arm/xen/
  F:    arch/arm/include/asm/xen/
  
 +XEN HYPERVISOR ARM64
 +M:    Stefano Stabellini <stefano.stabellini@eu.citrix.com>
 +L:    xen-devel@lists.xensource.com (moderated for non-subscribers)
 +S:    Supported
 +F:    arch/arm64/xen/
 +F:    arch/arm64/include/asm/xen/
 +
  XEN NETWORK BACKEND DRIVER
  M:    Ian Campbell <ian.campbell@citrix.com>
  L:    xen-devel@lists.xensource.com (moderated for non-subscribers)
@@@ -9321,13 -9187,6 +9321,13 @@@ F:    Documentation/networking/z8530drv.tx
  F:    drivers/net/hamradio/*scc.c
  F:    drivers/net/hamradio/z8530.h
  
 +ZBUD COMPRESSED PAGE ALLOCATOR
 +M:    Seth Jennings <sjenning@linux.vnet.ibm.com>
 +L:    linux-mm@kvack.org
 +S:    Maintained
 +F:    mm/zbud.c
 +F:    include/linux/zbud.h
 +
  ZD1211RW WIRELESS DRIVER
  M:    Daniel Drake <dsd@gentoo.org>
  M:    Ulrich Kunitz <kune@deine-taler.de>
@@@ -9350,12 -9209,6 +9350,12 @@@ M:    "Maciej W. Rozycki" <macro@linux-mip
  S:    Maintained
  F:    drivers/tty/serial/zs.*
  
 +ZSWAP COMPRESSED SWAP CACHING
 +M:    Seth Jennings <sjenning@linux.vnet.ibm.com>
 +L:    linux-mm@kvack.org
 +S:    Maintained
 +F:    mm/zswap.c
 +
  THE REST
  M:    Linus Torvalds <torvalds@linux-foundation.org>
  L:    linux-kernel@vger.kernel.org
index 04608a6502d7b25bec73a51da69e1e2748e960c4,2e5b69d612ac4b89625ec7690796563b27d893be..fe5c3cd10c341045ca63aeacb15edc93c185a88b
@@@ -93,17 -93,22 +93,22 @@@ static void xen_update_blkif_status(str
        }
        invalidate_inode_pages2(blkif->vbd.bdev->bd_inode->i_mapping);
  
 -      blkif->xenblkd = kthread_run(xen_blkif_schedule, blkif, name);
 +      blkif->xenblkd = kthread_run(xen_blkif_schedule, blkif, "%s", name);
        if (IS_ERR(blkif->xenblkd)) {
                err = PTR_ERR(blkif->xenblkd);
                blkif->xenblkd = NULL;
                xenbus_dev_error(blkif->be->dev, err, "start xenblkd");
+               return;
        }
  }
  
  static struct xen_blkif *xen_blkif_alloc(domid_t domid)
  {
        struct xen_blkif *blkif;
+       struct pending_req *req, *n;
+       int i, j;
+       BUILD_BUG_ON(MAX_INDIRECT_PAGES > BLKIF_MAX_INDIRECT_PAGES_PER_REQUEST);
  
        blkif = kmem_cache_zalloc(xen_blkif_cachep, GFP_KERNEL);
        if (!blkif)
        blkif->st_print = jiffies;
        init_waitqueue_head(&blkif->waiting_to_free);
        blkif->persistent_gnts.rb_node = NULL;
+       spin_lock_init(&blkif->free_pages_lock);
+       INIT_LIST_HEAD(&blkif->free_pages);
+       blkif->free_pages_num = 0;
+       atomic_set(&blkif->persistent_gnt_in_use, 0);
+       INIT_LIST_HEAD(&blkif->pending_free);
+       for (i = 0; i < XEN_BLKIF_REQS; i++) {
+               req = kzalloc(sizeof(*req), GFP_KERNEL);
+               if (!req)
+                       goto fail;
+               list_add_tail(&req->free_list,
+                             &blkif->pending_free);
+               for (j = 0; j < MAX_INDIRECT_SEGMENTS; j++) {
+                       req->segments[j] = kzalloc(sizeof(*req->segments[0]),
+                                                  GFP_KERNEL);
+                       if (!req->segments[j])
+                               goto fail;
+               }
+               for (j = 0; j < MAX_INDIRECT_PAGES; j++) {
+                       req->indirect_pages[j] = kzalloc(sizeof(*req->indirect_pages[0]),
+                                                        GFP_KERNEL);
+                       if (!req->indirect_pages[j])
+                               goto fail;
+               }
+       }
+       spin_lock_init(&blkif->pending_free_lock);
+       init_waitqueue_head(&blkif->pending_free_wq);
+       init_waitqueue_head(&blkif->shutdown_wq);
  
        return blkif;
+ fail:
+       list_for_each_entry_safe(req, n, &blkif->pending_free, free_list) {
+               list_del(&req->free_list);
+               for (j = 0; j < MAX_INDIRECT_SEGMENTS; j++) {
+                       if (!req->segments[j])
+                               break;
+                       kfree(req->segments[j]);
+               }
+               for (j = 0; j < MAX_INDIRECT_PAGES; j++) {
+                       if (!req->indirect_pages[j])
+                               break;
+                       kfree(req->indirect_pages[j]);
+               }
+               kfree(req);
+       }
+       kmem_cache_free(xen_blkif_cachep, blkif);
+       return ERR_PTR(-ENOMEM);
  }
  
  static int xen_blkif_map(struct xen_blkif *blkif, unsigned long shared_page,
@@@ -178,6 -232,7 +232,7 @@@ static void xen_blkif_disconnect(struc
  {
        if (blkif->xenblkd) {
                kthread_stop(blkif->xenblkd);
+               wake_up(&blkif->shutdown_wq);
                blkif->xenblkd = NULL;
        }
  
  
  static void xen_blkif_free(struct xen_blkif *blkif)
  {
+       struct pending_req *req, *n;
+       int i = 0, j;
        if (!atomic_dec_and_test(&blkif->refcnt))
                BUG();
+       /* Check that there is no request in use */
+       list_for_each_entry_safe(req, n, &blkif->pending_free, free_list) {
+               list_del(&req->free_list);
+               for (j = 0; j < MAX_INDIRECT_SEGMENTS; j++)
+                       kfree(req->segments[j]);
+               for (j = 0; j < MAX_INDIRECT_PAGES; j++)
+                       kfree(req->indirect_pages[j]);
+               kfree(req);
+               i++;
+       }
+       WARN_ON(i != XEN_BLKIF_REQS);
        kmem_cache_free(xen_blkif_cachep, blkif);
  }
  
@@@ -678,6 -753,11 +753,11 @@@ again
                                 dev->nodename);
                goto abort;
        }
+       err = xenbus_printf(xbt, dev->nodename, "feature-max-indirect-segments", "%u",
+                           MAX_INDIRECT_SEGMENTS);
+       if (err)
+               dev_warn(&dev->dev, "writing %s/feature-max-indirect-segments (%d)",
+                        dev->nodename, err);
  
        err = xenbus_printf(xbt, dev->nodename, "sectors", "%llu",
                            (unsigned long long)vbd_sz(&be->blkif->vbd));
                                 dev->nodename);
                goto abort;
        }
+       err = xenbus_printf(xbt, dev->nodename, "physical-sector-size", "%u",
+                           bdev_physical_block_size(be->blkif->vbd.bdev));
+       if (err)
+               xenbus_dev_error(dev, err, "writing %s/physical-sector-size",
+                                dev->nodename);
  
        err = xenbus_transaction_end(xbt, 0);
        if (err == -EAGAIN)
diff --combined drivers/md/bcache/bset.c
index 1d27d3af32514055e7512a677395c709a713c28c,a0f190ac17a4bdc6fef206769577f386269a4554..8010eed06a51c8320786a1c49463c98c8aa70555
@@@ -78,6 -78,7 +78,7 @@@ struct bkey *bch_keylist_pop(struct key
  bool __bch_ptr_invalid(struct cache_set *c, int level, const struct bkey *k)
  {
        unsigned i;
+       char buf[80];
  
        if (level && (!KEY_PTRS(k) || !KEY_SIZE(k) || KEY_DIRTY(k)))
                goto bad;
  
        return false;
  bad:
-       cache_bug(c, "spotted bad key %s: %s", pkey(k), bch_ptr_status(c, k));
+       bch_bkey_to_text(buf, sizeof(buf), k);
+       cache_bug(c, "spotted bad key %s: %s", buf, bch_ptr_status(c, k));
        return true;
  }
  
@@@ -162,10 -164,16 +164,16 @@@ bool bch_ptr_bad(struct btree *b, cons
  #ifdef CONFIG_BCACHE_EDEBUG
  bug:
        mutex_unlock(&b->c->bucket_lock);
-       btree_bug(b,
+       {
+               char buf[80];
+               bch_bkey_to_text(buf, sizeof(buf), k);
+               btree_bug(b,
  "inconsistent pointer %s: bucket %zu pin %i prio %i gen %i last_gc %i mark %llu gc_gen %i",
-                 pkey(k), PTR_BUCKET_NR(b->c, k, i), atomic_read(&g->pin),
-                 g->prio, g->gen, g->last_gc, GC_MARK(g), g->gc_gen);
+                         buf, PTR_BUCKET_NR(b->c, k, i), atomic_read(&g->pin),
+                         g->prio, g->gen, g->last_gc, GC_MARK(g), g->gc_gen);
+       }
        return true;
  #endif
  }
@@@ -395,7 -403,7 +403,7 @@@ void inorder_test(void
  #endif
  
  /*
 - * Cacheline/offset <-> bkey pointer arithmatic:
 + * Cacheline/offset <-> bkey pointer arithmetic:
   *
   * t->tree is a binary search tree in an array; each node corresponds to a key
   * in one cacheline in t->set (BSET_CACHELINE bytes).
   * the binary tree points to; to_inorder() gives us the cacheline, and then
   * bkey_float->m gives us the offset within that cacheline, in units of 8 bytes.
   *
 - * cacheline_to_bkey() and friends abstract out all the pointer arithmatic to
 + * cacheline_to_bkey() and friends abstract out all the pointer arithmetic to
   * make this work.
   *
   * To construct the bfloat for an arbitrary key we need to know what the key
@@@ -1084,33 -1092,39 +1092,39 @@@ void bch_btree_sort_into(struct btree *
        new->sets->size = 0;
  }
  
+ #define SORT_CRIT     (4096 / sizeof(uint64_t))
  void bch_btree_sort_lazy(struct btree *b)
  {
-       if (b->nsets) {
-               unsigned i, j, keys = 0, total;
+       unsigned crit = SORT_CRIT;
+       int i;
  
-               for (i = 0; i <= b->nsets; i++)
-                       keys += b->sets[i].data->keys;
-               total = keys;
+       /* Don't sort if nothing to do */
+       if (!b->nsets)
+               goto out;
  
-               for (j = 0; j < b->nsets; j++) {
-                       if (keys * 2 < total ||
-                           keys < 1000) {
-                               bch_btree_sort_partial(b, j);
-                               return;
-                       }
+       /* If not a leaf node, always sort */
+       if (b->level) {
+               bch_btree_sort(b);
+               return;
+       }
  
-                       keys -= b->sets[j].data->keys;
-               }
+       for (i = b->nsets - 1; i >= 0; --i) {
+               crit *= b->c->sort_crit_factor;
  
-               /* Must sort if b->nsets == 3 or we'll overflow */
-               if (b->nsets >= (MAX_BSETS - 1) - b->level) {
-                       bch_btree_sort(b);
+               if (b->sets[i].data->keys < crit) {
+                       bch_btree_sort_partial(b, i);
                        return;
                }
        }
  
+       /* Sort if we'd overflow */
+       if (b->nsets + 1 == MAX_BSETS) {
+               bch_btree_sort(b);
+               return;
+       }
+ out:
        bset_build_written_tree(b);
  }