1. 15 Jan, 2010 7 commits
    • Dave Chinner's avatar
      xfs: xfs_swap_extents needs to handle dynamic fork offsets · e09f9860
      Dave Chinner authored
      When swapping extents, we can corrupt inodes by swapping data forks
      that are in incompatible formats.  This is caused by the two indoes
      having different fork offsets due to the presence of an attribute
      fork on an attr2 filesystem.  xfs_fsr tries to be smart about
      setting the fork offset, but the trick it plays only works on attr1
      (old fixed format attribute fork) filesystems.
      
      Changing the way xfs_fsr sets up the attribute fork will prevent
      this situation from ever occurring, so in the kernel code we can get
      by with a preventative fix - check that the data fork in the
      defragmented inode is in a format valid for the inode it is being
      swapped into.  This will lead to files that will silently and
      potentially repeatedly fail defragmentation, so issue a warning to
      the log when this particular failure occurs to let us know that
      xfs_fsr needs updating/fixing.
      
      To help identify how to improve xfs_fsr to avoid this issue, add
      trace points for the inodes being swapped so that we can determine
      why the swap was rejected and to confirm that the code is making the
      right decisions and modifications when swapping forks.
      
      A further complication is even when the swap is allowed to proceed
      when the fork offset is different between the two inodes then value
      for the maximum number of extents the data fork can hold can be
      wrong. Make sure these are also set correctly after the swap occurs.
      Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
      e09f9860
    • Dave Chinner's avatar
      xfs: fix missing error check in xfs_rtfree_range · 3daeb42c
      Dave Chinner authored
      When xfs_rtfind_forw() returns an error, the block is returned
      uninitialised.  xfs_rtfree_range() is not checking the error return,
      so could be using an uninitialised block number for modifying bitmap
      summary info.
      
      The problem was found by gcc when compiling the *userspace* libxfs
      code - it is an copy of the kernel code with the exact same bug.
      gcc gives an uninitialised variable warning on the userspace code
      but not on the kernel code. You gotta love the consistency (Mmmm,
      slightly chewy today!).
      Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
      Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
      3daeb42c
    • Dave Chinner's avatar
      xfs: fix stale inode flush avoidance · 4b6a4688
      Dave Chinner authored
      When reclaiming stale inodes, we need to guarantee that inodes are
      unpinned before returning with a "clean" status. If we don't we can
      reclaim inodes that are pinned, leading to use after free in the
      transaction subsystem as transactions complete.
      Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
      4b6a4688
    • Dave Chinner's avatar
      xfs: Remove inode iolock held check during allocation · 126976c7
      Dave Chinner authored
      lockdep complains about a the lock not being initialised as we do an
      ASSERT based check that the lock is not held before we initialise it
      to catch inodes freed with the lock held.
      
      lockdep does this check for us in the lock initialisation code, so
      remove the ASSERT to stop the lockdep warning.
      Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
      126976c7
    • Dave Chinner's avatar
      xfs: reclaim all inodes by background tree walks · 57817c68
      Dave Chinner authored
      We cannot do direct inode reclaim without taking the flush lock to
      ensure that we do not reclaim an inode under IO. We check the inode
      is clean before doing direct reclaim, but this is not good enough
      because the inode flush code marks the inode clean once it has
      copied the in-core dirty state to the backing buffer.
      
      It is the flush lock that determines whether the inode is still
      under IO, even though it is marked clean, and the inode is still
      required at IO completion so we can't reclaim it even though it is
      clean in core. Hence the requirement that we need to take the flush
      lock even on clean inodes because this guarantees that the inode
      writeback IO has completed and it is safe to reclaim the inode.
      
      With delayed write inode flushing, we coul dend up waiting a long
      time on the flush lock even for a clean inode. The background
      reclaim already handles this efficiently, so avoid all the problems
      by killing the direct reclaim path altogether.
      Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
      57817c68
    • Dave Chinner's avatar
      xfs: Avoid inodes in reclaim when flushing from inode cache · 018027be
      Dave Chinner authored
      The reclaim code will handle flushing of dirty inodes before reclaim
      occurs, so avoid them when determining whether an inode is a
      candidate for flushing to disk when walking the radix trees.  This
      is based on a test patch from Christoph Hellwig.
      Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
      018027be
    • Dave Chinner's avatar
      xfs: reclaim inodes under a write lock · c8e20be0
      Dave Chinner authored
      Make the inode tree reclaim walk exclusive to avoid races with
      concurrent sync walkers and lookups. This is a version of a patch
      posted by Christoph Hellwig that avoids all the code duplication.
      Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
      c8e20be0
  2. 13 Jan, 2010 12 commits
    • Linus Torvalds's avatar
      Linux 2.6.33-rc4 · 7284ce6c
      Linus Torvalds authored
      7284ce6c
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/battery-2.6 · 53ff7095
      Linus Torvalds authored
      * git://git.infradead.org/battery-2.6:
        pmu_battery: Fix battery full reporting
      53ff7095
    • Bryn M. Reeves's avatar
      [SCSI] megaraid_sas: remove sysfs poll_mode_io world writeable permissions · bb7d3f24
      Bryn M. Reeves authored
      /sys/bus/pci/drivers/megaraid_sas/poll_mode_io defaults to being
      world-writable, which seems bad (letting any user affect kernel driver
      behavior).
      
      This turns off group and user write permissions, so that on typical
      production systems only root can write to it.
      Signed-off-by: default avatarBryn M. Reeves <bmr@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      bb7d3f24
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://gitorious.org/linux-omap-dss2/linux · 90aeb7c0
      Linus Torvalds authored
      * 'for-linus' of git://gitorious.org/linux-omap-dss2/linux:
        OMAP: DSS2: OMAPFB: fix crash when panel driver was not loaded
        OMAP: DSS2: Reject scaling settings when they cannot be supported
        OMAP: DSS2: Make check-delay-loops consistent
        OMAP: DSS2: OMAPFB: fix omapfb_free_fbmem()
        video/omap: add __init/__exit macros to drivers/video/omap/lcd_htcherald.c
        OMAP: DSS2: Fix compile warning
        MAINTAINERS: Combine DSS2 and OMAPFB2 into one entry
        MAINTAINERS: change omapfb maintainer
        OMAP: OMAPFB: add dummy release function for omapdss
        OMAP: OMAPFB: fix clk_get for RFBI
        OMAP: DSS2: RFBI: convert to new kfifo API
        OMAP: DSS2: Fix crash when panel doesn't define enable_te()
        OMAP: DSS2: Collect interrupt statistics
        OMAP: DSS2: DSI: print debug DCS cmd in hex
        OMAP: DSS2: DSI: fix VC channels in send_short and send_null
      90aeb7c0
    • Dave Chinner's avatar
      lib: Introduce generic list_sort function · 2c761270
      Dave Chinner authored
      There are two copies of list_sort() in the tree already, one in the DRM
      code, another in ubifs.  Now XFS needs this as well.  Create a generic
      list_sort() function from the ubifs version and convert existing users
      to it so we don't end up with yet another copy in the tree.
      Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
      Acked-by: default avatarDave Airlie <airlied@redhat.com>
      Acked-by: default avatarArtem Bityutskiy <dedekind@infradead.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2c761270
    • Dave Jones's avatar
      remove my email address from checkpatch. · dbf004d7
      Dave Jones authored
      Maybe this will stop people emailing me about it.
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      dbf004d7
    • Linus Torvalds's avatar
      Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev · 2d13c8f0
      Linus Torvalds authored
      * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
        libata: retry link resume if necessary
        ata_piix: enable 32bit PIO on SATA piix
        sata_promise: don't classify overruns as HSM errors
      2d13c8f0
    • Linus Torvalds's avatar
      Merge master.kernel.org:/home/rmk/linux-2.6-arm · 1f0e14bb
      Linus Torvalds authored
      * master.kernel.org:/home/rmk/linux-2.6-arm:
        ARM: Ensure ARMv6/7 mm files are built using appropriate assembler options
        ARM: Fix wrong dmb
        ARM: 5874/1: serial21285: fix disable_irq-from-interrupt-handler deadlock
        ARM: 5873/1: ARM: Fix the reset logic for ARM RealView boards
        ARM: 5872/1: ARM: include needed linux/cpu.h in asm/cpu.h
        ARM: 5871/1: arch/arm: Fix build failure for lpd7a404_defconfig caused by missing includes
        ARM: 5870/1: arch/arm: Fix build failure for defconfigs without CONFIG_ISA_DMA_API set
        ARM: 5868/1: ARM: fix "BUG: using smp_processor_id() in preemptible code"
        ARM: 5867/1: Update U300 defconfig
        ARM: 5866/1: arm ptrace: use unsigned types for kernel pt_regs
        [ARM] pxa: fix strange characters in zaurus gpio .desc
        ARM: add missing recvmmsg syscall number
        [ARM] pxa: fix compiler warnings of unused variable 'id' in cpu_is_pxa9*()
        [ARM] pxa: update pwm_backlight->notify() to include missed 'struct device *'
        [ARM] pxa: enable L2 if present in XSC3
        [ARM] pxa: do not enable L2 after MMU is enabled
      1f0e14bb
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus · f25bb39f
      Linus Torvalds authored
      * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (22 commits)
        MIPS: Ignore vmlinux.*
        MIPS: Move vmlinux.ecoff to arch/mips/boot
        MIPS: cpumask_of_node() should handle -1 as a node
        MIPS: Octeon: Use non-overflowing arithmetic in sched_clock
        MIPS: Malta, PowerTV: Remove unnecessary "Linux started"
        MIPS: BCM63xx: Remove duplicate CONFIG_CMDLINE.
        MIPS: AR7: Remove unused prom_getchar()
        MIPS: PowerTV: Remove extra r4k_clockevent_init() call
        MIPS: Cobalt use strlcat() for the command line arguments
        MIPS: Octeon: Add sched_clock() to csrc-octeon.c
        MIPS: TXx9: Cleanup builtin-cmdline processing
        MIPS: PowerTV: simplify prom_init_cmdline() and merge into prom_init()
        MIPS: PowerTV: Remove unused platform_die()
        MIPS: PowerTV: Remove mips_machine_halt()
        MIPS: PowerTV: Remove unused ptv_memsize
        MIPS: PowerTV: Remove unused prom_getcmdline()
        MIPS: AR7: Remove kgdb_enabled
        MIPS: Alchemy: Correct code taking the size of a pointer
        MIPS: BCM63xx: Fix whitespace damaged board_bcm963xx.c
        MIPS: VR41xx: Use strlcat() for the command line arguments
        ...
      f25bb39f
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 · 7113578a
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
        ALSA: hda - Fix ALC861-VD capture source mixer
        ALSA: ac97: add AC97 STMicroelectronics' codecs
        ALSA: ac97: Add Dell Dimension 2400 to Headphone/Line Jack Sense blacklist
        ASoC: Fix WM8350 DSP mode B configuration
        sbawe: fix memory detection part 2
        sound: oss: off by one bug
        ALSA: usb-audio - Avoid Oops after disconnect
        ALSA: test off by one in setsamplerate()
        ALSA: atiixp: Specify codec for Foxconn RC4107MA-RS2
      7113578a
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · 597d8c71
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (56 commits)
        sky2: Fix oops in sky2_xmit_frame() after TX timeout
        Documentation/3c509: document ethtool support
        af_packet: Don't use skb after dev_queue_xmit()
        vxge: use pci_dma_mapping_error to test return value
        netfilter: ebtables: enforce CAP_NET_ADMIN
        e1000e: fix and commonize code for setting the receive address registers
        e1000e: e1000e_enable_tx_pkt_filtering() returns wrong value
        e1000e: perform 10/100 adaptive IFS only on parts that support it
        e1000e: don't accumulate PHY statistics on PHY read failure
        e1000e: call pci_save_state() after pci_restore_state()
        netxen: update version to 4.0.72
        netxen: fix set mac addr
        netxen: fix smatch warning
        netxen: fix tx ring memory leak
        tcp: update the netstamp_needed counter when cloning sockets
        TI DaVinci EMAC: Handle emac module clock correctly.
        dmfe/tulip: Let dmfe handle DM910x except for SPARC on-board chips
        ixgbe: Fix compiler warning about variable being used uninitialized
        netfilter: nf_ct_ftp: fix out of bounds read in update_nl_seq()
        mv643xx_eth: don't include cache padding in rx desc buffer size
        ...
      
      Fix trivial conflict in drivers/scsi/cxgb3i/cxgb3i_offload.c
      597d8c71
    • Greg Ungerer's avatar
      m68knommu: fix definitions of __pa() and __va() · 682137f7
      Greg Ungerer authored
      Fix compilation breakage of all m68knommu targets:
      
        CC      arch/m68knommu/kernel/asm-offsets.s
      In file included from include/linux/sched.h:77,
                       from arch/m68knommu/kernel/asm-offsets.c:12:
      include/linux/percpu.h: In function 'per_cpu_ptr_to_phys':
      include/linux/percpu.h:161: error: implicit declaration of function 'virt_to_phy
      
      This is broken in linux-2.6.33-rc3.
      
      Change the definitions of __pa() and __va() to not use virt_to_phys()
      and phys_to_virt(). Trivial 1:1 conversion required for the non-MMU case.
      
      A side effect if this is that the m68knommu can now use asm/virtconvert.h
      for the definition of virt_to_phys() and phys_to_virt().
      
      Also cleaned up the definition of page_to_phys() when moving into
      virtconvert.h.
      Signed-off-by: default avatarGreg Ungerer <gerg@uclinux.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      682137f7
  3. 12 Jan, 2010 21 commits