1. 19 3月, 2012 17 次提交
    • M
      md: Add judgement bb->unacked_exist in function md_ack_all_badblocks(). · ecb178bb
      majianpeng 提交于
      If there are no unacked bad blocks, then there is no point searching
      for them to acknowledge them.
      Signed-off-by: Nmajianpeng <majianpeng@gmail.com>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      ecb178bb
    • N
      md: fix clearing of the 'changed' flags for the bad blocks list. · d0962936
      NeilBrown 提交于
      In super_1_sync (the first hunk) we need to clear 'changed' before
      checking read_seqretry(), otherwise we might race with other code
      adding a bad block and so won't retry later.
      
      In md_update_sb (the second hunk), in the case where there is no
      metadata (neither persistent nor external), we treat any bad blocks as
      an error.  However we need to clear the 'changed' flag before calling
      md_ack_all_badblocks, else it won't do anything.
      
      This patch is suitable for -stable release 3.0 and later.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NNeilBrown <neilb@suse.de>
      d0962936
    • N
      md/bitmap: discard CHUNK_BLOCK_SHIFT macro · 61a0d80c
      NeilBrown 提交于
      Be redefining ->chunkshift as the shift from sectors to chunks rather
      than bytes to chunks, we can just use "bitmap->chunkshift" which is
      shorter than the macro call, and less indirect.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      61a0d80c
    • N
      md/bitmap: remove unnecessary indirection when allocating. · 792a1d4b
      NeilBrown 提交于
      These funcitons don't add anything useful except possibly the trace
      points, and I don't think they are worth the extra indirection.
      So remove them.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      792a1d4b
    • N
      md/bitmap: remove some pointless locking. · 5a6c824e
      NeilBrown 提交于
      There is nothing gained by holding a lock while we check if a pointer
      is NULL or not.  If there could be a race, then it could become NULL
      immediately after the unlock - but there is no race here.
      
      So just remove the locking.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      5a6c824e
    • N
      md/bitmap: change a 'goto' to a normal 'if' construct. · 278c1ca2
      NeilBrown 提交于
      The use of a goto makes the control flow more obscure here.
      
      So make it a normal:
        if (x) {
           Y;
        }
      
      No functional change.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      278c1ca2
    • N
      md/bitmap: move printing of bitmap status to bitmap.c · 57148964
      NeilBrown 提交于
      The part of /proc/mdstat which describes the bitmap should really
      be generated by code in bitmap.c.  So move it there.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      57148964
    • N
      md/bitmap: remove some unused noise from bitmap.h · 4ba97dff
      NeilBrown 提交于
      Signed-off-by: NNeilBrown <neilb@suse.de>
      4ba97dff
    • N
      md/raid10 - support resizing some RAID10 arrays. · 006a09a0
      NeilBrown 提交于
      'resizing' an array in this context means making use of extra
      space that has become available in component devices, not adding new
      devices.
      It also includes shrinking the array to take up less space of
      component devices.
      
      This is not supported for array with a 'far' layout.  However
      for 'near' and 'offset' layout arrays, adding and removing space at
      the end of the devices is easy to support, and this patch provides
      that support.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      006a09a0
    • N
      md/raid1: handle merge_bvec_fn in member devices. · 6b740b8d
      NeilBrown 提交于
      Currently we don't honour merge_bvec_fn in member devices so if there
      is one, we force all requests to be single-page at most.
      This is not ideal.
      
      So create a raid1 merge_bvec_fn to check that function in children
      as well.
      
      This introduces a small problem.  There is no locking around calls
      the ->merge_bvec_fn and subsequent calls to ->make_request.  So a
      device added between these could end up getting a request which
      violates its merge_bvec_fn.
      
      Currently the best we can do is synchronize_sched().  This will work
      providing no preemption happens.  If there is is preemption, we just
      have to hope that new devices are largely consistent with old devices.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      6b740b8d
    • N
      md/raid10: handle merge_bvec_fn in member devices. · 050b6615
      NeilBrown 提交于
      Currently we don't honour merge_bvec_fn in member devices so if there
      is one, we force all requests to be single-page at most.
      This is not ideal.
      
      So enhance the raid10 merge_bvec_fn to check that function in children
      as well.
      
      This introduces a small problem.  There is no locking around calls
      the ->merge_bvec_fn and subsequent calls to ->make_request.  So a
      device added between these could end up getting a request which
      violates its merge_bvec_fn.
      
      Currently the best we can do is synchronize_sched().  This will work
      providing no preemption happens.  If there is preemption, we just
      have to hope that new devices are largely consistent with old devices.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      050b6615
    • N
      md: add proper merge_bvec handling to RAID0 and Linear. · ba13da47
      NeilBrown 提交于
      These personalities currently set a max request size of one page
      when any member device has a merge_bvec_fn because they don't
      bother to call that function.
      
      This causes extra works in splitting and combining requests.
      
      So make the extra effort to call the merge_bvec_fn when it exists
      so that we end up with larger requests out the bottom.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      ba13da47
    • N
      md: tidy up rdev_for_each usage. · dafb20fa
      NeilBrown 提交于
      md.h has an 'rdev_for_each()' macro for iterating the rdevs in an
      mddev.  However it uses the 'safe' version of list_for_each_entry,
      and so requires the extra variable, but doesn't include 'safe' in the
      name, which is useful documentation.
      
      Consequently some places use this safe version without needing it, and
      many use an explicity list_for_each entry.
      
      So:
       - rename rdev_for_each to rdev_for_each_safe
       - create a new rdev_for_each which uses the plain
         list_for_each_entry,
       - use the 'safe' version only where needed, and convert all other
         list_for_each_entry calls to use rdev_for_each.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      dafb20fa
    • N
      md/raid1,raid10: avoid deadlock during resync/recovery. · d6b42dcb
      NeilBrown 提交于
      If RAID1 or RAID10 is used under LVM or some other stacking
      block device, it is possible to enter a deadlock during
      resync or recovery.
      This can happen if the upper level block device creates
      two requests to the RAID1 or RAID10.  The first request gets
      processed, blocks recovery and queue requests for underlying
      requests in current->bio_list.  A resync request then starts
      which will wait for those requests and block new IO.
      
      But then the second request to the RAID1/10 will be attempted
      and it cannot progress until the resync request completes,
      which cannot progress until the underlying device requests complete,
      which are on a queue behind that second request.
      
      So allow that second request to proceed even though there is
      a resync request about to start.
      
      This is suitable for any -stable kernel.
      
      Cc: stable@vger.kernel.org
      Reported-by: NRay Morris <support@bettercgi.com>
      Tested-by: NRay Morris <support@bettercgi.com>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      d6b42dcb
    • N
      md/bitmap: ensure to load bitmap when creating via sysfs. · 4474ca42
      NeilBrown 提交于
      When commit 69e51b44 (md/bitmap:  separate out loading a bitmap...)
      created bitmap_load, it missed calling it after bitmap_create when a
      bitmap is created through the sysfs interface.
      So if a bitmap is added this way, we don't allocate memory properly
      and can crash.
      
      This is suitable for any -stable release since 2.6.35.
      Cc: stable@vger.kernel.org
      Signed-off-by: NNeilBrown <neilb@suse.de>
      4474ca42
    • N
      md: don't set md arrays to readonly on shutdown. · c744a65c
      NeilBrown 提交于
      It seems that with recent kernel, writeback can still be happening
      while shutdown is happening, and consequently data can be written
      after the md reboot notifier switches all arrays to read-only.
      This causes a BUG.
      
      So don't switch them to read-only - just mark them clean and
      set 'safemode' to '2' which mean that immediately after any
      write the array will be switch back to 'clean'.
      
      This could result in the shutdown happening when array is marked
      dirty, thus forcing a resync on reboot.  However if you reboot
      without performing a "sync" first, you get to keep both halves.
      
      This is suitable for any stable kernel (though there might be some
      conflicts with obvious fixes in earlier kernels).
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NNeilBrown <neilb@suse.de>
      c744a65c
    • N
      md: allow re-add to failed arrays. · dc10c643
      NeilBrown 提交于
      When an array is failed (some data inaccessible) then there is no
      point attempting to add a spare as it could not possibly be recovered.
      
      However that may be value in re-adding a recently removed device.
      e.g. if there is a write-intent-bitmap and it is clear, then access
      to the data could be restored by this action.
      
      So don't reject a re-add to a failed array for RAID10 and RAID5 (the
      only arrays  types that check for a failed array).
      Signed-off-by: NNeilBrown <neilb@suse.de>
      dc10c643
  2. 13 3月, 2012 5 次提交
  3. 11 3月, 2012 1 次提交
  4. 10 3月, 2012 7 次提交
  5. 09 3月, 2012 10 次提交
    • L
      Merge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming · 0ab5d757
      Linus Torvalds 提交于
      Pull C6X fix from Mark Salter:
       "Fix for C6X KSTK_EIP and KSTK_ESP macros."
      
      * tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming:
        C6X: fix KSTK_EIP and KSTK_ESP macros
      0ab5d757
    • L
      Merge tag 'iommu-fixes-v3.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 0cacaf51
      Linus Torvalds 提交于
      Pull two IOMMU fixes from Joerg Roedel:
       "The first is an additional fix for the OMAP initialization order issue
        and the second patch fixes a possible section mismatch which can lead
        to a kernel crash in the AMD IOMMU driver when suspend/resume is used
        and the compiler has not inlined the iommu_set_device_table function."
      
      * tag 'iommu-fixes-v3.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        x86/amd: iommu_set_device_table() must not be __init
        ARM: OMAP: fix iommu, not mailbox
      0cacaf51
    • L
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 45b8da90
      Linus Torvalds 提交于
      Pull radeon drm stuff from Dave Airlie:
       "Just some radeon fixes, one is for an oops where we run out of ioremap
        space on some big hardware systems in 32-bit mode, stuff doesn't work
        properly but at least the machine will boot.
      
        One regression fix, and two bugs, one hw, one blit code."
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/radeon/kms: fix hdmi duallink checks
        drm/radeon/kms: set SX_MISC in the r6xx blit code (v2)
        drm/radeon: deal with errors from framebuffer init path.
        drm/radeon: fix a semaphore deadlock on pre cayman asics
      45b8da90
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · e304dfdb
      Linus Torvalds 提交于
      Pull networking from David Miller:
      
      1) IPV4 routing metrics can become stale when routes are changed by the
         administrator, fix from Steffen Klassert.
      
      2) atl1c does "val |= XXX;" where XXX is a bit number not a bit mask,
         fix by using set_bit.  From Dan Carpenter.
      
      3) Memory accounting bug in carl9170 driver results in wedged TX queue.
         Fix from Nicolas Cavallari.
      
      4) iwlwifi accidently uses "sizeof(ptr)" instead of "sizeof(*ptr)", fix
         from Johannes Berg.
      
      5) Openvswitch doesn't honor dp_ifindex when doing vport lookups, fix
         from Ben Pfaff.
      
      6) ehea conversion to 64-bit stats lost multicast and rx_errors
         accounting, fix from Eric Dumazet.
      
      7) Bridge state transition logging in br_stp_disable_port() is busted,
         it's emitted at the wrong time and the message is in the wrong tense,
         fix from Paulius Zaleckas.
      
      8) mlx4 device erroneously invokes the queue resize firmware operation
         twice, fix from Jack Morgenstein.
      
      9) Fix deadlock in usbnet, need to drop lock when invoking usb_unlink_urb()
         otherwise we recurse into taking it again.  Fix from Sebastian Siewior.
      
      10) hyperv network driver uses the wrong driver name string, fix from
          Haiyang Zhang.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        net/hyperv: Use the built-in macro KBUILD_MODNAME for this driver
        net/usbnet: avoid recursive locking in usbnet_stop()
        route: Remove redirect_genid
        inetpeer: Invalidate the inetpeer tree along with the routing cache
        mlx4_core: fix bug in modify_cq wrapper for resize flow.
        atl1c: set ATL1C_WORK_EVENT_RESET bit correctly
        bridge: fix state reporting when port is disabled
        bridge: br_log_state() s/entering/entered/
        ehea: restore multicast and rx_errors fields
        openvswitch: Fix checksum update for actions on UDP packets.
        openvswitch: Honor dp_ifindex, when specified, for vport lookup by name.
        iwlwifi: fix wowlan suspend
        mwifiex: reset encryption mode flag before association
        carl9170: fix frame delivery if sta is in powersave mode
        carl9170: Fix memory accounting when sta is in power-save mode.
      e304dfdb
    • L
      Merge tag 'fixes-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 9f8050c4
      Linus Torvalds 提交于
      Pull last minute fixes from Olof Johansson:
       "One samsung build fix due to a mis-applied patch, and a small set of
        OMAP fixes.  This should be the last from arm-soc for 3.3, hopefully."
      
      * tag 'fixes-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: S3C2440: Fixed build error for s3c244x
        ARM: OMAP2+: Fix module build errors with CONFIG_OMAP4_ERRATA_I688
        ARM: OMAP: id: Add missing break statement in omap3xxx_check_revision
        ARM: OMAP2+: Remove apply_uV constraints for fixed regulator
        ARM: OMAP: irqs: Fix NR_IRQS value to handle PRCM interrupts
      9f8050c4
    • L
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · 9a0cee71
      Linus Torvalds 提交于
      Pull regulator fix from Mark Brown:
       "Another small, clear fix in a specific driver."
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: tps65910: Configure correct value for VDDCTRL vout reg
      9a0cee71
    • L
      Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux-2.6 · ee0849c9
      Linus Torvalds 提交于
      Pull minor devicetree bug fixes and documentation updates from Grant Likely:
       "Fixes up a duplicate #include, adds an empty implementation of
        of_find_compatible_node() and make git ignore .dtb files.  And fix up
        bus name on OF described PHYs.  Nothing exciting here."
      
      * tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux-2.6:
        doc: dt: Fix broken reference in gpio-leds documentation
        of/mdio: fix fixed link bus name
        of/fdt.c: asm/setup.h included twice
        of: add picochip vendor prefix
        dt: add empty of_find_compatible_node function
        ARM: devicetree: Add .dtb files to arch/arm/boot/.gitignore
      ee0849c9
    • L
      Merge tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6 · 7d77696e
      Linus Torvalds 提交于
      Pull SPI section mismatch bug fix for v3.3-rc3 from Grant Likely:
       "Minor fix for pl022_dma_probe() function which was put in the wrong
        section."
      
      * tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6:
        Fix section mismatch in spi-pl022.c
      7d77696e
    • L
      Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging · 42a6c7ef
      Linus Torvalds 提交于
      Pull four hwmon patches from Guenter Roeck
      
      * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (jc42) Add support for AT30TS00, TS3000GB2, TSE2002GB2, and MCP9804
        hwmon: (zl6100) Maintain delay parameter in driver instance data
        hwmon: (pmbus_core) Fix maximum number of POUT alarm attributes
        hwmon: (jc42) Add support for ST Microelectronics STTS2002 and STTS3000
      42a6c7ef
    • L
      Merge tag 'dm-3.3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm · 5d0edf29
      Linus Torvalds 提交于
      Pull device-mapper fixes for 3.3 from Alasdair Kergon
      
      Eight small device-mapper bug fixes.
      
      * tag 'dm-3.3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm:
        dm raid: fix flush support
        dm raid: set MD_CHANGE_DEVS when rebuilding
        dm thin metadata: decrement counter after removing mapped block
        dm thin metadata: unlock superblock in init_pmd error path
        dm thin metadata: remove incorrect close_device on creation error paths
        dm flakey: fix crash on read when corrupt_bio_byte not set
        dm io: fix discard support
        dm ioctl: do not leak argv if target message only contains whitespace
      5d0edf29