1. 18 5月, 2010 32 次提交
  2. 17 5月, 2010 3 次提交
    • N
      md: manage redundancy group in sysfs when changing level. · a64c876f
      NeilBrown 提交于
      Some levels expect the 'redundancy group' to be present,
      others don't.
      So when we change level of an array we might need to
      add or remove this group.
      
      This requires fixing up the current practice of overloading ->private
      to indicate (when ->pers == NULL) that something needs to be removed.
      So create a new ->to_remove to fill that role.
      
      When changing levels, we may need to add or remove attributes.  When
      changing RAID5 -> RAID6, we both add and remove the same thing.  It is
      important to catch this and optimise it out as the removal is delayed
      until a lock is released, so trying to add immediately would cause
      problems.
      
      
      Cc: stable@kernel.org
      Signed-off-by: NNeilBrown <neilb@suse.de>
      a64c876f
    • N
      md: remove unneeded sysfs files more promptly · b6eb127d
      NeilBrown 提交于
      When an array is stopped we need to remove some
      sysfs files which are dependent on the type of array.
      
      We need to delay that deletion as deleting them while holding
      reconfig_mutex can lead to deadlocks.
      
      We currently delay them until the array is completely destroyed.
      However it is possible to deactivate and then reactivate the array.
      It is also possible to need to remove sysfs files when changing level,
      which can potentially happen several times before an array is
      destroyed.
      
      So we need to delete these files more promptly: as soon as
      reconfig_mutex is dropped.
      
      We need to ensure this happens before do_md_run can restart the array,
      so we use open_mutex for some extra locking.  This is not deadlock
      prone.
      
      Cc: stable@kernel.org
      Signed-off-by: NNeilBrown <neilb@suse.de>
      b6eb127d
    • N
      md/linear: avoid possible oops and array stop · ef2f80ff
      NeilBrown 提交于
      Since commit ef286f6f
      it has been important that each personality clears
      ->private in the ->stop() function, or sets it to a
      attribute group to be removed.
      linear.c doesn't.  This can sometimes lead to an oops,
      though it doesn't always.
      
      Suitable for 2.6.33-stable and 2.6.34.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Cc: stable@kernel.org
      ef2f80ff
  3. 12 5月, 2010 1 次提交
    • D
      md: set mddev readonly flag on blkdev BLKROSET ioctl · e2218350
      Dan Williams 提交于
      When the user sets the block device to readwrite then the mddev should
      follow suit.  Otherwise, the BUG_ON in md_write_start() will be set to
      trigger.
      
      The reverse direction, setting mddev->ro to match a set readonly
      request, can be ignored because the blkdev level readonly flag precludes
      the need to have mddev->ro set correctly.  Nevermind the fact that
      setting mddev->ro to 1 may fail if the array is in use.
      
      Cc: <stable@kernel.org>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      e2218350
  4. 16 3月, 2010 1 次提交
    • N
      md: deal with merge_bvec_fn in component devices better. · 627a2d3c
      NeilBrown 提交于
      If a component device has a merge_bvec_fn then as we never call it
      we must ensure we never need to.  Currently this is done by setting
      max_sector to 1 PAGE, however this does not stop a bio being created
      with several sub-page iovecs that would violate the merge_bvec_fn.
      
      So instead set max_segments to 1 and set the segment boundary to the
      same as a page boundary to ensure there is only ever one single-page
      segment of IO requested at a time.
      
      This can particularly be an issue when 'xen' is used as it is
      known to submit multiple small buffers in a single bio.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Cc: stable@kernel.org
      627a2d3c
  5. 08 3月, 2010 3 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/amit/virtio-console · 25cf84cf
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/amit/virtio-console:
        virtio: console: Use better variable names for fill_queue operation
        virtio: console: Fix type of 'len' as unsigned int
      25cf84cf
    • L
      Merge branch 'x86-mrst-for-linus' of... · 322aafa6
      Linus Torvalds 提交于
      Merge branch 'x86-mrst-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'x86-mrst-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (30 commits)
        x86, mrst: Fix whitespace breakage in apb_timer.c
        x86, mrst: Fix APB timer per cpu clockevent
        x86, mrst: Remove X86_MRST dependency on PCI_IOAPIC
        x86, olpc: Use pci subarch init for OLPC
        x86, pci: Add arch_init to x86_init abstraction
        x86, mrst: Add Kconfig dependencies for Moorestown
        x86, pci: Exclude Moorestown PCI code if CONFIG_X86_MRST=n
        x86, numaq: Make CONFIG_X86_NUMAQ depend on CONFIG_PCI
        x86, pci: Add sanity check for PCI fixed bar probing
        x86, legacy_irq: Remove duplicate vector assigment
        x86, legacy_irq: Remove left over nr_legacy_irqs
        x86, mrst: Platform clock setup code
        x86, apbt: Moorestown APB system timer driver
        x86, mrst: Add vrtc platform data setup code
        x86, mrst: Add platform timer info parsing code
        x86, mrst: Fill in PCI functions in x86_init layer
        x86, mrst: Add dummy legacy pic to platform setup
        x86/PCI: Moorestown PCI support
        x86, ioapic: Add dummy ioapic functions
        x86, ioapic: Early enable ioapic for timer irq
        ...
      
      Fixed up semantic conflict of new clocksources due to commit
      17622339 ("clocksource: add argument to resume callback").
      322aafa6
    • L
      Merge branch 'for-linus/i2c' of git://git.fluff.org/bjdooks/linux · dd04265b
      Linus Torvalds 提交于
      * 'for-linus/i2c' of git://git.fluff.org/bjdooks/linux:
        i2c: Add support for Xilinx XPS IIC Bus Interface
        i2c: omap: Add support for 16-bit registers
        i2c-pnx: fix setting start/stop condition
        powerpc: doc/dts-bindings: update doc of FSL I2C bindings
        i2c-mpc: add support for the MPC512x processors from Freescale
        i2c-mpc: rename "setclock" initialization functions to "setup"
        i2c-mpc: use __devinit[data] for initialization functions and data
        i2c/imx: don't add probe function to the driver struct
        i2c: Add support for Ux500/Nomadik I2C controller
      dd04265b