Skip to content
  1. May 15, 2009
  2. Apr 28, 2009
    • Chris Mason's avatar
      Btrfs: look for acls during btrfs_read_locked_inode · 46a53cca
      Chris Mason authored
      
      
      This changes btrfs_read_locked_inode() to peek ahead in the btree for acl items.
      If it is certain a given inode has no acls, it will set the in memory acl
      fields to null to avoid acl lookups completely.
      
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      46a53cca
    • Chris Mason's avatar
      Btrfs: fix acl caching · 7b1a14bb
      Chris Mason authored
      
      
      Linus noticed the btrfs code to cache acls wasn't properly caching
      a NULL acl when the inode didn't have any acls.  This meant the common
      case of no acls resulted in expensive btree searches every time the
      kernel checked permissions (which is quite often).
      
      This is a modified version of Linus' original patch:
      
      Properly set initial acl fields to BTRFS_ACL_NOT_CACHED in the inode.
      This forces an acl lookup when permission checks are done.
      
      Fix btrfs_get_acl to avoid lookups and locking when the inode acls fields
      are set to null.
      
      Fix btrfs_get_acl to use the right return value from __btrfs_getxattr
      when deciding to cache a NULL acl.  It was storing a NULL acl when
      __btrfs_getxattr return -ENOENT, but __btrfs_getxattr was actually returning
      -ENODATA for this case.
      
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      7b1a14bb
  3. Apr 27, 2009
  4. Apr 25, 2009
  5. Apr 22, 2009
    • Chris Mason's avatar
      Btrfs: fix btrfs fallocate oops and deadlock · 546888da
      Chris Mason authored
      
      
      Btrfs fallocate was incorrectly starting a transaction with a lock held
      on the extent_io tree for the file, which could deadlock.  Strictly
      speaking it was using join_transaction which would be safe, but it is better
      to move the transaction outside of the lock.
      
      When preallocated extents are overwritten, btrfs_mark_buffer_dirty was
      being called on an unlocked buffer.  This was triggering an assertion and
      oops because the lock is supposed to be held.
      
      The bug was calling btrfs_mark_buffer_dirty on a leaf after btrfs_del_item had
      been run.  btrfs_del_item takes care of dirtying things, so the solution is a
      to skip the btrfs_mark_buffer_dirty call in this case.
      
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      546888da
  6. Apr 21, 2009
    • Chris Mason's avatar
      Btrfs: use the right node in reada_for_balance · 8c594ea8
      Chris Mason authored
      
      
      reada_for_balance was using the wrong index into the path node array,
      so it wasn't reading the right blocks.  We never directly used the
      results of the read done by this function because the btree search is
      started over at the end.
      
      This fixes reada_for_balance to reada in the correct node and to
      avoid searching past the last slot in the node.  It also makes sure to
      hold the parent lock while we are finding the nodes to read.
      
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      8c594ea8
    • Chris Mason's avatar
      Btrfs: fix oops on page->mapping->host during writepage · 11c8349b
      Chris Mason authored
      
      
      The extent_io writepage call updates the writepage index in the inode
      as it makes progress.  But, it was doing the update after unlocking the page,
      which isn't legal because page->mapping can't be trusted once the page
      is unlocked.
      
      This lead to an oops, especially common with compression turned on.  The
      fix here is to update the writeback index before unlocking the page.
      
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      11c8349b
    • Chris Mason's avatar
      Btrfs: add a priority queue to the async thread helpers · d313d7a3
      Chris Mason authored
      
      
      Btrfs is using WRITE_SYNC_PLUG to send down synchronous IOs with a
      higher priority.  But, the checksumming helper threads prevent it
      from being fully effective.
      
      There are two problems.  First, a big queue of pending checksumming
      will delay the synchronous IO behind other lower priority writes.  Second,
      the checksumming uses an ordered async work queue.  The ordering makes sure
      that IOs are sent to the block layer in the same order they are sent
      to the checksumming threads.  Usually this gives us less seeky IO.
      
      But, when we start mixing IO priorities, the lower priority IO can delay
      the higher priority IO.
      
      This patch solves both problems by adding a high priority list to the async
      helper threads, and a new btrfs_set_work_high_prio(), which is used
      to make put a new async work item onto the higher priority list.
      
      The ordering is still done on high priority IO, but all of the high
      priority bios are ordered separately from the low priority bios.  This
      ordering is purely an IO optimization, it is not involved in data
      or metadata integrity.
      
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      d313d7a3
    • Chris Mason's avatar
      Btrfs: use WRITE_SYNC for synchronous writes · ffbd517d
      Chris Mason authored
      
      
      Part of reducing fsync/O_SYNC/O_DIRECT latencies is using WRITE_SYNC for
      writes we plan on waiting on in the near future.  This patch
      mirrors recent changes in other filesystems and the generic code to
      use WRITE_SYNC when WB_SYNC_ALL is passed and to use WRITE_SYNC for
      other latency critical writes.
      
      Btrfs uses async worker threads for checksumming before the write is done,
      and then again to actually submit the bios.  The bio submission code just
      runs a per-device list of bios that need to be sent down the pipe.
      
      This list is split into low priority and high priority lists so the
      WRITE_SYNC IO happens first.
      
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      ffbd517d
  7. Apr 15, 2009
    • Linus Torvalds's avatar
      Linux 2.6.30-rc2 · 0882e8dd
      Linus Torvalds authored
      0882e8dd
    • Linus Torvalds's avatar
      Merge branch 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel · b897e6fb
      Linus Torvalds authored
      * 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel:
        drm/i915: fix scheduling while holding the new active list spinlock
        drm/i915: Allow tiling of objects with bit 17 swizzling by the CPU.
        drm/i915: Correctly set the write flag for get_user_pages in pread.
        drm/i915: Fix use of uninitialized var in 40a5f0de
        drm/i915: indicate framebuffer restore key in SysRq help message
        drm/i915: sync hdmi detection by hdmi identifier with 2D
        drm/i915: Fix a mismerge of the IGD patch (new .find_pll hooks missed)
        drm/i915: Implement batch and ring buffer dumping
      b897e6fb
    • Hugh Dickins's avatar
      x86 microcode: revert some work_on_cpu · 6f66cbc6
      Hugh Dickins authored
      Revert part of af5c820a
      
       ("x86: cpumask:
      use work_on_cpu in arch/x86/kernel/microcode_core.c")
      
      That change is causing only one Intel CPU's microcode to be updated e.g.
      microcode: CPU3 updated from revision 0x9 to 0x17, date = 2005-04-22
      where before it announced that also for CPU0 and CPU1 and CPU2.
      
      We cannot use work_on_cpu() in the CONFIG_MICROCODE_OLD_INTERFACE code,
      because Intel's request_microcode_user() involves a copy_from_user() from
      /sbin/microcode_ctl, which therefore needs to be on that CPU at the time.
      
      Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6f66cbc6
    • Shaohua Li's avatar
      drm/i915: fix scheduling while holding the new active list spinlock · 68c84342
      Shaohua Li authored
      regression caused by commit 5e118f41
      
      :
      i915_gem_object_move_to_inactive() should be called in task context,
      as it calls fput();
      
      Signed-off-by: default avatarShaohua <Li&lt;shaohua.li@intel.com>
      [anholt: Add more detail to the comment about the lock break that's added]
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      68c84342
    • Linus Torvalds's avatar
      Merge branch 'core-fixes-for-linus' of... · 610f26e7
      Linus Torvalds authored
      Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        lockdep: warn about lockdep disabling after kernel taint, fix
      610f26e7
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · e9de427e
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        fuse: fix "direct_io" private mmap
        fuse: fix argument type in fuse_get_user_pages()
      e9de427e
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2 · 9fc0178c
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
        nilfs2: fix possible mismatch of sufile counters on recovery
        nilfs2: segment usage file cleanups
        nilfs2: fix wrong accounting and duplicate brelse in nilfs_sufile_set_error
        nilfs2: simplify handling of active state of segments fix
        nilfs2: remove module version
        nilfs2: fix lockdep recursive locking warning on meta data files
        nilfs2: fix lockdep recursive locking warning on bmap
        nilfs2: return f_fsid for statfs2
      9fc0178c
    • Linus Torvalds's avatar
      Merge branch 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblaze · 2b6b6d38
      Linus Torvalds authored
      * 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblaze:
        microblaze: Add missing FILE tag to MAINTAINERS
        microblaze: remove duplicated #include's
        microblaze: struct device - replace bus_id with dev_name()
        microblaze: Simplify copy_thread()
        microblaze: Add TIMESTAMPING constants to socket.h
        microblaze: Add missing empty ftrace.h file
        microblaze: Fix problem with removing zero length files
      2b6b6d38
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 · 3e862dd5
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
        sh: Add in PCI bus for DMA API debugging.
        sh: Pre-allocate a reasonable number of DMA debug entries.
        sh: sh7786: modify usb setup timeout judgment bug.
        MAINTAINERS: Update sh architecture file patterns.
        sh: ap325: use edge control for ov772x camera
        sh: Plug in support for ARCH=sh64 using sh SRCARCH.
        sh: urquell: Fix up address mapping in board comments.
        sh: Add support for DMA API debugging.
        sh: Provide cpumask_of_pcibus() to fix NUMA build.
        sh: urquell: Add board comment
        sh: wire up sys_preadv/sys_pwritev() syscalls.
        sh: sh7785lcr: fix PCI address map for 32-bit mode
        sh: intc: Added resume from hibernation support to the intc
      3e862dd5
    • David Howells's avatar
      Fix lpfc_parse_bg_err()'s use of do_div() · 2344b5b6
      David Howells authored
      
      
      Fix lpfc_parse_bg_err()'s use of do_div().  It should be passing a 64-bit
      variable as the first parameter.  However, since it's only using a 32-bit
      variable, it doesn't need to use do_div() at all, but can instead use the
      division operator.
      
      This deals with the following warnings:
      
          CC      drivers/scsi/lpfc/lpfc_scsi.o
        drivers/scsi/lpfc/lpfc_scsi.c: In function 'lpfc_parse_bg_err':
        drivers/scsi/lpfc/lpfc_scsi.c:1397: warning: comparison of distinct pointer types lacks a cast
        drivers/scsi/lpfc/lpfc_scsi.c:1397: warning: right shift count >= width of type
        drivers/scsi/lpfc/lpfc_scsi.c:1397: warning: passing argument 1 of '__div64_32' from incompatible pointer type
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2344b5b6
  8. Apr 14, 2009