1. 09 Dec, 2011 26 commits
  2. 08 Dec, 2011 14 commits
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 09d9673d
      Linus Torvalds authored
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        alarmtimers: Fix time comparison
        ptp: Fix clock_getres() implementation
      09d9673d
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · fb38f9b8
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        Btrfs: drop spin lock when memory alloc fails
        Btrfs: check if the to-be-added device is writable
        Btrfs: try cluster but don't advance in search list
        Btrfs: try to allocate from cluster even at LOOP_NO_EMPTY_SIZE
      fb38f9b8
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 8bd1c881
      Linus Torvalds authored
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (28 commits)
        ARM: sa1100: fix build error
        ARM: OMAP1: recalculate loops per jiffy after dpll1 reprogram
        ARM: davinci: dm365 evm: align nand partition table to u-boot
        ARM: davinci: da850 evm: change audio edma event queue to EVENTQ_0
        ARM: davinci: dm646x evm: wrong register used in setup_vpif_input_channel_mode
        ARM: davinci: dm646x does not have a DSP domain
        ARM: davinci: psc: fix incorrect offsets
        ARM: davinci: psc: fix incorrect mask
        ARM: mx28: LRADC macro rename
        arm: mx23: recognise stmp378x as mx23
        ARM: mxs: fix machines' initializers order
        ARM: mxs/tx28: add __initconst for fec pdata
        ARM: S3C64XX: Staticise s3c6400_sysclass
        ARM: S3C64XX: Add linux/export.h to dev-spi.c
        ARM: S3C64XX: Remove extern from definition of framebuffer setup call
        MAINTAINERS: Extend Samsung patterns to cover SPI and ASoC drivers
        MAINTAINERS: Add linux-samsung-soc mailing list for Samsung
        MAINTAINERS: Consolidate Samsung MAINTAINERS
        ARM: CSR: PM: fix build error due to undeclared 'THIS_MODULE'
        ARM: CSR: fix build error due to new mdesc->dma_zone_size
        ...
      8bd1c881
    • Tetsuo Handa's avatar
      TOMOYO: Fix pathname handling of disconnected paths. · 1418a3e5
      Tetsuo Handa authored
      Current tomoyo_realpath_from_path() implementation returns strange pathname
      when calculating pathname of a file which belongs to lazy unmounted tree.
      Use local pathname rather than strange absolute pathname in that case.
      
      Also, this patch fixes a regression by commit 02125a82 "fix apparmor
      dereferencing potentially freed dentry, sanitize __d_path() API".
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1418a3e5
    • Arnd Bergmann's avatar
    • Liu Bo's avatar
      Btrfs: drop spin lock when memory alloc fails · 1cf4ffdb
      Liu Bo authored
      Drop spin lock in convert_extent_bit() when memory alloc fails,
      otherwise, it will be a deadlock.
      Signed-off-by: default avatarLiu Bo <liubo2009@cn.fujitsu.com>
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      1cf4ffdb
    • Li Zefan's avatar
      Btrfs: check if the to-be-added device is writable · a5d16333
      Li Zefan authored
      If we call ioctl(BTRFS_IOC_ADD_DEV) directly, we'll succeed in adding
      a readonly device to a btrfs filesystem, and btrfs will write to
      that device, emitting kernel errors:
      
      [ 3109.833692] lost page write due to I/O error on loop2
      [ 3109.833720] lost page write due to I/O error on loop2
      ...
      Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      a5d16333
    • Alexandre Oliva's avatar
      Btrfs: try cluster but don't advance in search list · 274bd4fb
      Alexandre Oliva authored
      When we find an existing cluster, we switch to its block group as the
      current block group, possibly skipping multiple blocks in the process.
      Furthermore, under heavy contention, multiple threads may fail to
      allocate from a cluster and then release just-created clusters just to
      proceed to create new ones in a different block group.
      
      This patch tries to allocate from an existing cluster regardless of its
      block group, and doesn't switch to that group, instead proceeding to
      try to allocate a cluster from the group it was iterating before the
      attempt.
      Signed-off-by: default avatarAlexandre Oliva <oliva@lsd.ic.unicamp.br>
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      274bd4fb
    • Jett.Zhou's avatar
      ARM: sa1100: fix build error · c564a0cb
      Jett.Zhou authored
      arm-eabi-4.4.3-ld:--defsym zreladdr=: syntax error
      make[2]: *** [arch/arm/boot/compressed/vmlinux] Error 1
      make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
      make: *** [uImage] Error 2
      Signed-off-by: default avatarHaojian Zhuang <haojian.zhuang@gmail.com>
      Signed-off-by: default avatarJett.Zhou <jtzhou@marvell.com>
      c564a0cb
    • NeilBrown's avatar
      md/raid5: never wait for bad-block acks on failed device. · 9283d8c5
      NeilBrown authored
      Once a device is failed we really want to completely ignore it.
      It should go away soon anyway.
      
      In particular the presence of bad blocks on it should not cause us to
      block as we won't be trying to write there anyway.
      
      So as soon as we can check if a device is Faulty, do so and pretend
      that it is already gone if it is Faulty.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      9283d8c5
    • NeilBrown's avatar
      md: ensure new badblocks are handled promptly. · 8bd2f0a0
      NeilBrown authored
      When we mark blocks as bad we need them to be acknowledged by the
      metadata handler promptly.
      
      For an in-kernel metadata handler that was already being done.  But
      for an external metadata handler we need to alert it of the change by
      sending a notification through the sysfs file.  This adds that
      notification.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      8bd2f0a0
    • NeilBrown's avatar
      md: bad blocks shouldn't cause a Blocked status on a Faulty device. · 52c64152
      NeilBrown authored
      Once a device is marked Faulty the badblocks - whether acknowledged or
      not - become irrelevant.  So they shouldn't cause the device to be
      marked as Blocked.
      
      Without this patch, a process might write "-blocked" to clear the
      Blocked status, but while that will correctly fail the device, it
      won't remove the apparent 'blocked' status.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      52c64152
    • NeilBrown's avatar
      md: take a reference to mddev during sysfs access. · af8a2434
      NeilBrown authored
      
      When we are accessing an mddev via sysfs we know that the
      mddev cannot disappear because it has an embedded kobj which
      is refcounted by sysfs.
      And we also take the mddev_lock.
      However this is not enough.
      
      The final mddev_put could have been called and the
      mddev_delayed_delete is waiting for sysfs to let go so it can destroy
      the kobj and mddev.
      In this state there are a lot of changes that should not be attempted.
      
      To to guard against this we:
       - initialise mddev->all_mddevs in on last put so the state can be
         easily detected.
       - in md_attr_show and md_attr_store, check ->all_mddevs under
         all_mddevs_lock and mddev_get the mddev if it still appears to
         be active.
      
      This means that if we get to sysfs as the mddev is being deleted we
      will get -EBUSY.
      
      rdev_attr_store and rdev_attr_show are similar but already have
      sufficient protection.  They check that rdev->mddev still points to
      mddev after taking mddev_lock.  As this is cleared  before delayed
      removal which can only be requested under the mddev_lock, this
      ensure the rdev and mddev are still alive.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      af8a2434
    • NeilBrown's avatar
      md: refine interpretation of "hold_active == UNTIL_IOCTL". · 1d23f178
      NeilBrown authored
      We like md devices to disappear when they really are not needed.
      However it is not possible to tell from the current state whether it
      is needed or not.  We can only tell from recent history of changes.
      
      In particular immediately after we create an md device it looks very
      similar to immediately after we have finished with it.
      
      So we always preserve a newly created md device until something
      significant happens.  This state is stored in 'hold_active'.
      
      The normal case is to keep it until an ioctl happens, as that will
      normally either activate it, or explicitly de-activate it.  If it
      doesn't then it was probably created by mistake and it is now time to
      get rid of it.
      
      We can also modify an array via sysfs (instead of via ioctl) and we
      currently treat any change via sysfs like an ioctl as a sign that if
      it now isn't more active, it should be destroyed.
      However this is not appropriate as changes made via sysfs are more
      gradual so we should look for a more definitive change.
      
      So this patch only clears 'hold_active' from UNTIL_IOCTL to clear when
      the array_state is changed via sysfs.  Other changes via sysfs
      are ignored.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      1d23f178