1. 23 Dec, 2011 1 commit
  2. 17 Dec, 2011 1 commit
  3. 16 Dec, 2011 22 commits
  4. 15 Dec, 2011 16 commits
    • Linus Torvalds's avatar
      6f12d2ee
    • Linus Torvalds's avatar
      Merge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 88703f27
      Linus Torvalds authored
      * 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: r8712u: Add new USB ID
        staging: tidspbridge: request dmtimer clocks on init
        staging: tidspbridge: include module.h by default
      88703f27
    • Linus Torvalds's avatar
      Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · f242bbc5
      Linus Torvalds authored
      * 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        USB: option: Removing one bogus and adding some new Huawei combinations
        USB: cdc-acm: add IDs for Motorola H24 HSPA USB module.
        usb: option: Add Huawei E398 controlling interfaces
        usb: renesas_usbhs: add hcd->has_tt for low/full speed
        usb: renesas_usbhs: typofix: irq_dtch control DTCHE
        usb: gadget: storage: release superspeed descriptors.
      f242bbc5
    • Uwe Kleine-König's avatar
      ARM: unwinder: fix bisection to find origin in .idx section · ddf5a25c
      Uwe Kleine-König authored
      The bisection implemented in unwind_find_origin() stopped to early.  If
      there is only a single entry left to check the original code just took
      the end point as origin which might be wrong.
      
      This was introduced in commit de66a979 ("ARM: 7187/1: fix unwinding
      for XIP kernels").
      Reported-and-tested-by: default avatarNick Bowler <nbowler@elliptictech.com>
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ddf5a25c
    • Chris Mason's avatar
      Btrfs: unplug every once and a while · d85c8a6f
      Chris Mason authored
      The btrfs io submission threads can build up massive plug lists.  This
      keeps things more reasonable so we don't hand over huge dumps of IO at
      once.
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      d85c8a6f
    • Tejun Heo's avatar
      block: don't kick empty queue in blk_drain_queue() · 4eabc941
      Tejun Heo authored
      While probing, fd sets up queue, probes hardware and tears down the
      queue if probing fails.  In the process, blk_drain_queue() kicks the
      queue which failed to finish initialization and fd is unhappy about
      that.
      
        floppy0: no floppy controllers found
        ------------[ cut here ]------------
        WARNING: at drivers/block/floppy.c:2929 do_fd_request+0xbf/0xd0()
        Hardware name: To Be Filled By O.E.M.
        VFS: do_fd_request called on non-open device
        Modules linked in:
        Pid: 1, comm: swapper Not tainted 3.2.0-rc4-00077-g5983fe2b #2
        Call Trace:
         [<ffffffff81039a6a>] warn_slowpath_common+0x7a/0xb0
         [<ffffffff81039b41>] warn_slowpath_fmt+0x41/0x50
         [<ffffffff813d657f>] do_fd_request+0xbf/0xd0
         [<ffffffff81322b95>] blk_drain_queue+0x65/0x80
         [<ffffffff81322c93>] blk_cleanup_queue+0xe3/0x1a0
         [<ffffffff818a809d>] floppy_init+0xdeb/0xe28
         [<ffffffff818a72b2>] ? daring+0x6b/0x6b
         [<ffffffff810002af>] do_one_initcall+0x3f/0x170
         [<ffffffff81884b34>] kernel_init+0x9d/0x11e
         [<ffffffff810317c2>] ? schedule_tail+0x22/0xa0
         [<ffffffff815dbb14>] kernel_thread_helper+0x4/0x10
         [<ffffffff81884a97>] ? start_kernel+0x2be/0x2be
         [<ffffffff815dbb10>] ? gs_change+0xb/0xb
      
      Avoid it by making blk_drain_queue() kick queue iff dispatch queue has
      something on it.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reported-by: default avatarRalf Hildebrandt <Ralf.Hildebrandt@charite.de>
      Reported-by: default avatarWu Fengguang <fengguang.wu@intel.com>
      Tested-by: default avatarSergei Trofimovich <slyich@gmail.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      4eabc941
    • Linus Torvalds's avatar
      Merge branch 'stable/for-linus-fixes-3.2' of... · 42ebfc61
      Linus Torvalds authored
      Merge branch 'stable/for-linus-fixes-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
      
      * 'stable/for-linus-fixes-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen/swiotlb: Use page alignment for early buffer allocation.
        xen: only limit memory map to maximum reservation for domain 0.
      42ebfc61
    • Chris Mason's avatar
      Merge branch 'for-chris' of... · 567a45e9
      Chris Mason authored
      Merge branch 'for-chris' of http://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-work into integration
      
      Conflicts:
      	fs/btrfs/inode.c
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      567a45e9
    • Chris Mason's avatar
      Btrfs: deal with NULL srv_rsv in the delalloc inode reservation code · e755d9ab
      Chris Mason authored
      btrfs_update_inode is sometimes called with a null reservation.
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      e755d9ab
    • Ashish Jangam's avatar
      gpio: Fix DA9052 GPIO build errors. · 87b9b0e0
      Ashish Jangam authored
      This patch is functionally tested on Samsung SMDKV6410.
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarDavid Dajun Chen <dchen@diasemi.com>
      Signed-off-by: default avatarAshish Jangam <ashish.jangam@kpitcummins.com>
      [grant.likely: don't create an unnecessary header file]
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      87b9b0e0
    • Konrad Rzeszutek Wilk's avatar
      xen/swiotlb: Use page alignment for early buffer allocation. · 63a74175
      Konrad Rzeszutek Wilk authored
      This fixes an odd bug found on a Dell PowerEdge 1850/0RC130
      (BIOS A05 01/09/2006) where all of the modules doing pci_set_dma_mask
      would fail with:
      
      ata_piix 0000:00:1f.1: enabling device (0005 -> 0007)
      ata_piix 0000:00:1f.1: can't derive routing for PCI INT A
      ata_piix 0000:00:1f.1: BMDMA: failed to set dma mask, falling back to PIO
      
      The issue was the Xen-SWIOTLB was allocated such as that the end of
      buffer was stradling a page (and also above 4GB). The fix was
      spotted by Kalev Leonid  which was to piggyback on git commit
      e79f86b2 "swiotlb: Use page alignment
      for early buffer allocation" which:
      
      	We could call free_bootmem_late() if swiotlb is not used, and
      	it will shrink to page alignment.
      
      	So alloc them with page alignment at first, to avoid lose two pages
      
      And doing that fixes the outstanding issue.
      
      CC: stable@kernel.org
      Suggested-by: default avatar"Kalev, Leonid" <Leonid.Kalev@ca.com>
      Reported-and-Tested-by: default avatar"Taylor, Neal E" <Neal.Taylor@ca.com>
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      63a74175
    • Ian Campbell's avatar
      xen: only limit memory map to maximum reservation for domain 0. · d3db7281
      Ian Campbell authored
      d312ae87 "xen: use maximum reservation to limit amount of usable RAM"
      clamped the total amount of RAM to the current maximum reservation. This is
      correct for dom0 but is not correct for guest domains. In order to boot a guest
      "pre-ballooned" (e.g. with memory=1G but maxmem=2G) in order to allow for
      future memory expansion the guest must derive max_pfn from the e820 provided by
      the toolstack and not the current maximum reservation (which can reflect only
      the current maximum, not the guest lifetime max). The existing algorithm
      already behaves this correctly if we do not artificially limit the maximum
      number of pages for the guest case.
      
      For a guest booted with maxmem=512, memory=128 this results in:
       [    0.000000] BIOS-provided physical RAM map:
       [    0.000000]  Xen: 0000000000000000 - 00000000000a0000 (usable)
       [    0.000000]  Xen: 00000000000a0000 - 0000000000100000 (reserved)
      -[    0.000000]  Xen: 0000000000100000 - 0000000008100000 (usable)
      -[    0.000000]  Xen: 0000000008100000 - 0000000020800000 (unusable)
      +[    0.000000]  Xen: 0000000000100000 - 0000000020800000 (usable)
      ...
       [    0.000000] NX (Execute Disable) protection: active
       [    0.000000] DMI not present or invalid.
       [    0.000000] e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved)
       [    0.000000] e820 remove range: 00000000000a0000 - 0000000000100000 (usable)
      -[    0.000000] last_pfn = 0x8100 max_arch_pfn = 0x1000000
      +[    0.000000] last_pfn = 0x20800 max_arch_pfn = 0x1000000
       [    0.000000] initial memory mapped : 0 - 027ff000
       [    0.000000] Base memory trampoline at [c009f000] 9f000 size 4096
      -[    0.000000] init_memory_mapping: 0000000000000000-0000000008100000
      -[    0.000000]  0000000000 - 0008100000 page 4k
      -[    0.000000] kernel direct mapping tables up to 8100000 @ 27bb000-27ff000
      +[    0.000000] init_memory_mapping: 0000000000000000-0000000020800000
      +[    0.000000]  0000000000 - 0020800000 page 4k
      +[    0.000000] kernel direct mapping tables up to 20800000 @ 26f8000-27ff000
       [    0.000000] xen: setting RW the range 27e8000 - 27ff000
       [    0.000000] 0MB HIGHMEM available.
      -[    0.000000] 129MB LOWMEM available.
      -[    0.000000]   mapped low ram: 0 - 08100000
      -[    0.000000]   low ram: 0 - 08100000
      +[    0.000000] 520MB LOWMEM available.
      +[    0.000000]   mapped low ram: 0 - 20800000
      +[    0.000000]   low ram: 0 - 20800000
      
      With this change "xl mem-set <domain> 512M" will successfully increase the
      guest RAM (by reducing the balloon).
      
      There is no change for dom0.
      Reported-and-Tested-by: default avatarGeorge Shuklin <george.shuklin@gmail.com>
      Signed-off-by: default avatarIan Campbell <ian.campbell@citrix.com>
      Cc: stable@kernel.org
      Reviewed-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      d3db7281
    • Josef Bacik's avatar
      Btrfs: only set cache_generation if we setup the block group · e65cbb94
      Josef Bacik authored
      A user reported a problem booting into a new kernel with the old format inodes.
      He was panicing in cow_file_range while writing out the inode cache.  This is
      because if the block group is not cached we'll just skip writing out the cache,
      however if it gets dirtied again in the same transaction and it finished caching
      we'd go ahead and write it out, but since we set cache_generation to the transid
      we think we've already truncated it and will just carry on, running into
      cow_file_range and blowing up.  We need to make sure we only set
      cache_generation if we've done the truncate.  The user tested this patch and
      verified that the panic no longer occured.  Thanks,
      Reported-and-Tested-by: default avatarKlaus Bitto <klaus.bitto@gmail.com>
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      e65cbb94
    • Josef Bacik's avatar
      Btrfs: don't panic if orphan item already exists · ee4d89f0
      Josef Bacik authored
      I've been hitting this BUG_ON() in btrfs_orphan_add when running xfstest 269 in
      a loop.  This is because we will add an orphan item, do the truncate, the
      truncate will fail for whatever reason (*cough*ENOSPC*cough*) and then we're
      left with an orphan item still in the fs.  Then we come back later to do another
      truncate and it blows up because we already have an orphan item.  This is ok so
      just fix the BUG_ON() to only BUG() if ret is not EEXIST.  Thanks,
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      ee4d89f0
    • Josef Bacik's avatar
      Btrfs: fix leaked space in truncate · 7041ee97
      Josef Bacik authored
      We were occasionaly leaking space when running xfstest 269.  This is because if
      we failed to start the transaction in the truncate loop we'd just goto out, but
      we need to break so that the inode is removed from the orphan list and the space
      is properly freed.  Thanks,
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      7041ee97
    • Josef Bacik's avatar
      Btrfs: fix how we do delalloc reservations and how we free reservations on error · 660d3f6c
      Josef Bacik authored
      Running xfstests 269 with some tracing my scripts kept spitting out errors about
      releasing bytes that we didn't actually have reserved.  This took me down a huge
      rabbit hole and it turns out the way we deal with reserved_extents is wrong,
      we need to only be setting it if the reservation succeeds, otherwise the free()
      method will come in and unreserve space that isn't actually reserved yet, which
      can lead to other warnings and such.  The math was all working out right in the
      end, but it caused all sorts of other issues in addition to making my scripts
      yell and scream and generally make it impossible for me to track down the
      original issue I was looking for.  The other problem is with our error handling
      in the reservation code.  There are two cases that we need to deal with
      
      1) We raced with free.  In this case free won't free anything because csum_bytes
      is modified before we dro the lock in our reservation path, so free rightly
      doesn't release any space because the reservation code may be depending on that
      reservation.  However if we fail, we need the reservation side to do the free at
      that point since that space is no longer in use.  So as it stands the code was
      doing this fine and it worked out, except in case #2
      
      2) We don't race with free.  Nobody comes in and changes anything, and our
      reservation fails.  In this case we didn't reserve anything anyway and we just
      need to clean up csum_bytes but not free anything.  So we keep track of
      csum_bytes before we drop the lock and if it hasn't changed we know we can just
      decrement csum_bytes and carry on.
      
      Because of the case where we can race with free()'s since we have to drop our
      spin_lock to do the reservation, I'm going to serialize all reservations with
      the i_mutex.  We already get this for free in the heavy use paths, truncate and
      file write all hold the i_mutex, just needed to add it to page_mkwrite and
      various ioctl/balance things.  With this patch my space leak scripts no longer
      scream bloody murder.  Thanks,
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      660d3f6c