1. 16 12月, 2011 2 次提交
    • S
      block, cfq: fix empty queue crash caused by request merge · 6ae0516b
      Shaohua Li 提交于
      All requests of a queue could be merged to other requests of other queue.
      Such queue will not have request in it, but it's in service tree. This
      will cause kernel oops.
      I encounter a BUG_ON() in cfq_dispatch_request() with next patch, but the
      issue should exist without the patch.
      Signed-off-by: NShaohua Li <shaohua.li@intel.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      6ae0516b
    • T
      block: don't kick empty queue in blk_drain_queue() · 4eabc941
      Tejun Heo 提交于
      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: NTejun Heo <tj@kernel.org>
      Reported-by: NRalf Hildebrandt <Ralf.Hildebrandt@charite.de>
      Reported-by: NWu Fengguang <fengguang.wu@intel.com>
      Tested-by: NSergei Trofimovich <slyich@gmail.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      4eabc941
  2. 12 12月, 2011 1 次提交
    • B
      block/swim3: Locking fixes · b3025457
      Benjamin Herrenschmidt 提交于
      The old PowerMac swim3 driver has some "interesting" locking issues,
      using a private lock and failing to lock the queue before completing
      requests, which triggered WARN_ONs among others.
      
      This rips out the private lock, makes everything operate under the
      block queue lock, and generally makes things simpler.
      
      We used to also share a queue between the two possible instances which
      was problematic since we might pick the wrong controller in some cases,
      so make the queue and the current request per-instance and use
      queuedata to point to our private data which is a lot cleaner.
      
      We still share the queue lock but then, it's nearly impossible to actually
      use 2 swim3's simultaneously: one would need to have a Wallstreet
      PowerBook, the only machine afaik with two of these on the motherboard,
      and populate both hotswap bays with a floppy drive (the machine ships
      only with one), so nobody cares...
      
      While at it, add a little fix to clear up stale interrupts when loading
      the driver or plugging a floppy drive in a bay.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      b3025457
  3. 02 12月, 2011 2 次提交
    • L
      loop: Fix discard_alignment default setting · dfaf3c03
      Lukas Czerner 提交于
      discard_alignment is not relevant to the loop driver since it is
      supposed to be set as a workaround for the old sector 63 alignments.
      So set it to zero rather than block size.
      Signed-off-by: NLukas Czerner <lczerner@redhat.com>
      Reported-by: NMilan Broz <mbroz@redhat.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      dfaf3c03
    • Y
      cfq-iosched: fix cfq_cic_link() race confition · 5eb46851
      Yasuaki Ishimatsu 提交于
      cfq_cic_link() has race condition. When some processes which shared ioc
      issue I/O to same block device simultaneously, cfq_cic_link() returns -EEXIST
      sometimes. The race condition might stop I/O by following steps:
      
      step  1: Process A: Issue an I/O to /dev/sda
      step  2: Process A: Get an ioc (iocA here) in get_io_context() which does not
      		    linked with a cic for the device
      step  3: Process A: Get a new cic for the device (cicA here) in
      		    cfq_alloc_io_context()
      
      step  4: Process B: Issue an I/O to /dev/sda
      step  5: Process B: Get iocA in get_io_context() since process A and B share the
      		    same ioc
      step  6: Process B: Get a new cic for the device (cicB here) in
      		    cfq_alloc_io_context() since iocA has not been linked with a
      		    cic for the device yet
      
      step  7: Process A: Link cicA to iocA in cfq_cic_link()
      step  8: Process A: Dispatch I/O to driver and finish it
      
      step  9: Process B: Try to link cicB to iocA in cfq_cic_link()
      		    But it fails with showing "cfq: cic link failed!" kernel
      		    message, since iocA has already linked with cicA at step 7.
      step 10: Process B: Wait for finishig I/O in get_request_wait()
      		    The function does not wake up, when there is no I/O to the
      		    device.
      
      When cfq_cic_link() returns -EEXIST, it means ioc has already linked with cic.
      So when cfq_cic_link() return -EEXIST, retry cfq_cic_lookup().
      Signed-off-by: NYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Cc: stable@kernel.org
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      5eb46851
  4. 30 11月, 2011 1 次提交
  5. 29 11月, 2011 2 次提交
  6. 25 11月, 2011 1 次提交
  7. 23 11月, 2011 9 次提交
  8. 22 11月, 2011 13 次提交
  9. 21 11月, 2011 5 次提交
    • D
      VFS: Log the fact that we've given ELOOP rather than creating a loop · dd179946
      David Howells 提交于
      To prevent an NFS server from being used to create a directory loop in an NFS
      superblock on the client, the following patch was committed:
      
      	commit 18367501
      	Author: Al Viro <viro@zeniv.linux.org.uk>
      	Date:   Tue Jul 12 21:42:24 2011 -0400
      	Subject: fix loop checks in d_materialise_unique()
      
      This causes ELOOP to be reported to anyone trying to access the dentry that
      would otherwise cause the kernel to complete the loop.
      
      However, no indication is given to the caller as to why an operation that ought
      to work doesn't.  The fault is with the kernel, which doesn't want to try and
      solve the problem as it gets horrendously messy if there's another mountpoint
      somewhere in the trees being spliced that can't be moved[*].
      
      [*] The real problem is that we don't handle the excision of a subtree that
      gets moved _out_ of what we can see.  This can happen on the server where a
      directory is merely moved between two other dirs on the same filesystem, but
      where destination dir is not accessible by the client.
      
      So, given the choice to return ELOOP rather than trying to reconfigure the
      dentry tree, we should give the caller some indication of why they aren't being
      allowed to make what should be a legitimate request and log a message.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NSachin Prabhu <sprabhu@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      dd179946
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 6fe4c6d4
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (86 commits)
        ipv4: fix redirect handling
        ping: dont increment ICMP_MIB_INERRORS
        sky2: fix hang in napi_disable
        sky2: enforce minimum ring size
        bonding: Don't allow mode change via sysfs with slaves present
        f_phonet: fix page offset of first received fragment
        stmmac: fix pm functions avoiding sleep on spinlock
        stmmac: remove spin_lock in stmmac_ioctl.
        stmmac: parameters auto-tuning through HW cap reg
        stmmac: fix advertising 1000Base capabilties for non GMII iface
        stmmac: use mdelay on timeout of sw reset
        sky2: version 1.30
        sky2: used fixed RSS key
        sky2: reduce default Tx ring size
        sky2: rename up/down functions
        sky2: pci posting issues
        sky2: fix hang on shutdown (and other irq issues)
        r6040: fix check against MCRO_HASHEN bit in r6040_multicast_list
        MAINTAINERS: change email address for shemminger
        pch_gbe: Move #include of module.h
        ...
      6fe4c6d4
    • L
      Merge branch 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/virt/kvm/kvm · a4cc3889
      Linus Torvalds 提交于
      * 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM guest: prevent tracing recursion with kvmclock
        Revert "KVM: PPC: Add support for explicit HIOR setting"
        KVM: VMX: Check for automatic switch msr table overflow
        KVM: VMX: Add support for guest/host-only profiling
        KVM: VMX: add support for switching of PERF_GLOBAL_CTRL
        KVM: s390: announce SYNC_MMU
        KVM: s390: Fix tprot locking
        KVM: s390: handle SIGP sense running intercepts
        KVM: s390: Fix RUNNING flag misinterpretation
      a4cc3889
    • L
      Merge branch 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm · bb893d15
      Linus Torvalds 提交于
      * 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm:
        ARM: wire up process_vm_writev and process_vm_readv syscalls
        ARM: 7160/1: setup: avoid overflowing {elf,arch}_name from proc_info_list
        ARM: 7158/1: add new MFP implement for NUC900
        ARM: 7157/1: fix a building WARNING for nuc900
        ARM: 7156/1: l2x0: fix compile error on !CONFIG_USE_OF
        ARM: 7155/1: arch.h: Declare 'pt_regs' locally
        ARM: 7154/1: mach-bcmring: fix build error in dma.c
        ARM: 7153/1: mach-bcmring: fix build error in core.c
        ARM: 7152/1: distclean: Remove generated .dtb files
        ARM: 7150/1: Allow kernel unaligned accesses on ARMv6+ processors
        ARM: 7149/1: spi/pl022: Enable clock in probe
        Revert "ARM: 7098/1: kdump: copy kernel relocation code at the kexec prepare stage"
      bb893d15
    • L
      Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 2d360fcb
      Linus Torvalds 提交于
      * 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM / Suspend: Fix bug in suspend statistics update
        PM / Hibernate: Fix the early termination of test modes
        PM / shmobile: Fix build of sh7372_pm_init() for CONFIG_PM unset
        PM Sleep: Do not extend wakeup paths to devices with ignore_children set
        PM / driver core: disable device's runtime PM during shutdown
        PM / devfreq: correct Kconfig dependency
        PM / devfreq: fix use after free in devfreq_remove_device
        PM / shmobile: Avoid restoring the INTCS state during initialization
        PM / devfreq: Remove compiler error after irq.h update
        PM / QoS: Properly use the WARN() macro in dev_pm_qos_add_request()
        PM / Clocks: Only disable enabled clocks in pm_clk_suspend()
        ARM: mach-shmobile: sh7372 A3SP no_suspend_console fix
        PM / shmobile: Don't skip debugging output in pd_power_up()
      2d360fcb
  10. 20 11月, 2011 4 次提交
    • J
      Btrfs: sectorsize align offsets in fiemap · 4d479cf0
      Josef Bacik 提交于
      We've been hitting BUG()'s in btrfs_cont_expand and btrfs_fallocate and anywhere
      else that calls btrfs_get_extent while running xfstests 13 in a loop.  This is
      because fiemap is calling btrfs_get_extent with non-sectorsize aligned offsets,
      which will end up adding mappings that are not sectorsize aligned, which will
      cause problems in some cases for subsequent calls to btrfs_get_extent for
      similar areas that are sectorsize aligned.  With this patch I ran xfstests 13 in
      a loop for a couple of hours and didn't hit the problem that I could previously
      hit in at most 20 minutes.  Thanks,
      Signed-off-by: NJosef Bacik <josef@redhat.com>
      4d479cf0
    • J
      Btrfs: clear pages dirty for io and set them extent mapped · f7d61dcd
      Josef Bacik 提交于
      When doing the io_ctl helpers to clean up the free space cache stuff I stopped
      using our normal prepare_pages stuff, which means I of course forgot to do
      things like set the pages extent mapped, which will cause us all sorts of
      wonderful propblems.  Thanks,
      Signed-off-by: NJosef Bacik <josef@redhat.com>
      f7d61dcd
    • J
      Btrfs: wait on caching if we're loading the free space cache · 291c7d2f
      Josef Bacik 提交于
      We've been hitting panics when running xfstest 13 in a loop for long periods of
      time.  And actually this problem has always existed so we've been hitting these
      things randomly for a while.  Basically what happens is we get a thread coming
      into the allocator and reading the space cache off of disk and adding the
      entries to the free space cache as we go.  Then we get another thread that comes
      in and tries to allocate from that block group.  Since block_group->cached !=
      BTRFS_CACHE_NO it goes ahead and tries to do the allocation.  We do this because
      if we're doing the old slow way of caching we don't want to hold people up and
      wait for everything to finish.  The problem with this is we could end up
      discarding the space cache at some arbitrary point in the future, which means we
      could very well end up allocating space that is either bad, or when the real
      caching happens it could end up thinking the space isn't in use when it really
      is and cause all sorts of other problems.
      
      The solution is to add a new flag to indicate we are loading the free space
      cache from disk, and always try to cache the block group if cache->cached !=
      BTRFS_CACHE_FINISHED.  That way if we are loading the space cache anybody else
      who tries to allocate from the block group will have to wait until it's finished
      to make sure it completes successfully.  Thanks,
      Signed-off-by: NJosef Bacik <josef@redhat.com>
      291c7d2f
    • A
      Btrfs: prefix resize related printks with btrfs: · 5bb14682
      Arnd Hannemann 提交于
      For the user it is confusing to find something like:
      [10197.627710] new size for /dev/mapper/vg0-usr_share is 3221225472
      in kernel log, because it doesn't point directly to btrfs.
      
      This patch prefixes those messages with "btrfs:" like other btrfs
      related printks.
      Signed-off-by: NArnd Hannemann <arnd@arndnet.de>
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      5bb14682